mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
This commit is contained in:
parent
cddc1a0249
commit
714d7268d5
10 changed files with 18 additions and 18 deletions
|
|
@ -77,8 +77,8 @@ def passInput(self, name):
|
|||
AlwaysFalse = FakeType("0")
|
||||
|
||||
|
||||
AEFunction = OSErrFunctionGenerator
|
||||
AEMethod = OSErrMethodGenerator
|
||||
AEFunction = OSErrWeakLinkFunctionGenerator
|
||||
AEMethod = OSErrWeakLinkMethodGenerator
|
||||
|
||||
|
||||
includestuff = includestuff + """
|
||||
|
|
|
|||
|
|
@ -109,8 +109,8 @@ def outputCheckConvertArg(self):
|
|||
module.addobject(c_object)
|
||||
|
||||
# Create the generator classes used to populate the lists
|
||||
Function = OSErrFunctionGenerator
|
||||
Method = OSErrMethodGenerator
|
||||
Function = OSErrWeakLinkFunctionGenerator
|
||||
Method = OSErrWeakLinkMethodGenerator
|
||||
|
||||
# Create and populate the lists
|
||||
functions = []
|
||||
|
|
|
|||
|
|
@ -214,8 +214,8 @@ def outputInitStructMembers(self):
|
|||
module.addobject(object)
|
||||
|
||||
# Create the generator classes used to populate the lists
|
||||
Function = OSErrFunctionGenerator
|
||||
Method = OSErrMethodGenerator
|
||||
Function = OSErrWeakLinkFunctionGenerator
|
||||
Method = OSErrWeakLinkMethodGenerator
|
||||
|
||||
# Create and populate the lists
|
||||
functions = []
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ def outputCheckConvertArg(self):
|
|||
##module.addobject(object)
|
||||
|
||||
# Create the generator classes used to populate the lists
|
||||
Function = OSErrFunctionGenerator
|
||||
##Method = OSErrMethodGenerator
|
||||
Function = OSErrWeakLinkFunctionGenerator
|
||||
##Method = OSErrWeakLinkMethodGenerator
|
||||
|
||||
# Create and populate the lists
|
||||
functions = []
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ def passInput(self, name):
|
|||
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
|
||||
|
||||
# Create the generator classes used to populate the lists
|
||||
Function = OSErrFunctionGenerator
|
||||
Function = OSErrWeakLinkFunctionGenerator
|
||||
|
||||
# Create and populate the lists
|
||||
functions = []
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ def outputCheckConvertArg(self):
|
|||
##module.addobject(object)
|
||||
|
||||
# Create the generator classes used to populate the lists
|
||||
Function = OSErrFunctionGenerator
|
||||
Function = OSErrWeakLinkFunctionGenerator
|
||||
##Method = OSErrMethodGenerator
|
||||
|
||||
# Create and populate the lists
|
||||
|
|
|
|||
|
|
@ -548,8 +548,8 @@ def outputGetattrHook(self):
|
|||
|
||||
|
||||
# Create the generator classes used to populate the lists
|
||||
Function = OSErrFunctionGenerator
|
||||
Method = OSErrMethodGenerator
|
||||
Function = OSErrWeakLinkFunctionGenerator
|
||||
Method = OSErrWeakLinkMethodGenerator
|
||||
|
||||
# Create and populate the lists
|
||||
functions = []
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ def outputFreeIt(self, itselfname):
|
|||
|
||||
|
||||
# Create the generator classes used to populate the lists
|
||||
Function = OSErrFunctionGenerator
|
||||
Method = OSErrMethodGenerator
|
||||
Function = OSErrWeakLinkFunctionGenerator
|
||||
Method = OSErrWeakLinkMethodGenerator
|
||||
|
||||
# Create and populate the lists
|
||||
functions = []
|
||||
|
|
|
|||
|
|
@ -254,8 +254,8 @@ def outputFreeIt(self, itselfname):
|
|||
module.addobject(Movie_object)
|
||||
|
||||
# Create the generator classes used to populate the lists
|
||||
Function = OSErrFunctionGenerator
|
||||
Method = OSErrMethodGenerator
|
||||
Function = OSErrWeakLinkFunctionGenerator
|
||||
Method = OSErrWeakLinkMethodGenerator
|
||||
|
||||
# Create and populate the lists
|
||||
functions = []
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
|
||||
"""
|
||||
|
||||
class TEMethodGenerator(OSErrMethodGenerator):
|
||||
class TEMethodGenerator(OSErrWeakLinkMethodGenerator):
|
||||
"""Similar to MethodGenerator, but has self as last argument"""
|
||||
|
||||
def parseArgumentList(self, args):
|
||||
|
|
@ -150,7 +150,7 @@ def outputGetattrHook(self):
|
|||
module.addobject(object)
|
||||
|
||||
# Create the generator classes used to populate the lists
|
||||
Function = OSErrFunctionGenerator
|
||||
Function = OSErrWeakLinkFunctionGenerator
|
||||
Method = TEMethodGenerator
|
||||
|
||||
# Create and populate the lists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue