*** empty log message ***

This commit is contained in:
Joe Shochet 2001-02-07 17:52:03 +00:00
parent 8d3665d4e6
commit f20c160c06

View File

@ -130,15 +130,17 @@ def copyFuncs(fromClass, toClass):
for key in fromClass.__dict__.keys(): for key in fromClass.__dict__.keys():
value = fromClass.__dict__[key] value = fromClass.__dict__[key]
if (type(value) == types.FunctionType): if (type(value) == types.FunctionType):
oldFunc = toClass.__dict__[key]
newFunc = value newFunc = value
# Look in the messenger to see if this old function pointer # See if we already have a function with this name
# is stored, and update it to the new function pointer if toClass.__dict__.has_key(key):
replaceMessengerFunc(oldFunc, newFunc) # Look in the messenger to see if this old function pointer
# is stored, and update it to the new function pointer
oldFunc = toClass.__dict__[key]
replaceMessengerFunc(oldFunc, newFunc)
toClass.__dict__[key] = newFunc toClass.__dict__[key] = newFunc
def replaceMessengerFunc(oldFunc, newFunc): def replaceMessengerFunc(oldFunc, newFunc):
res = messenger.replaceMethod(oldFunc, newFunc) res = messenger.replaceMethod(oldFunc, newFunc)
if res: if res:
print ('messenger replaced function: ' + newFunc.__name__) print ('replaced messenger function: ' + newFunc.__name__)