summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-03-29 10:43:31 (GMT)
committerGuido van Rossum <guido@python.org>1993-03-29 10:43:31 (GMT)
commit9bfef44d97d1ae24e03717e3d59024b44626a9de (patch)
tree736b9f406d27f9dc4496f103cd395fb7a97401d4 /Python/marshal.c
parent4b1302bd1d211881178618aa8f41fa4460180f2e (diff)
downloadcpython-9bfef44d97d1ae24e03717e3d59024b44626a9de.zip
cpython-9bfef44d97d1ae24e03717e3d59024b44626a9de.tar.gz
cpython-9bfef44d97d1ae24e03717e3d59024b44626a9de.tar.bz2
* Changed all copyright messages to include 1993.
* Stubs for faster implementation of local variables (not yet finished) * Added function name to code object. Print it for code and function objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version number has changed accordingly) * Print address of self for built-in methods * New internal functions getattro and setattro (getattr/setattr with string object arg) * Replaced "dictobject" with more powerful "mappingobject" * New per-type functio tp_hash to implement arbitrary object hashing, and hashobject() to interface to it * Added built-in functions hash(v) and hasattr(v, 'name') * classobject: made some functions static that accidentally weren't; added __hash__ special instance method to implement hash() * Added proper comparison for built-in methods and functions
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index 268db00..65f7f2d 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -195,6 +195,7 @@ w_object(v, p)
w_object(co->co_consts, p);
w_object(co->co_names, p);
w_object(co->co_filename, p);
+ w_object(co->co_name, p);
}
else {
w_byte(TYPE_UNKNOWN, p);
@@ -384,9 +385,10 @@ r_object(p)
object *consts = r_object(p);
object *names = r_object(p);
object *filename = r_object(p);
+ object *name = r_object(p);
if (!err_occurred()) {
v = (object *) newcodeobject(code,
- consts, names, filename);
+ consts, names, filename, name);
}
else
v = NULL;