mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Bgen now understands more constant definitions, but that means that a few which are not parseable in Python have to be blacklisted.
This commit is contained in:
parent
13681b73b5
commit
b1b78d85d3
7 changed files with 32 additions and 2 deletions
|
|
@ -813,6 +813,12 @@ static PyObject *AEDesc_getattr(self, name)
|
||||||
|
|
||||||
#define AEDesc_setattr NULL
|
#define AEDesc_setattr NULL
|
||||||
|
|
||||||
|
#define AEDesc_compare NULL
|
||||||
|
|
||||||
|
#define AEDesc_repr NULL
|
||||||
|
|
||||||
|
#define AEDesc_hash NULL
|
||||||
|
|
||||||
PyTypeObject AEDesc_Type = {
|
PyTypeObject AEDesc_Type = {
|
||||||
PyObject_HEAD_INIT(&PyType_Type)
|
PyObject_HEAD_INIT(&PyType_Type)
|
||||||
0, /*ob_size*/
|
0, /*ob_size*/
|
||||||
|
|
@ -824,6 +830,12 @@ PyTypeObject AEDesc_Type = {
|
||||||
0, /*tp_print*/
|
0, /*tp_print*/
|
||||||
(getattrfunc) AEDesc_getattr, /*tp_getattr*/
|
(getattrfunc) AEDesc_getattr, /*tp_getattr*/
|
||||||
(setattrfunc) AEDesc_setattr, /*tp_setattr*/
|
(setattrfunc) AEDesc_setattr, /*tp_setattr*/
|
||||||
|
(cmpfunc) AEDesc_compare, /*tp_compare*/
|
||||||
|
(reprfunc) AEDesc_repr, /*tp_repr*/
|
||||||
|
(PyNumberMethods *)0, /* tp_as_number */
|
||||||
|
(PySequenceMethods *)0, /* tp_as_sequence */
|
||||||
|
(PyMappingMethods *)0, /* tp_as_mapping */
|
||||||
|
(hashfunc) AEDesc_hash, /*tp_hash*/
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type AEDesc --------------------- */
|
/* --------------------- End object type AEDesc --------------------- */
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,9 @@ class AppleEventsScanner(Scanner):
|
||||||
return [
|
return [
|
||||||
"AEDisposeDesc",
|
"AEDisposeDesc",
|
||||||
# "AEGetEventHandler",
|
# "AEGetEventHandler",
|
||||||
|
# Constants with funny definitions
|
||||||
|
"kAEDontDisposeOnResume",
|
||||||
|
"kAEUseStandardDispatch",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makeblacklisttypes(self):
|
def makeblacklisttypes(self):
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,9 @@ class MyScanner(Scanner):
|
||||||
return [
|
return [
|
||||||
"KeyTranslate",
|
"KeyTranslate",
|
||||||
"GetEventMask", # I cannot seem to find this routine...
|
"GetEventMask", # I cannot seem to find this routine...
|
||||||
"WaitNextEvent" # Manually generated because of optional region
|
"WaitNextEvent", # Manually generated because of optional region
|
||||||
|
# Constants with funny definitions
|
||||||
|
"osEvtMessageMask",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makeblacklisttypes(self):
|
def makeblacklisttypes(self):
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,10 @@ class MyScanner(Scanner):
|
||||||
return [
|
return [
|
||||||
"GetIconCacheData",
|
"GetIconCacheData",
|
||||||
"SetIconCacheData",
|
"SetIconCacheData",
|
||||||
|
# Constants with funny definitions
|
||||||
|
"kSelectorAllHugeData",
|
||||||
|
"kSelectorAllAvailableData",
|
||||||
|
"svAllAvailableData",
|
||||||
]
|
]
|
||||||
|
|
||||||
def makeblacklisttypes(self):
|
def makeblacklisttypes(self):
|
||||||
|
|
@ -51,6 +55,9 @@ class MyScanner(Scanner):
|
||||||
def makerepairinstructions(self):
|
def makerepairinstructions(self):
|
||||||
return [
|
return [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def writeinitialdefs(self):
|
||||||
|
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,10 @@ class SoundScanner(Scanner):
|
||||||
# And old calls that are no longer supported
|
# And old calls that are no longer supported
|
||||||
'SetSoundVol',
|
'SetSoundVol',
|
||||||
'GetSoundVol',
|
'GetSoundVol',
|
||||||
|
# Constants with funny definitions
|
||||||
|
'rate48khz',
|
||||||
|
'rate44khz',
|
||||||
|
'kInvalidSource',
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -713,7 +713,7 @@ static PyObject *WinObj_GetWindowProxyFSSpec(_self, _args)
|
||||||
&outFile);
|
&outFile);
|
||||||
if (_err != noErr) return PyMac_Error(_err);
|
if (_err != noErr) return PyMac_Error(_err);
|
||||||
_res = Py_BuildValue("O&",
|
_res = Py_BuildValue("O&",
|
||||||
PyMac_BuildFSSpec, outFile);
|
PyMac_BuildFSSpec, &outFile);
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,8 @@ class MyScanner(Scanner):
|
||||||
'GetWindowProperty',
|
'GetWindowProperty',
|
||||||
'GetWindowPropertySize',
|
'GetWindowPropertySize',
|
||||||
'RemoveWindowProperty',
|
'RemoveWindowProperty',
|
||||||
|
# Constants with funny definitions
|
||||||
|
'kMouseUpOutOfSlop',
|
||||||
]
|
]
|
||||||
|
|
||||||
def makeblacklisttypes(self):
|
def makeblacklisttypes(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue