1.1 --- a/annotate.py Mon Jan 22 01:29:15 2007 +0100
1.2 +++ b/annotate.py Wed Jan 24 00:46:27 2007 +0100
1.3 @@ -450,7 +450,6 @@
1.4 if isinstance(attr.type, Class):
1.5
1.6 # Instantiate the class.
1.7 - # NOTE: Should probably only allocate a single instance.
1.8
1.9 instance = self.new_instance(invoke, "new", attr.type.full_name(), attr.type)
1.10
1.11 @@ -917,13 +916,15 @@
1.12
1.13 # Test to see if anything has changed.
1.14
1.15 - if hasattr(invoke, "syscount") and invoke.syscount == self.system.count:
1.16 + if hasattr(invoke, "syscount") and invoke.syscount.has_key(target) and invoke.syscount[target] == self.system.count:
1.17 return
1.18
1.19 # Remember the state of the system.
1.20
1.21 else:
1.22 - invoke.syscount = self.system.count
1.23 + if not hasattr(invoke, "syscount"):
1.24 + invoke.syscount = {}
1.25 + invoke.syscount[target] = self.system.count
1.26
1.27 # Provide the correct namespace for the invocation.
1.28 # This may be a "shared" namespace...