summaryrefslogtreecommitdiffstats
path: root/Include/compile.h
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 /Include/compile.h
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 'Include/compile.h')
-rw-r--r--Include/compile.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Include/compile.h b/Include/compile.h
index 92b34d8..a447852 100644
--- a/Include/compile.h
+++ b/Include/compile.h
@@ -1,6 +1,6 @@
/***********************************************************
-Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
-Netherlands.
+Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
+Amsterdam, The Netherlands.
All Rights Reserved
@@ -28,7 +28,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* An intermediate code fragment contains:
- a string that encodes the instructions,
- a list of the constants,
- - and a list of the names used. */
+ - a list of the names used,
+ - the filename from which it was compiled,
+ - the name of the object for which it was compiled. */
typedef struct {
OB_HEAD
@@ -36,6 +38,7 @@ typedef struct {
object *co_consts; /* list of immutable constant objects */
object *co_names; /* list of stringobjects */
object *co_filename; /* string */
+ object *co_name; /* string */
} codeobject;
extern typeobject Codetype;
@@ -46,4 +49,5 @@ extern typeobject Codetype;
/* Public interface */
struct _node; /* Declare the existence of this type */
codeobject *compile PROTO((struct _node *, char *));
-codeobject *newcodeobject PROTO((object *, object *, object *, object *));
+codeobject *newcodeobject
+ PROTO((object *, object *, object *, object *, object *));