From: Jack Jansen Date: Mon, 25 Mar 2002 00:32:17 +0000 (+0000) Subject: Weaklink most toolbox modules, improving backward compatibility. Modules will no... X-Git-Tag: v2.3c1~6350 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=714d7268d5dcd9233bb8b3580cd9bce5a5a9fc50;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py index 216185794eca..8ecaeda3cb97 100644 --- a/Mac/Modules/ae/aesupport.py +++ b/Mac/Modules/ae/aesupport.py @@ -77,8 +77,8 @@ AEEventHandlerUPP = EventHandlerProcPtr AlwaysFalse = FakeType("0") -AEFunction = OSErrFunctionGenerator -AEMethod = OSErrMethodGenerator +AEFunction = OSErrWeakLinkFunctionGenerator +AEMethod = OSErrWeakLinkMethodGenerator includestuff = includestuff + """ diff --git a/Mac/Modules/cm/cmsupport.py b/Mac/Modules/cm/cmsupport.py index 6511a3cd579e..0cf7fa118a1e 100644 --- a/Mac/Modules/cm/cmsupport.py +++ b/Mac/Modules/cm/cmsupport.py @@ -109,8 +109,8 @@ module.addobject(ci_object) 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 = [] diff --git a/Mac/Modules/drag/dragsupport.py b/Mac/Modules/drag/dragsupport.py index 3fcc2ab2ff7e..1eaa28e0a293 100644 --- a/Mac/Modules/drag/dragsupport.py +++ b/Mac/Modules/drag/dragsupport.py @@ -214,8 +214,8 @@ object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE) 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 = [] diff --git a/Mac/Modules/evt/evtsupport.py b/Mac/Modules/evt/evtsupport.py index d09403a0856e..c05a3ed200dc 100644 --- a/Mac/Modules/evt/evtsupport.py +++ b/Mac/Modules/evt/evtsupport.py @@ -64,8 +64,8 @@ module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff) ##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 = [] diff --git a/Mac/Modules/fm/fmsupport.py b/Mac/Modules/fm/fmsupport.py index 10d3fce801f5..20ae29235457 100644 --- a/Mac/Modules/fm/fmsupport.py +++ b/Mac/Modules/fm/fmsupport.py @@ -70,7 +70,7 @@ FMetricRecPtr = OpaqueType('FMetricRec', 'FMRec') 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 = [] diff --git a/Mac/Modules/icn/icnsupport.py b/Mac/Modules/icn/icnsupport.py index 52d075d8cf5e..242428e581d5 100644 --- a/Mac/Modules/icn/icnsupport.py +++ b/Mac/Modules/icn/icnsupport.py @@ -75,7 +75,7 @@ module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff) ##module.addobject(object) # Create the generator classes used to populate the lists -Function = OSErrFunctionGenerator +Function = OSErrWeakLinkFunctionGenerator ##Method = OSErrMethodGenerator # Create and populate the lists diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py index 561aefded687..b19533a3c459 100644 --- a/Mac/Modules/qd/qdsupport.py +++ b/Mac/Modules/qd/qdsupport.py @@ -548,8 +548,8 @@ module.addobject(qd_object) # Create the generator classes used to populate the lists -Function = OSErrFunctionGenerator -Method = OSErrMethodGenerator +Function = OSErrWeakLinkFunctionGenerator +Method = OSErrWeakLinkMethodGenerator # Create and populate the lists functions = [] diff --git a/Mac/Modules/qdoffs/qdoffssupport.py b/Mac/Modules/qdoffs/qdoffssupport.py index 3e0337e143d4..057f0a96ce36 100644 --- a/Mac/Modules/qdoffs/qdoffssupport.py +++ b/Mac/Modules/qdoffs/qdoffssupport.py @@ -83,8 +83,8 @@ 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 = [] diff --git a/Mac/Modules/qt/qtsupport.py b/Mac/Modules/qt/qtsupport.py index 2d66327b2a58..c6525c08941b 100644 --- a/Mac/Modules/qt/qtsupport.py +++ b/Mac/Modules/qt/qtsupport.py @@ -254,8 +254,8 @@ module.addobject(Track_object) 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 = [] diff --git a/Mac/Modules/te/tesupport.py b/Mac/Modules/te/tesupport.py index 6aa5a659be27..a77250c65690 100644 --- a/Mac/Modules/te/tesupport.py +++ b/Mac/Modules/te/tesupport.py @@ -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