Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b1b78d8

Browse files
committed
Bgen now understands more constant definitions, but that means that a few which are not parseable in Python have to be blacklisted.
1 parent 13681b7 commit b1b78d8

7 files changed

Lines changed: 32 additions & 2 deletions

File tree

Mac/Modules/ae/AEmodule.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,12 @@ static PyObject *AEDesc_getattr(self, name)
813813

814814
#define AEDesc_setattr NULL
815815

816+
#define AEDesc_compare NULL
817+
818+
#define AEDesc_repr NULL
819+
820+
#define AEDesc_hash NULL
821+
816822
PyTypeObject AEDesc_Type = {
817823
PyObject_HEAD_INIT(&PyType_Type)
818824
0, /*ob_size*/
@@ -824,6 +830,12 @@ PyTypeObject AEDesc_Type = {
824830
0, /*tp_print*/
825831
(getattrfunc) AEDesc_getattr, /*tp_getattr*/
826832
(setattrfunc) AEDesc_setattr, /*tp_setattr*/
833+
(cmpfunc) AEDesc_compare, /*tp_compare*/
834+
(reprfunc) AEDesc_repr, /*tp_repr*/
835+
(PyNumberMethods *)0, /* tp_as_number */
836+
(PySequenceMethods *)0, /* tp_as_sequence */
837+
(PyMappingMethods *)0, /* tp_as_mapping */
838+
(hashfunc) AEDesc_hash, /*tp_hash*/
827839
};
828840

829841
/* --------------------- End object type AEDesc --------------------- */

Mac/Modules/ae/aescan.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def makeblacklistnames(self):
7070
return [
7171
"AEDisposeDesc",
7272
# "AEGetEventHandler",
73+
# Constants with funny definitions
74+
"kAEDontDisposeOnResume",
75+
"kAEUseStandardDispatch",
7376
]
7477

7578
def makeblacklisttypes(self):

Mac/Modules/evt/evtscan.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def makeblacklistnames(self):
3939
return [
4040
"KeyTranslate",
4141
"GetEventMask", # I cannot seem to find this routine...
42-
"WaitNextEvent" # Manually generated because of optional region
42+
"WaitNextEvent", # Manually generated because of optional region
43+
# Constants with funny definitions
44+
"osEvtMessageMask",
4345
]
4446

4547
def makeblacklisttypes(self):

Mac/Modules/icn/icnscan.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def makeblacklistnames(self):
3939
return [
4040
"GetIconCacheData",
4141
"SetIconCacheData",
42+
# Constants with funny definitions
43+
"kSelectorAllHugeData",
44+
"kSelectorAllAvailableData",
45+
"svAllAvailableData",
4246
]
4347

4448
def makeblacklisttypes(self):
@@ -51,6 +55,9 @@ def makeblacklisttypes(self):
5155
def makerepairinstructions(self):
5256
return [
5357
]
58+
59+
def writeinitialdefs(self):
60+
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
5461

5562
if __name__ == "__main__":
5663
main()

Mac/Modules/snd/sndscan.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ def makeblacklistnames(self):
5555
# And old calls that are no longer supported
5656
'SetSoundVol',
5757
'GetSoundVol',
58+
# Constants with funny definitions
59+
'rate48khz',
60+
'rate44khz',
61+
'kInvalidSource',
5862

5963
]
6064

Mac/Modules/win/Winmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ static PyObject *WinObj_GetWindowProxyFSSpec(_self, _args)
713713
&outFile);
714714
if (_err != noErr) return PyMac_Error(_err);
715715
_res = Py_BuildValue("O&",
716-
PyMac_BuildFSSpec, outFile);
716+
PyMac_BuildFSSpec, &outFile);
717717
return _res;
718718
}
719719

Mac/Modules/win/winscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ def makeblacklistnames(self):
4141
'GetWindowProperty',
4242
'GetWindowPropertySize',
4343
'RemoveWindowProperty',
44+
# Constants with funny definitions
45+
'kMouseUpOutOfSlop',
4446
]
4547

4648
def makeblacklisttypes(self):

0 commit comments

Comments
 (0)