Commit 714d7268 authored by Jack Jansen's avatar Jack Jansen

Weaklink most toolbox modules, improving backward compatibility. Modules will...

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.
parent cddc1a02
...@@ -77,8 +77,8 @@ AEEventHandlerUPP = EventHandlerProcPtr ...@@ -77,8 +77,8 @@ AEEventHandlerUPP = EventHandlerProcPtr
AlwaysFalse = FakeType("0") AlwaysFalse = FakeType("0")
AEFunction = OSErrFunctionGenerator AEFunction = OSErrWeakLinkFunctionGenerator
AEMethod = OSErrMethodGenerator AEMethod = OSErrWeakLinkMethodGenerator
includestuff = includestuff + """ includestuff = includestuff + """
......
...@@ -109,8 +109,8 @@ module.addobject(ci_object) ...@@ -109,8 +109,8 @@ module.addobject(ci_object)
module.addobject(c_object) module.addobject(c_object)
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
Method = OSErrMethodGenerator Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists # Create and populate the lists
functions = [] functions = []
......
...@@ -214,8 +214,8 @@ object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE) ...@@ -214,8 +214,8 @@ object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
module.addobject(object) module.addobject(object)
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
Method = OSErrMethodGenerator Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists # Create and populate the lists
functions = [] functions = []
......
...@@ -64,8 +64,8 @@ module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff) ...@@ -64,8 +64,8 @@ module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
##module.addobject(object) ##module.addobject(object)
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
##Method = OSErrMethodGenerator ##Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists # Create and populate the lists
functions = [] functions = []
......
...@@ -70,7 +70,7 @@ FMetricRecPtr = OpaqueType('FMetricRec', 'FMRec') ...@@ -70,7 +70,7 @@ FMetricRecPtr = OpaqueType('FMetricRec', 'FMRec')
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff) module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
# Create and populate the lists # Create and populate the lists
functions = [] functions = []
......
...@@ -75,7 +75,7 @@ module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff) ...@@ -75,7 +75,7 @@ module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
##module.addobject(object) ##module.addobject(object)
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
##Method = OSErrMethodGenerator ##Method = OSErrMethodGenerator
# Create and populate the lists # Create and populate the lists
......
...@@ -548,8 +548,8 @@ module.addobject(qd_object) ...@@ -548,8 +548,8 @@ module.addobject(qd_object)
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
Method = OSErrMethodGenerator Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists # Create and populate the lists
functions = [] functions = []
......
...@@ -83,8 +83,8 @@ module.addobject(object) ...@@ -83,8 +83,8 @@ module.addobject(object)
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
Method = OSErrMethodGenerator Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists # Create and populate the lists
functions = [] functions = []
......
...@@ -254,8 +254,8 @@ module.addobject(Track_object) ...@@ -254,8 +254,8 @@ module.addobject(Track_object)
module.addobject(Movie_object) module.addobject(Movie_object)
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
Method = OSErrMethodGenerator Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists # Create and populate the lists
functions = [] functions = []
......
...@@ -79,7 +79,7 @@ initstuff = initstuff + """ ...@@ -79,7 +79,7 @@ initstuff = initstuff + """
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert); PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
""" """
class TEMethodGenerator(OSErrMethodGenerator): class TEMethodGenerator(OSErrWeakLinkMethodGenerator):
"""Similar to MethodGenerator, but has self as last argument""" """Similar to MethodGenerator, but has self as last argument"""
def parseArgumentList(self, args): def parseArgumentList(self, args):
...@@ -150,7 +150,7 @@ object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE) ...@@ -150,7 +150,7 @@ object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE)
module.addobject(object) module.addobject(object)
# Create the generator classes used to populate the lists # Create the generator classes used to populate the lists
Function = OSErrFunctionGenerator Function = OSErrWeakLinkFunctionGenerator
Method = TEMethodGenerator Method = TEMethodGenerator
# Create and populate the lists # Create and populate the lists
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment