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:
Jack Jansen 2002-03-25 00:32:17 +00:00
parent cddc1a0249
commit 714d7268d5
10 changed files with 18 additions and 18 deletions

View file

@ -79,7 +79,7 @@ initstuff = initstuff + """
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 @@ object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
module.addobject(object)
# Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator
Function = OSErrWeakLinkFunctionGenerator
Method = TEMethodGenerator
# Create and populate the lists