Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 714d726

Browse files
committed
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.
1 parent cddc1a0 commit 714d726

10 files changed

Lines changed: 18 additions & 18 deletions

File tree

Mac/Modules/ae/aesupport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def passInput(self, name):
7777
AlwaysFalse = FakeType("0")
7878

7979

80-
AEFunction = OSErrFunctionGenerator
81-
AEMethod = OSErrMethodGenerator
80+
AEFunction = OSErrWeakLinkFunctionGenerator
81+
AEMethod = OSErrWeakLinkMethodGenerator
8282

8383

8484
includestuff = includestuff + """

Mac/Modules/cm/cmsupport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def outputCheckConvertArg(self):
109109
module.addobject(c_object)
110110

111111
# Create the generator classes used to populate the lists
112-
Function = OSErrFunctionGenerator
113-
Method = OSErrMethodGenerator
112+
Function = OSErrWeakLinkFunctionGenerator
113+
Method = OSErrWeakLinkMethodGenerator
114114

115115
# Create and populate the lists
116116
functions = []

Mac/Modules/drag/dragsupport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ def outputInitStructMembers(self):
214214
module.addobject(object)
215215

216216
# Create the generator classes used to populate the lists
217-
Function = OSErrFunctionGenerator
218-
Method = OSErrMethodGenerator
217+
Function = OSErrWeakLinkFunctionGenerator
218+
Method = OSErrWeakLinkMethodGenerator
219219

220220
# Create and populate the lists
221221
functions = []

Mac/Modules/evt/evtsupport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def outputCheckConvertArg(self):
6464
##module.addobject(object)
6565

6666
# Create the generator classes used to populate the lists
67-
Function = OSErrFunctionGenerator
68-
##Method = OSErrMethodGenerator
67+
Function = OSErrWeakLinkFunctionGenerator
68+
##Method = OSErrWeakLinkMethodGenerator
6969

7070
# Create and populate the lists
7171
functions = []

Mac/Modules/fm/fmsupport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def passInput(self, name):
7070
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
7171

7272
# Create the generator classes used to populate the lists
73-
Function = OSErrFunctionGenerator
73+
Function = OSErrWeakLinkFunctionGenerator
7474

7575
# Create and populate the lists
7676
functions = []

Mac/Modules/icn/icnsupport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def outputCheckConvertArg(self):
7575
##module.addobject(object)
7676

7777
# Create the generator classes used to populate the lists
78-
Function = OSErrFunctionGenerator
78+
Function = OSErrWeakLinkFunctionGenerator
7979
##Method = OSErrMethodGenerator
8080

8181
# Create and populate the lists

Mac/Modules/qd/qdsupport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ def outputGetattrHook(self):
548548

549549

550550
# Create the generator classes used to populate the lists
551-
Function = OSErrFunctionGenerator
552-
Method = OSErrMethodGenerator
551+
Function = OSErrWeakLinkFunctionGenerator
552+
Method = OSErrWeakLinkMethodGenerator
553553

554554
# Create and populate the lists
555555
functions = []

Mac/Modules/qdoffs/qdoffssupport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def outputFreeIt(self, itselfname):
8383

8484

8585
# Create the generator classes used to populate the lists
86-
Function = OSErrFunctionGenerator
87-
Method = OSErrMethodGenerator
86+
Function = OSErrWeakLinkFunctionGenerator
87+
Method = OSErrWeakLinkMethodGenerator
8888

8989
# Create and populate the lists
9090
functions = []

Mac/Modules/qt/qtsupport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ def outputFreeIt(self, itselfname):
254254
module.addobject(Movie_object)
255255

256256
# Create the generator classes used to populate the lists
257-
Function = OSErrFunctionGenerator
258-
Method = OSErrMethodGenerator
257+
Function = OSErrWeakLinkFunctionGenerator
258+
Method = OSErrWeakLinkMethodGenerator
259259

260260
# Create and populate the lists
261261
functions = []

Mac/Modules/te/tesupport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
8080
"""
8181

82-
class TEMethodGenerator(OSErrMethodGenerator):
82+
class TEMethodGenerator(OSErrWeakLinkMethodGenerator):
8383
"""Similar to MethodGenerator, but has self as last argument"""
8484

8585
def parseArgumentList(self, args):
@@ -150,7 +150,7 @@ def outputGetattrHook(self):
150150
module.addobject(object)
151151

152152
# Create the generator classes used to populate the lists
153-
Function = OSErrFunctionGenerator
153+
Function = OSErrWeakLinkFunctionGenerator
154154
Method = TEMethodGenerator
155155

156156
# Create and populate the lists

0 commit comments

Comments
 (0)