From 714d7268d5dcd9233bb8b3580cd9bce5a5a9fc50 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 25 Mar 2002 00:32:17 +0000 Subject: [PATCH] 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. --- Mac/Modules/ae/aesupport.py | 4 ++-- Mac/Modules/cm/cmsupport.py | 4 ++-- Mac/Modules/drag/dragsupport.py | 4 ++-- Mac/Modules/evt/evtsupport.py | 4 ++-- Mac/Modules/fm/fmsupport.py | 2 +- Mac/Modules/icn/icnsupport.py | 2 +- Mac/Modules/qd/qdsupport.py | 4 ++-- Mac/Modules/qdoffs/qdoffssupport.py | 4 ++-- Mac/Modules/qt/qtsupport.py | 4 ++-- Mac/Modules/te/tesupport.py | 4 ++-- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py index 216185794ec..8ecaeda3cb9 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 6511a3cd579..0cf7fa118a1 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 3fcc2ab2ff7..1eaa28e0a29 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 d09403a0856..c05a3ed200d 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 10d3fce801f..20ae2923545 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 52d075d8cf5..242428e581d 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 561aefded68..b19533a3c45 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 3e0337e143d..057f0a96ce3 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 2d66327b2a5..c6525c08941 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 6aa5a659be2..a77250c6569 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