| OLD | NEW | 
|    1 #!/usr/bin/python2.4 |    1 #!/usr/bin/python2.4 | 
|    2 # |    2 # | 
|    3 # Copyright 2008 Google Inc. |    3 # Copyright 2008 Google Inc. | 
|    4 # |    4 # | 
|    5 # Licensed under the Apache License, Version 2.0 (the "License"); |    5 # Licensed under the Apache License, Version 2.0 (the "License"); | 
|    6 # you may not use this file except in compliance with the License. |    6 # you may not use this file except in compliance with the License. | 
|    7 # You may obtain a copy of the License at |    7 # You may obtain a copy of the License at | 
|    8 # |    8 # | 
|    9 #      http://www.apache.org/licenses/LICENSE-2.0 |    9 #      http://www.apache.org/licenses/LICENSE-2.0 | 
|   10 # |   10 # | 
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  431     second string being an expression to access the object. |  431     second string being an expression to access the object. | 
|  432  |  432  | 
|  433   Raises: |  433   Raises: | 
|  434     InvalidPODUsage: always. This function can't be called for a POD type. |  434     InvalidPODUsage: always. This function can't be called for a POD type. | 
|  435   """ |  435   """ | 
|  436   raise InvalidPODUsage |  436   raise InvalidPODUsage | 
|  437  |  437  | 
|  438  |  438  | 
|  439 _wstring_from_npvariant_template = string.Template(""" |  439 _wstring_from_npvariant_template = string.Template(""" | 
|  440 ${type} ${variable}; |  440 ${type} ${variable}; | 
|  441 if (!NPVARIANT_IS_STRING(${input}) { |  441 if (!NPVARIANT_IS_STRING(${input})) { | 
|  442   ${success} = false; |  442   ${success} = false; | 
|  443   *error_handle = "Error in " ${context} |  443   *error_handle = "Error in " ${context} | 
|  444       ": was expecting a string."; |  444       ": was expecting a string."; | 
|  445 } else if (!UTF8ToString16(NPVARIANT_TO_STRING(${input}).UTF8Characters, |  445 } else if (!UTF8ToString16(NPVARIANT_TO_STRING(${input}).UTF8Characters, | 
|  446                     NPVARIANT_TO_STRING(${input}).UTF8Length, |  446                     NPVARIANT_TO_STRING(${input}).UTF8Length, | 
|  447                     &${variable})) { |  447                     &${variable})) { | 
|  448   ${success} = false; |  448   ${success} = false; | 
|  449   *error_handle = "Error in " ${context} |  449   *error_handle = "Error in " ${context} | 
|  450       ": hit an unexpected unicode conversion problem."; |  450       ": hit an unexpected unicode conversion problem."; | 
|  451 } |  451 } | 
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  634             '') |  634             '') | 
|  635   else: |  635   else: | 
|  636     raise UnknownPODType(final_type.podtype) |  636     raise UnknownPODType(final_type.podtype) | 
|  637  |  637  | 
|  638  |  638  | 
|  639 def main(unused_argv): |  639 def main(unused_argv): | 
|  640   pass |  640   pass | 
|  641  |  641  | 
|  642 if __name__ == '__main__': |  642 if __name__ == '__main__': | 
|  643   main(sys.argv) |  643   main(sys.argv) | 
| OLD | NEW |