[Subversion] / RuleDispatch / src / dispatch / functions.py  

Diff of /RuleDispatch/src/dispatch/functions.py

Parent Directory | Revision Log

version 2286, Sat Feb 24 21:43:33 2007 UTC version 2287, Sat Feb 24 21:51:43 2007 UTC
Line 4 
Line 4 
 from dispatch.interfaces import *  from dispatch.interfaces import *
   
 import protocols, inspect, sys, dispatch  import protocols, inspect, sys, dispatch
 from protocols.advice import add_assignment_advisor,getFrameInfo,addClassAdvisor  from peak.util.decorators import decorate_assignment, frameinfo, decorate_class
 from protocols.interfaces import allocate_lock  from protocols.interfaces import allocate_lock
 from new import instancemethod  from new import instancemethod
 from types import FunctionType, ClassType, InstanceType  from types import FunctionType, ClassType, InstanceType
Line 76 
Line 76 
             if old_locals.get(name) is func:              if old_locals.get(name) is func:
                 return func                  return func
             return value              return value
         return add_assignment_advisor(callback)          return decorate_assignment(callback)
   
   
   
Line 582 
Line 582 
             else:              else:
                 func = qualifier,value                  func = qualifier,value
   
             kind,module,locals_,globals_ = getFrameInfo(frm)              kind,module,locals_,globals_ = frameinfo(frm)
             if kind=='class':              if kind=='class':
                 # 'when()' in class body; defer adding the method                  # 'when()' in class body; defer adding the method
                 def registerClassSpecificMethod(cls):                  def registerClassSpecificMethod(cls):
Line 592 
Line 592 
                     self.addMethod(req & cond, func)                      self.addMethod(req & cond, func)
                     return cls                      return cls
   
                 addClassAdvisor(registerClassSpecificMethod,frame=frm)                  decorate_class(registerClassSpecificMethod,frame=frm)
             else:              else:
                 self.addMethod(cond,func)                  self.addMethod(cond,func)
   
Line 601 
Line 601 
   
             return value              return value
   
         return add_assignment_advisor(registerMethod,frame=frame)          return decorate_assignment(registerMethod,frame=frame)
   
   
   


Generate output suitable for use with a patch program
Legend:
Removed from v.2286  
changed lines
  Added in v.2287

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help