mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Used an adapted MethodGenerator to generate methods too for functions that have the object as the second arg after a first CFAllocatorRef arg (which we pass as NULL always anyway).
This commit is contained in:
parent
3d3a91c188
commit
6f70d62855
3 changed files with 300 additions and 326 deletions
|
@ -58,6 +58,12 @@ class MyScanner(Scanner_OSX):
|
|||
if t in OBJECTS and m == "InMode":
|
||||
classname = "Method"
|
||||
listname = t + "_methods"
|
||||
# Special case for the silly first AllocatorRef argument
|
||||
if t == 'CFAllocatorRef' and m == 'InMode' and len(arglist) > 1:
|
||||
t, n, m = arglist[1]
|
||||
if t in OBJECTS and m == "InMode":
|
||||
classname = "MethodSkipArg1"
|
||||
listname = t + "_methods"
|
||||
return classname, listname
|
||||
|
||||
def writeinitialdefs(self):
|
||||
|
@ -85,9 +91,7 @@ class MyScanner(Scanner_OSX):
|
|||
"CFStringGetCharactersPtr",
|
||||
"CFStringGetCString",
|
||||
"CFStringGetCharacters",
|
||||
# OSX only, to be done
|
||||
## "CFURLCreateWithFileSystemPath",
|
||||
## "CFURLCreateStringWithFileSystemPath",
|
||||
"CFURLCreateStringWithFileSystemPath", # Gone in later releases
|
||||
]
|
||||
|
||||
def makegreylist(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue