1.1 --- a/micropython/data.py Mon Apr 27 02:20:22 2009 +0200
1.2 +++ b/micropython/data.py Fri May 01 01:02:20 2009 +0200
1.3 @@ -459,10 +459,9 @@
1.4 return [
1.5 DataObject(
1.6 objtable.as_list().get_code(self.value_type_name()),
1.7 - objtable.get_index(self.value_type_name()),
1.8 + objtable.get_index(self.value_type_name()), # is instance
1.9 None,
1.10 None,
1.11 - 1, # instance
1.12 self.value_type_name(),
1.13 1 # size
1.14 )
1.15 @@ -573,12 +572,13 @@
1.16 # Template instance...
1.17
1.18 DataObject(
1.19 - classcode, attrcode, call_method_code_location,
1.20 + classcode,
1.21 + attrcode, # is instance
1.22 + call_method_code_location,
1.23 (
1.24 call_method_value and len(call_method_value.positional_names),
1.25 call_method_value and len(call_method_value.defaults)
1.26 ),
1.27 - 1, # instance
1.28 self.full_name(),
1.29 len(self.instance_attributes()) + 1 # size
1.30 ),
1.31 @@ -586,12 +586,13 @@
1.32 # Class...
1.33
1.34 DataObject(
1.35 - classcode, attrcode, instantiator_code_location,
1.36 + classcode,
1.37 + None, # is not instance
1.38 + instantiator_code_location,
1.39 (
1.40 len(self.get_instantiator().positional_names),
1.41 len(self.get_instantiator().defaults)
1.42 ),
1.43 - 0, # not instance
1.44 self.full_name(),
1.45 len(self.class_attributes()) + 1 # size
1.46 )
1.47 @@ -968,13 +969,12 @@
1.48 return [
1.49 DataObject(
1.50 objtable.as_list().get_code("__builtins__.function"),
1.51 - objtable.get_index("__builtins__.function"),
1.52 + objtable.get_index("__builtins__.function"), # is instance
1.53 self.code_location,
1.54 (
1.55 len(self.positional_names),
1.56 len(self.defaults)
1.57 ),
1.58 - 1, # instance
1.59 "__builtins__.function",
1.60 len(self.defaults) + 1, # size
1.61 paramtable.as_list().get_code(self.full_name())
1.62 @@ -1173,10 +1173,9 @@
1.63 return [
1.64 DataObject(
1.65 objtable.as_list().get_code(self.full_name()),
1.66 - None, # module name not used as an attribute
1.67 + None, # NOTE: module name not used as an attribute, but should be instance
1.68 None,
1.69 None,
1.70 - 1, # instance
1.71 self.full_name(),
1.72 len(self.module_attributes()) + 1 # size
1.73 )