# HG changeset patch # User Paul Boddie # Date 1243189736 -7200 # Node ID 8c504f98e45fd707cd68d9a42561aed9b8626e61 # Parent 44279e9276d6d31cb367c6b3ea1f701956478002 Changed the interface to functions and instantiators to expose the body block (after argument checking) instead of an explicit location. diff -r 44279e9276d6 -r 8c504f98e45f micropython/data.py --- a/micropython/data.py Sun May 24 19:03:03 2009 +0200 +++ b/micropython/data.py Sun May 24 20:28:56 2009 +0200 @@ -594,8 +594,8 @@ ) ] - def get_direct_invocation_location(self): - return self.get_instantiator().blocks[0].location + def get_body_block(self): + return self.get_instantiator().blocks[0] # Namespace-related methods. @@ -975,8 +975,8 @@ ) ] - def get_direct_invocation_location(self): - return self.body_block.location + def get_body_block(self): + return self.body_block # Namespace-related methods. diff -r 44279e9276d6 -r 8c504f98e45f micropython/rsvp.py --- a/micropython/rsvp.py Sun May 24 19:03:03 2009 +0200 +++ b/micropython/rsvp.py Sun May 24 20:28:56 2009 +0200 @@ -136,7 +136,7 @@ return "%s(%r) # %r" % (self.__class__.__name__, self.get_operand(), name(self.attr)) def get_operand(self): - return self.attr.get_direct_invocation_location() + return self.attr.get_body_block().location Target = TargetInstruction