Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen In directory usw-pr-cvs1:/tmp/cvs-serv9253/Python/Tools/bgen/bgen Modified Files: macsupport.py Log Message: Added some support for Uicode arguments. Still leaves something to be desired, especially because of poor unicode support in PyArg_ParseTuple. Index: macsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/macsupport.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** macsupport.py 2001/12/18 15:48:28 1.25 --- macsupport.py 2002/01/01 22:39:58 1.26 *************** *** 48,51 **** --- 48,53 ---- FSSpec_ptr = OpaqueType("FSSpec", "PyMac_BuildFSSpec", "PyMac_GetFSSpec") FSSpec = OpaqueByValueType("FSSpec", "PyMac_BuildFSSpec", "PyMac_GetFSSpec") + FSRef_ptr = OpaqueType("FSRef", "PyMac_BuildFSRef", "PyMac_GetFSRef") + FSRef = OpaqueByValueType("FSRef", "PyMac_BuildFSRef", "PyMac_GetFSRef") # OSType and ResType: 4-byte character strings *************** *** 111,114 **** --- 113,129 ---- VarOutBuffer = VarHeapOutputBufferType('char', 'long', 'l') # (buf, &len) VarVarOutBuffer = VarVarHeapOutputBufferType('char', 'long', 'l') # (buf, len, &len) + + # Unicode arguments sometimes have reversed len, buffer (don't understand why Apple did this...) + class VarUnicodeInputBufferType(VarInputBufferType): + + def getargsFormat(self): + return "u#" + + class VarUnicodeReverseInputBufferType(ReverseInputBufferMixin, VarUnicodeInputBufferType): + pass + + UnicodeInBuffer = VarUnicodeInputBufferType('UniChar', 'UniCharCount', 'l') + UnicodeReverseInBuffer = VarUnicodeReverseInputBufferType('UniChar', 'UniCharCount', 'l') + UniChar_ptr = InputOnlyType("UniCharPtr", "u")
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4