1.1 --- a/micropython/__init__.py Sun Apr 06 21:26:06 2008 +0200
1.2 +++ b/micropython/__init__.py Mon Apr 07 02:20:21 2008 +0200
1.3 @@ -175,6 +175,11 @@
1.4 image.append(obj)
1.5 pos += 1
1.6
1.7 + # Append any default values to the image.
1.8 +
1.9 + image += obj.default_attrs
1.10 + pos += len(obj.default_attrs)
1.11 +
1.12 # Append the function code to the image.
1.13
1.14 obj.code_location = pos
1.15 @@ -182,6 +187,12 @@
1.16 image += code
1.17 pos += len(code)
1.18
1.19 + # Generate the default initialisation code.
1.20 +
1.21 + code = trans.get_default_code(obj)
1.22 + image += code
1.23 + pos += len(code)
1.24 +
1.25 # Remember the position of the module code.
1.26
1.27 module.code_location = pos