From 714d7268d5dcd9233bb8b3580cd9bce5a5a9fc50 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 25 Mar 2002 00:32:17 +0000 Subject: 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 2161857..8ecaeda 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 6511a3c..0cf7fa1 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 3fcc2ab..1eaa28e 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 d09403a..c05a3ed 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 10d3fce..20ae292 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 52d075d..242428e 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 561aefd..b19533a 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 3e0337e..057f0a9 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 2d66327..c6525c0 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 6aa5a65..a77250c 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 -- cgit v0.12