]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
* Changed all copyright messages to include 1993.
authorGuido van Rossum <guido@python.org>
Mon, 29 Mar 1993 10:43:31 +0000 (10:43 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 29 Mar 1993 10:43:31 +0000 (10:43 +0000)
* 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

97 files changed:
Include/assert.h
Include/bitset.h
Include/bltinmodule.h
Include/ceval.h
Include/cgensupport.h
Include/classobject.h
Include/compile.h
Include/dictobject.h
Include/errcode.h
Include/errors.h
Include/eval.h
Include/fileobject.h
Include/floatobject.h
Include/frameobject.h
Include/funcobject.h
Include/grammar.h
Include/intobject.h
Include/intrcheck.h
Include/listobject.h
Include/longintrepr.h
Include/longobject.h
Include/marshal.h
Include/metagrammar.h
Include/methodobject.h
Include/moduleobject.h
Include/mymalloc.h
Include/myselect.h
Include/node.h
Include/object.h
Include/objimpl.h
Include/opcode.h
Include/osdefs.h
Include/parsetok.h
Include/pgenheaders.h
Include/pyerrors.h
Include/pythonrun.h
Include/structmember.h
Include/sysmodule.h
Include/token.h
Include/traceback.h
Include/tupleobject.h
Modules/cdmodule.c
Modules/cgensupport.c
Modules/cgensupport.h
Modules/config.c.in
Modules/dbmmodule.c
Modules/fcntlmodule.c
Modules/imgfile.c
Modules/sgimodule.c
Modules/stropmodule.c
Modules/structmodule.c
Modules/sunaudiodev.c
Objects/classobject.c
Objects/dictobject.c
Objects/floatobject.c
Objects/frameobject.c
Objects/funcobject.c
Objects/intobject.c
Objects/longobject.c
Objects/mappingobject.c
Objects/methodobject.c
Objects/moduleobject.c
Objects/object.c
Objects/stringobject.c
Objects/tupleobject.c
Objects/typeobject.c
Parser/acceler.c
Parser/assert.h
Parser/bitset.c
Parser/firstsets.c
Parser/grammar.c
Parser/grammar1.c
Parser/intrcheck.c
Parser/listnode.c
Parser/metagrammar.c
Parser/node.c
Parser/parser.c
Parser/parser.h
Parser/pgen.c
Parser/pgen.h
Parser/pgenmain.c
Parser/printgrammar.c
Parser/tokenizer.c
Parser/tokenizer.h
Python/bltinmodule.c
Python/ceval.c
Python/cgensupport.c
Python/compile.c
Python/fmod.c
Python/getcwd.c
Python/import.c
Python/marshal.c
Python/pythonmain.c
Python/pythonrun.c
Python/strerror.c
Python/structmember.c
Python/traceback.c

index 32d78bbd286114ac019e7e1cc56b1661f8e4bf9c..ac9c5d2c0e5efd1864d4970219afc8e98fd6c6c7 100644 (file)
@@ -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
 
index d0761486ec9e41493ce51a2b0de6e6176fd9e709..07b64b0a64c2de5778388be1aee0100a40c927e2 100644 (file)
@@ -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
 
index dace6c59ed72b5ad6cfcd1a81cb1b801eedd31b7..f162af1a569b34879b7b2c1a91ec39830aa0a0ad 100644 (file)
@@ -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
 
index e7281f4615c9007db8b2ff12c58ffe590bcdae4f..bec668126359d6725e683a95dffcc128db84a135 100644 (file)
@@ -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
 
index c2598f84d1c6bea6d32223e9a9b5b51a90b86de2..5c2cbd4cfa5996b22a33d4792a09186ca4986ba3 100644 (file)
@@ -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
 
index b33cacce61f5b225ca79db9b2dba3afd6605b36b..88b955a4159e871efadcb9704b98615a011c4210 100644 (file)
@@ -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
 
index 92b34d881988d8f98eabdc8e767ceee3f848fa2e..a4478528d7d3fda8b75e4901b2d7dc4d83e9610d 100644 (file)
@@ -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 *));
index 2c5d53949868bf468e47f0e72c2661d375fcd73e..ce71570ab44dfc83bcb002b56af240362a7afaed 100644 (file)
@@ -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
 
@@ -22,28 +22,23 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ******************************************************************/
 
-/*
-Dictionary object type -- mapping from char * to object.
-NB: the key is given as a char *, not as a stringobject.
-These functions set errno for errors.  Functions dictremove() and
-dictinsert() return nonzero for errors, getdictsize() returns -1,
-the others NULL.  A successful call to dictinsert() calls INCREF()
-for the inserted item.
-*/
+/* All in the sake of backward compatibility... */
 
-extern typeobject Dicttype;
+#include "mappingobject.h"
 
-#define is_dictobject(op) ((op)->ob_type == &Dicttype)
+#define is_dictobject(op) is_mappingobject(op)
+
+#define newdictobject newmappingobject
 
-extern object *newdictobject PROTO((void));
 extern object *dictlookup PROTO((object *dp, char *key));
 extern int dictinsert PROTO((object *dp, char *key, object *item));
 extern int dictremove PROTO((object *dp, char *key));
-extern int getdictsize PROTO((object *dp));
 extern char *getdictkey PROTO((object *dp, int i));
-extern object *getdictkeys PROTO((object *dp));
 
-extern object *getdict2key PROTO((object *dp, int i));
-extern object *dict2lookup PROTO((object *dp, object *key));
-extern int dict2insert PROTO((object *dp, object *key, object *item));
-extern int dict2remove PROTO((object *dp, object *key));
+#define getdictsize getmappingsize
+#define getdictkeys getmappingkeys
+
+#define getdict2key getmappingkey
+#define dict2lookup mappinglookup
+#define dict2insert mappinginsert
+#define dict2remove mappingremove
index 33d65c239481d97ac5b9c2c507b3e42c4860fb9d..1439c7bf9931ac7dcc53f053bda301e3620bf355 100644 (file)
@@ -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
 
index 5a2a00a650d0150acf4425afbd9fad8c26924098..f2d7b1acb49552f0a036c2bb922550d96d55ed44 100755 (executable)
@@ -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
 
index da4bbde60057ba26d05506a4da0848fa589944b6..8ac672f3a0508ac0336b7ee9078382ee70d67bb0 100644 (file)
@@ -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
 
index 7bce698cf8eb61496074951b8be849ed8d498ee5..ee2201fa65f6532449c10fcccf0d8c526cdc1b86 100644 (file)
@@ -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
 
index 9ea3e0171e0591cfa9085365baafdc3e70a32c99..9a70c3b73f2dab85c7c845a93a1800730ad3ad39 100644 (file)
@@ -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
 
index dd36468ec166ea8bea3a7a3d9136a5c40394fc29..4d17267b97cf8540d7f82df96451066c1eb760b6 100644 (file)
@@ -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
 
index eef2ce1be63e77af0804ec3313f015fbc4265b1c..d24600d82008e70bad06cacf34565ff38e777949 100644 (file)
@@ -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
 
index 5fd89158bc38de4513294a203bc607d32f9f5177..5aace87dd1e0e3f2608abade031faaa241d2ae5c 100644 (file)
@@ -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
 
index d89abb33b0da1fcf2f55d42c5b23e67c409f6782..ef11c2f0898859fdb8e199a215c70867527a7f1d 100644 (file)
@@ -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
 
index 68d49771e1cfa758f8ccf7d1c7c641938d5fb507..886dbed55094257e4541d8bceaae9a94074185ce 100644 (file)
@@ -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
 
index 710db2dad60f41a2b5d5ad6c50dc4daa471b8df8..519776a23b11b89f240e44757475323c96ecb694 100644 (file)
@@ -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
 
index 84f352401480f6a53d8235634e755d79f9ea80af..7ca69ba76de2d35a5a57d20385089f68629ef914 100644 (file)
@@ -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
 
index c17b2f5924cced5837e0260fc29ba3e56ae94a12..5a8b71576628e22f170fb75a22b08544b40a61e8 100644 (file)
@@ -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
 
index 636357c50f7d884d96729203539b599008c40a40..9b16227af58564846aa7618d7f84fb77c9b8e29b 100644 (file)
@@ -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
 
index 1923996fccebe33aff598b674f1eba5d1d634543..40b7d6c83d826ee49a1db224fff1b9ea118fbf60 100644 (file)
@@ -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
 
index c6c5606bfa4de72d1d865b04239e287c1ae8012d..0cbfd6a98e9b69b593da262c71fd4381bb8ecd05 100644 (file)
@@ -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
 
index 0dfcadac6d086f2af446fa1ff4f9e060a57153c1..bf3c4a42d1112e5116b65ea5fbc053ad8e03741e 100644 (file)
@@ -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
 
index e4315bdb98fef00bee664b776329809f0072c4b4..6259712f0f35dd0571a33c9837363d97acf3f9e5 100644 (file)
@@ -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
 
index 54884adcf0ab821755c23858c4f7671a7c259d9b..3f65243621c03f79dab00d10d249e2783a84b56f 100644 (file)
@@ -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
 
index fa60f5113d820e11d3fce524751361b1d4531194..31bae1be24473fd65fdf62e7ce0a310070b02c28 100644 (file)
@@ -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
 
index f644be3a3d78c49fbfd3617fb54e1915e55a8e1a..ff02bea6d437dba35aca42c26627ff96cb584614 100644 (file)
@@ -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
 
@@ -188,6 +188,10 @@ typedef struct _typeobject {
        number_methods *tp_as_number;
        sequence_methods *tp_as_sequence;
        mapping_methods *tp_as_mapping;
+
+       /* More standard operations (at end for binary compatibility) */
+
+       long (*tp_hash) FPROTO((object *));
 } typeobject;
 
 extern typeobject Typetype; /* The type of type objects */
@@ -199,7 +203,9 @@ extern int printobject PROTO((object *, FILE *, int));
 extern object * reprobject PROTO((object *));
 extern int cmpobject PROTO((object *, object *));
 extern object *getattr PROTO((object *, char *));
-extern int setattr PROTO((object *, char *, object *));
+extern object *getattro PROTO((object *, object *));
+extern int setattro PROTO((object *, object *, object *));
+extern long hashobject PROTO((object *));
 
 /* Flag bits for printing: */
 #define PRINT_RAW      1       /* No string quotes etc. */
index 3d1dceb5a18da0b99fdb71be867da714bfa36b79..683f03e47f3429a9a7664d23af2fea9349e929f3 100644 (file)
@@ -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
 
index a0db342d45c983202d6f6b08fd8ed30263c67ac4..67c0b82e408c46336f01a107c97845efe414d986 100644 (file)
@@ -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
 
@@ -113,6 +113,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #define LOAD_LOCAL     115     /* Index in name list */
 #define LOAD_GLOBAL    116     /* Index in name list */
 
+#define LOAD_FAST      117     /* Local variable number */
+#define STORE_FAST     118     /* Local variable number */
+#define RESERVE_FAST   119     /* Number of local variables */
+
 #define SETUP_LOOP     120     /* Target address (absolute) */
 #define SETUP_EXCEPT   121     /* "" */
 #define SETUP_FINALLY  122     /* "" */
index 773abdffc4077fde5188db66ab829f788abfa14b..939978a6e82d5ceaee19622db4b2b6f73d3ce1ac 100644 (file)
@@ -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
 
index 3e3cc6c2d48f03ee6965337a7a687e5cdc727ba9..623c4d8b1fa1599e5e43e689e7aed0d546eb9067 100644 (file)
@@ -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
 
index 86071420eb91f6b76367b95c5b53a943c2caf403..049e9f4535729372e5c8acf5ad2a3c97f3b911b8 100644 (file)
@@ -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
 
index 5a2a00a650d0150acf4425afbd9fad8c26924098..f2d7b1acb49552f0a036c2bb922550d96d55ed44 100644 (file)
@@ -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
 
index 162a6f74f62367ff1a218693868d4e0bc90d47a4..944137681102e05fc4794d007a7cdc82f31995aa 100644 (file)
@@ -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
 
index 8520863de613386bbba8bf6afed0e8d71a332c32..425300c084e6a3446817ea5a64cc4ee027429065 100644 (file)
@@ -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
 
index e7035946503f07e7ba13d86ee0082e229d6e264b..36a4499b498a90a0f57372d619daf292c51e6204 100644 (file)
@@ -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
 
index ba5717be658e60fcbfd57eb0bd4e8d93460517bb..053ceabedf4376f7d4c2eaa2c3315bc89566e2b0 100644 (file)
@@ -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
 
index 08370e37e21cc3ad3315a86bfccc54e780fc889e..c45526cd202466bc06b736b44a58db57edd83437 100644 (file)
@@ -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
 
index 448fb71d20ab0e7a50ffafce8bb5b9d657e7ee6b..4c8d302bf5678a370103d87c283944ec7a5d23b9 100644 (file)
@@ -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
 
index c0bc3c7d1ac4c57328c9181110b39c0743c91548..27cf35c43a969e6b943bef50d25fc85f57156b13 100644 (file)
@@ -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
 
index a3023ebb9c047ecc80e6d06688580fb907f4c531..5dcac867c75ec49df0f1d91c91c8e4933c0dc92b 100644 (file)
@@ -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
 
index c2598f84d1c6bea6d32223e9a9b5b51a90b86de2..5c2cbd4cfa5996b22a33d4792a09186ca4986ba3 100644 (file)
@@ -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
 
index da74276fb5c2be57c5cd5e2c51515c8146b42327..7dba37ce0c0a86ffdf0393fb5f037de2f237f2d9 100644 (file)
@@ -62,12 +62,12 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #include "patchlevel.h"
 
-#define VERSION "0.9.%d (%s)"
+#define VERSION "0.9.%d BETA (%s)"
 
 #ifdef __DATE__
 #define DATE __DATE__
 #else
-#define DATE ">= 11 Jan 1993"
+#define DATE ">= 27 Mar 1993"
 #endif
 
 #ifdef USE_STDWIN
index 46559798a01c7479ec7b226d203493fcf29878ca..0f368d202f71288c5bb8f01f21dcf769f9101bf5 100644 (file)
@@ -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
 
index d4d48f82d6f9ed40feaa43fc6faba98b6ad786a5..7862b0620430699a7ecc2171e0ed9dfa20e77afc 100644 (file)
@@ -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
 
index 7783083aaf8bc81876566d397fae8d4dde5dd251..a6db0266d2a02adc5a1e1edcf9953e469b74ea01 100644 (file)
@@ -58,7 +58,7 @@ static imgfile_error(str)
 {
     err_setstr(ImgfileError, str);
     error_called = 1;
-    return;    /* To imglib, which will return a failure indictaor */
+    return;    /* To imglib, which will return a failure indicator */
 }
 
 
index 1951ad8bc98508f759504ab3db6dbd9ab157fb6c..b3733846a0dde4acb96167ff866ae4f3bcfb3acb 100644 (file)
@@ -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
 
index f00cfc78b507894153dd81cb2f8bec960613f574..61574426ef8de3e28070f391b87eade35012e9b2 100644 (file)
@@ -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
 
index eaeee5013a25bdb090cea6d3c6272ebda2267520..03e8f1829154d5314395066427a78d5564192c00 100644 (file)
@@ -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
 
index d02041acbff290d63c2df07d2b05aa297b65e7bc..b4470dd85dfeaa21bc5d62a42495fe872de266ae 100644 (file)
@@ -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
 
index 95b85f52a42ad1f4c2614b2dc49b147a3c78dbc6..823e397f7955e4aa0aeee4432047260da5d9592d 100644 (file)
@@ -261,7 +261,7 @@ instance_setattr(inst, name, v)
                return dictinsert(inst->in_attr, name, v);
 }
 
-object *
+static object *
 instance_repr(inst)
        instanceobject *inst;
 {
@@ -280,7 +280,7 @@ instance_repr(inst)
        return res;
 }
 
-int
+static int
 instance_compare(inst, other)
        instanceobject *inst, *other;
 {
@@ -311,7 +311,43 @@ instance_compare(inst, other)
        return outcome;
 }
 
-int
+static long
+instance_hash(inst)
+       instanceobject *inst;
+{
+       object *func;
+       object *res;
+       int outcome;
+
+       func = instance_getattr(inst, "__hash__");
+       if (func == NULL) {
+               /* If there is no __cmp__ method, we hash on the address.
+                  If a __cmp__ method exists, there must be a __hash__. */
+               err_clear();
+               func = instance_getattr(inst, "__cmp__");
+               if (func == NULL)
+                       return (long)inst;
+               err_setstr(TypeError, "unhashable instance");
+               return -1;
+       }
+       res = call_object(func, (object *)NULL);
+       DECREF(func);
+       if (res == NULL)
+               return -1;
+       if (is_intobject(res)) {
+               outcome = getintvalue(res);
+               if (outcome == -1)
+                       outcome = -2;
+       }
+       else {
+               err_setstr(TypeError, "__hash__() should return an int");
+               outcome = -1;
+       }
+       DECREF(res);
+       return outcome;
+}
+
+static int
 instance_length(inst)
        instanceobject *inst;
 {
@@ -339,7 +375,7 @@ instance_length(inst)
        return outcome;
 }
 
-object *
+static object *
 instance_subscript(inst, key)
        instanceobject *inst;
        object *key;
@@ -362,7 +398,7 @@ instance_subscript(inst, key)
        return res;
 }
 
-int
+static int
 instance_ass_subscript(inst, key, value)
        instanceobject*inst;
        object *key;
@@ -395,7 +431,7 @@ instance_ass_subscript(inst, key, value)
        return 0;
 }
 
-mapping_methods instance_as_mapping = {
+static mapping_methods instance_as_mapping = {
        instance_length,        /*mp_length*/
        instance_subscript,     /*mp_subscript*/
        instance_ass_subscript, /*mp_ass_subscript*/
@@ -612,7 +648,7 @@ UNARY(instance_neg, "__neg__")
 UNARY(instance_pos, "__pos__")
 UNARY(instance_abs, "__abs__")
 
-int
+static int
 instance_nonzero(self)
        instanceobject *self;
 {
@@ -739,9 +775,10 @@ typeobject Instancetype = {
        &instance_as_number,    /*tp_as_number*/
        &instance_as_sequence,  /*tp_as_sequence*/
        &instance_as_mapping,   /*tp_as_mapping*/
+       instance_hash,          /*tp_hash*/
 };
 
-object *
+static object *
 instance_convert(inst, methodname)
        object *inst;
        char *methodname;
@@ -837,6 +874,20 @@ instancemethod_compare(a, b)
        return cmp;
 }
 
+static long
+instancemethod_hash(a)
+       instancemethodobject *a;
+{
+       long x, y;
+       x = hashobject(a->im_self);
+       if (x == -1)
+               return -1;
+       y = hashobject(a->im_func);
+       if (y == -1)
+               return -1;
+       return x ^ y;
+}
+
 typeobject Instancemethodtype = {
        OB_HEAD_INIT(&Typetype)
        0,
@@ -852,4 +903,5 @@ typeobject Instancemethodtype = {
        0,                      /*tp_as_number*/
        0,                      /*tp_as_sequence*/
        0,                      /*tp_as_mapping*/
+       instancemethod_hash,    /*tp_hash*/
 };
index 1cfa3082e0fd4561d0f15f87f4599100bc0c0a14..fa66a9d73fc63e011d8dc7def7be9d48cfcc805e 100644 (file)
@@ -24,8 +24,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 /* Mapping object implementation; using a hash table */
 
+/* This file should really be called "dictobject.c", since "mapping"
+  is the generic name for objects with an unorderred arbitrary key
+  set (just like lists are sequences), but since it improves (and was
+  originally derived from) a file by that name I had to change its
+  name.  For the user these objects are still called "dictionaries". */
+
 #include "allobjects.h"
-#include "mappingobject.h"
 #include "modsupport.h"
 
 
@@ -593,7 +598,7 @@ mapping_getattr(mp, name)
 typeobject Mappingtype = {
        OB_HEAD_INIT(&Typetype)
        0,
-       "mapping",
+       "dictionary",
        sizeof(mappingobject),
        0,
        mapping_dealloc,        /*tp_dealloc*/
index e5635837d075f4a95f56e5e7af31f29237a87a4d..8533e0e7be453fee04afaa25fadef57f7169b866 100644 (file)
@@ -145,6 +145,38 @@ float_compare(v, w)
        return (i < j) ? -1 : (i > j) ? 1 : 0;
 }
 
+static long
+float_hash(v)
+       floatobject *v;
+{
+       double intpart, fractpart;
+       int expo;
+       long x;
+       /* This is designed so that Python numbers with the same
+          value hash to the same value, otherwise comparisons
+          of mapping keys will turn out weird */
+       fractpart = modf(v->ob_fval, &intpart);
+       if (fractpart == 0.0) {
+               if (intpart > 0x7fffffffL || -intpart > 0x7fffffffL) {
+                       /* Convert to long int and use its hash... */
+                       object *w = dnewlongobject(v->ob_fval);
+                       if (w == NULL)
+                               return -1;
+                       x = hashobject(w);
+                       DECREF(w);
+                       return x;
+               }
+               x = (long)intpart;
+       }
+       else {
+               fractpart = frexp(fractpart, &expo);
+               x = (long) (intpart + fractpart) ^ expo; /* Rather arbitrary */
+       }
+       if (x == -1)
+               x = -2;
+       return x;
+}
+
 static object *
 float_add(v, w)
        floatobject *v;
@@ -378,4 +410,5 @@ typeobject Floattype = {
        &float_as_number,       /*tp_as_number*/
        0,                      /*tp_as_sequence*/
        0,                      /*tp_as_mapping*/
+       float_hash,             /*tp_hash */
 };
index c7b5ddf58ef7e64c56c22412b2c6a4a3094d0699..cec050249facc2cd346490ad60644be055a5184e 100644 (file)
@@ -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
 
index a779ebbeb218f9ff5b55a14fa6d5af5914648f34..ccf1b29fda62396c330c251ce5ff623238e92d64 100644 (file)
@@ -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
 
@@ -25,7 +25,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 /* Function object implementation */
 
 #include "allobjects.h"
-
+#include "compile.h"
 #include "structmember.h"
 
 typedef struct {
@@ -98,6 +98,17 @@ func_dealloc(op)
        DEL(op);
 }
 
+static object*
+func_repr(op)
+       funcobject *op;
+{
+       char buf[140];
+       sprintf(buf, "<function %.100s at %lx>",
+               getstringvalue(((codeobject*)(op->func_code))->co_name),
+               (long)op);
+       return newstringobject(buf);
+}
+
 typeobject Functype = {
        OB_HEAD_INIT(&Typetype)
        0,
@@ -109,5 +120,5 @@ typeobject Functype = {
        func_getattr,   /*tp_getattr*/
        0,              /*tp_setattr*/
        0,              /*tp_compare*/
-       0,              /*tp_repr*/
+       func_repr,      /*tp_repr*/
 };
index 858458c0848da1e1e2aebe7323794b69f8fed21d..6806f0c109ad2b3f7d7432461360c137ce668641 100644 (file)
@@ -144,6 +144,16 @@ int_compare(v, w)
        return (i < j) ? -1 : (i > j) ? 1 : 0;
 }
 
+static long
+int_hash(v)
+       intobject *v;
+{
+       long x = v -> ob_ival;
+       if (x == -1)
+               x = -2;
+       return x;
+}
+
 static object *
 int_add(v, w)
        intobject *v;
@@ -413,7 +423,7 @@ int_or(v, w)
 
 static object *
 int_int(v)
-       object *v;
+       intobject *v;
 {
        INCREF(v);
        return v;
@@ -421,26 +431,24 @@ int_int(v)
 
 static object *
 int_long(v)
-       object *v;
+       intobject *v;
 {
-       long x = getintvalue(v);
-       return newlongobject(x);
+       return newlongobject((v -> ob_ival));
 }
 
 static object *
 int_float(v)
-       object *v;
+       intobject *v;
 {
-       long x = getintvalue(v);
-       return newfloatobject((double)x);
+       return newfloatobject((double)(v -> ob_ival));
 }
 
 static object *
 int_oct(v)
-       object *v;
+       intobject *v;
 {
        char buf[20];
-       long x = getintvalue(v);
+       long x = v -> ob_ival;
        if (x == 0)
                strcpy(buf, "0");
        else if (x > 0)
@@ -452,10 +460,10 @@ int_oct(v)
 
 static object *
 int_hex(v)
-       object *v;
+       intobject *v;
 {
        char buf[20];
-       long x = getintvalue(v);
+       long x = v -> ob_ival;
        if (x >= 0)
                sprintf(buf, "0x%lx", x);
        else
@@ -463,7 +471,6 @@ int_hex(v)
        return newstringobject(buf);
 }
 
-
 static number_methods int_as_number = {
        int_add,        /*nb_add*/
        int_sub,        /*nb_subtract*/
@@ -505,4 +512,5 @@ typeobject Inttype = {
        &int_as_number, /*tp_as_number*/
        0,              /*tp_as_sequence*/
        0,              /*tp_as_mapping*/
+       &int_hash,      /*tp_hash*/
 };
index 38473e24226b1c0ad51648668ed1304945e5b39a..fb82a1fc88bfc318e5375490fd3554ff57a82db2 100644 (file)
@@ -555,6 +555,7 @@ static void long_dealloc PROTO((object *));
 static int long_print PROTO((object *, FILE *, int));
 static object *long_repr PROTO((object *));
 static int long_compare PROTO((longobject *, longobject *));
+static long long_hash PROTO((longobject *));
 
 static object *long_add PROTO((longobject *, longobject *));
 static object *long_sub PROTO((longobject *, longobject *));
@@ -615,6 +616,35 @@ long_compare(a, b)
        return sign < 0 ? -1 : sign > 0 ? 1 : 0;
 }
 
+static long
+long_hash(v)
+       longobject *v;
+{
+       long x;
+       int i, sign;
+
+       /* This is designed so that Python ints and longs with the
+          same value hash to the same value, otherwise comparisons
+          of mapping keys will turn out weird */
+       i = v->ob_size;
+       sign = 1;
+       x = 0;
+       if (i < 0) {
+               sign = -1;
+               i = -(i);
+       }
+       while (--i >= 0) {
+               /* Force a 32-bit circular shift */
+               x = ((x << SHIFT) & ~MASK) | ((x >> (32-SHIFT)) & MASK);
+               x += v->ob_digit[i];
+       }
+       x = x * sign;
+       if (x == -1)
+               x = -2;
+       return x;
+}
+
+
 /* Add the absolute values of two long integers. */
 
 static longobject *x_add PROTO((longobject *, longobject *));
@@ -1346,4 +1376,6 @@ typeobject Longtype = {
        &long_as_number,/*tp_as_number*/
        0,              /*tp_as_sequence*/
        0,              /*tp_as_mapping*/
+       (long (*) FPROTO((object *)))
+       long_hash,      /*tp_hash*/
 };
index 1cfa3082e0fd4561d0f15f87f4599100bc0c0a14..fa66a9d73fc63e011d8dc7def7be9d48cfcc805e 100644 (file)
@@ -24,8 +24,13 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 /* Mapping object implementation; using a hash table */
 
+/* This file should really be called "dictobject.c", since "mapping"
+  is the generic name for objects with an unorderred arbitrary key
+  set (just like lists are sequences), but since it improves (and was
+  originally derived from) a file by that name I had to change its
+  name.  For the user these objects are still called "dictionaries". */
+
 #include "allobjects.h"
-#include "mappingobject.h"
 #include "modsupport.h"
 
 
@@ -593,7 +598,7 @@ mapping_getattr(mp, name)
 typeobject Mappingtype = {
        OB_HEAD_INIT(&Typetype)
        0,
-       "mapping",
+       "dictionary",
        sizeof(mappingobject),
        0,
        mapping_dealloc,        /*tp_dealloc*/
index d0b29c7ee08e79833e8f3a35a4b988617d26bbb5..d7ba02e7a1d4818714850f47ab432529023090de 100644 (file)
@@ -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
 
@@ -108,11 +108,41 @@ meth_repr(m)
                sprintf(buf, "<built-in function '%.80s'>", m->m_name);
        else
                sprintf(buf,
-                       "<built-in method '%.80s' of some %.80s object>",
-                       m->m_name, m->m_self->ob_type->tp_name);
+                       "<built-in method '%.80s' of %.80s object at %lx>",
+                       m->m_name, m->m_self->ob_type->tp_name,
+                       (long)m->m_self);
        return newstringobject(buf);
 }
 
+static int
+meth_compare(a, b)
+       methodobject *a, *b;
+{
+       if (a->m_self != b->m_self)
+               return cmpobject(a->m_self, b->m_self);
+       if (a->m_meth == b->m_meth)
+               return 0;
+       if (strcmp(a->m_name, b->m_name) < 0)
+               return -1;
+       else
+               return 1;
+}
+
+static long
+meth_hash(a)
+       methodobject *a;
+{
+       long x, y;
+       if (a->m_self == NULL)
+               x = 0;
+       else {
+               x = hashobject(a->m_self);
+               if (x == -1)
+                       return -1;
+       }
+       return x ^ (long) a->m_meth;
+}
+
 typeobject Methodtype = {
        OB_HEAD_INIT(&Typetype)
        0,
@@ -123,11 +153,12 @@ typeobject Methodtype = {
        0,              /*tp_print*/
        0,              /*tp_getattr*/
        0,              /*tp_setattr*/
-       0,              /*tp_compare*/
+       meth_compare,   /*tp_compare*/
        meth_repr,      /*tp_repr*/
        0,              /*tp_as_number*/
        0,              /*tp_as_sequence*/
        0,              /*tp_as_mapping*/
+       meth_hash,      /*tp_hash*/
 };
 
 object *listmethods PROTO((struct methodlist *)); /* Forward */
index 9733a774b91925710fb2251c940ab70dbbbf0cc3..749d872b2594759570c890570c4421080cea747a 100644 (file)
@@ -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
 
index 707dd58eb96ee3254c7e5d452339714a4e0c2ae3..9a8d4b391be430df66a43e93899f3672b305fff5 100644 (file)
@@ -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
 
@@ -165,6 +165,20 @@ cmpobject(v, w)
        return (*tp->tp_compare)(v, w);
 }
 
+long
+hashobject(v)
+       object *v;
+{
+       typeobject *tp = v->ob_type;
+       if (tp->tp_hash != NULL)
+               return (*tp->tp_hash)(v);
+       if (tp->tp_compare == NULL)
+               return (long) v; /* Use address as hash value */
+       /* If there's a cmp but no hash defined, the object can't be hashed */
+       err_setstr(TypeError, "unhashable type");
+       return -1;
+}
+
 object *
 getattr(v, name)
        object *v;
@@ -229,6 +243,7 @@ static typeobject Notype = {
        0,              /*tp_as_number*/
        0,              /*tp_as_sequence*/
        0,              /*tp_as_mapping*/
+       0,              /*tp_hash */
 };
 
 object NoObject = {
index 25f12fc36d0d3250fdf0b4be25c360bdad827bd3..5c7345d40fb958dc84b5a48ed051442e4c89739e 100644 (file)
@@ -293,6 +293,21 @@ string_compare(a, b)
        return (len_a < len_b) ? -1 : (len_a > len_b) ? 1 : 0;
 }
 
+static long
+string_hash(a)
+       stringobject *a;
+{
+       register int len = a->ob_size;
+       register unsigned char *p = (unsigned char *) a->ob_sval;
+       register long x = *p << 7;
+       while (--len >= 0)
+               x = (x + x + x) ^ *p++;
+       x ^= a->ob_size;
+       if (x == -1)
+               x = -2;
+       return x;
+}
+
 static sequence_methods string_as_sequence = {
        string_length,  /*sq_length*/
        string_concat,  /*sq_concat*/
@@ -318,6 +333,7 @@ typeobject Stringtype = {
        0,              /*tp_as_number*/
        &string_as_sequence,    /*tp_as_sequence*/
        0,              /*tp_as_mapping*/
+       string_hash,    /*tp_hash*/
 };
 
 void
index 0875a0c112c95783cb5ffd19d1863324aeff1c33..9eb332b3011ce718fe66335bd1706d6dfbd86a8c 100644 (file)
@@ -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
 
@@ -179,6 +179,27 @@ tuplecompare(v, w)
        return v->ob_size - w->ob_size;
 }
 
+static long
+tuplehash(v)
+       tupleobject *v;
+{
+       register long x, y;
+       register int len = v->ob_size;
+       register object **p;
+       x = 0x345678L;
+       p = v->ob_item;
+       while (--len >= 0) {
+               y = hashobject(*p++);
+               if (y == -1)
+                       return -1;
+               x = (x + x + x) ^ y;
+       }
+       x ^= v->ob_size;
+       if (x == -1)
+               x = -2;
+       return x;
+}
+
 static int
 tuplelength(a)
        tupleobject *a;
@@ -329,4 +350,5 @@ typeobject Tupletype = {
        0,              /*tp_as_number*/
        &tuple_as_sequence,     /*tp_as_sequence*/
        0,              /*tp_as_mapping*/
+       tuplehash,      /*tp_hash*/
 };
index f78d280f8191d3b42e27072a118ae25bd57fd974..7176008b29c8a09d8ace9c67b43a2e98991743db 100644 (file)
@@ -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
 
index 6765de0469dead8bc6fdb1bc4e7f1b0a8c728f1c..22df3cfa52076c7ecee7e9377f478d6adc3db711 100644 (file)
@@ -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
 
index 32d78bbd286114ac019e7e1cc56b1661f8e4bf9c..ac9c5d2c0e5efd1864d4970219afc8e98fd6c6c7 100644 (file)
@@ -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
 
index 2fd02bef6a492667177ad62c67a8106b74157d4e..e7249c847b56caca0023ffda290685a2deabe697 100644 (file)
@@ -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
 
index 8f3c70fe3ee96bf54314c70c924c7a6dc74383a9..3d1b3a7a57a2ec547701b48d2a0d46ccb6c45b68 100644 (file)
@@ -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
 
index dd2c58ea3ddddb1518ab314fff5c1ed1562b2ffa..81b51ded7deaae549476ad63bbdb771155bbc690 100644 (file)
@@ -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
 
index ed6815d426fb542f07ab2144105703633aa918ad..716f8b6b49ce323de1c2b713b25fff38a6a7ba0d 100644 (file)
@@ -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
 
index bd73f8b82b6842240705731912a34d705cc944c5..feab7668fc4a5cb9ce9205ae93df28164a9c3b4f 100644 (file)
@@ -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
 
index 7b5dfa15f08bb8c577af0e203698eac2722af992..07c66ac1418acfb5084dfbc2eccd2277e3bb4891 100644 (file)
@@ -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
 
index 7a3e31579b44f1088ad9b28eec2396bd942731f5..c670555ceeb08241eaed65310ae930ab4bb5b34c 100644 (file)
@@ -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
 
index b59e4f71ca89bb194911c21f0bca78a62b1f2c89..1362f8be6fc0fa82cf5490622b06372df8ba71bc 100644 (file)
@@ -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
 
index 7d053c9a0bce4fb1fd8e6493ede265c5e17fd1c7..8a85a32bf34fa51cde3b0e4cc52affa886d1e765 100644 (file)
@@ -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
 
index 2c0e327e0e1b0dbdcaaed6c64cb289b5c8dd1c1e..0763312aaad789bf156a02d56dea8b24194aa99a 100644 (file)
@@ -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
 
index d88245bf0cefe00543ddfa5f022fd83410b5aec8..a1e03fe9441198354559508f5f2913a6df170382 100644 (file)
@@ -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
 
index 59af07dc15e5e3ee9de44fdf3986870d08cb4248..948f5a589fcf3b5d25d8e77641fbfe22d36a5712 100644 (file)
@@ -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
 
index c19a446dacb7a35c2c54a712c4ea89c0a0e804bd..57cdc6190d1460d4bac98afc18bb21702cba0064 100644 (file)
@@ -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
 
index ead876fcc04fcb15107f7e2967057a49642be310..67a7f027961cdcaa6d77689091f2fbb5f01d509b 100644 (file)
@@ -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
 
index 5b5b9b2b31de69d2fc908c280f9695c16ca50df3..22c20b0b7635d178b62475d26e10f580efbd825a 100644 (file)
@@ -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
 
index 723ef780831b5176d77470028dc3e2d901616351..636295a12e9e308391818b619bcee53feec42cab 100644 (file)
@@ -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
 
index 4213fc38a2b06acc9c5c071ba24e81b615f19bbb..8fd12e41927f5a8d4eb78ce0cd8ac81ce965c4b0 100644 (file)
@@ -281,10 +281,28 @@ builtin_getattr(self, args)
        object *args;
 {
        object *v;
-       char *name;
-       if (!getargs(args, "(Os)", &v, &name))
+       object *name;
+       if (!getargs(args, "(OS)", &v, &name))
                return NULL;
-       return getattr(v, name);
+       return getattro(v, name);
+}
+
+static object *
+builtin_hasattr(self, args)
+       object *self;
+       object *args;
+{
+       object *v;
+       object *name;
+       if (!getargs(args, "(OS)", &v, &name))
+               return NULL;
+       v = getattro(v, name);
+       if (v == NULL) {
+               err_clear();
+               return newintobject(0L);
+       }
+       DECREF(v);
+       return newintobject(1L);
 }
 
 static object *
@@ -293,16 +311,31 @@ builtin_setattr(self, args)
        object *args;
 {
        object *v;
-       char *name;
+       object *name;
        object *value;
-       if (!getargs(args, "(OsO)", &v, &name, &value))
+       if (!getargs(args, "(OSO)", &v, &name, &value))
                return NULL;
-       if (setattr(v, name, value) != 0)
+       if (setattro(v, name, value) != 0)
                return NULL;
        INCREF(None);
        return None;
 }
 
+static object *
+builtin_hash(self, args)
+       object *self;
+       object *args;
+{
+       object *v;
+       long x;
+       if (!getargs(args, "O", &v))
+               return NULL;
+       x = hashobject(v);
+       if (x == -1)
+               return NULL;
+       return newintobject(x);
+}
+
 static object *
 builtin_hex(self, v)
        object *self;
@@ -687,6 +720,8 @@ static struct methodlist builtin_methods[] = {
        {"execfile",    builtin_execfile},
        {"float",       builtin_float},
        {"getattr",     builtin_getattr},
+       {"hasattr",     builtin_hasattr},
+       {"hash",        builtin_hash},
        {"hex",         builtin_hex},
        {"input",       builtin_input},
        {"int",         builtin_int},
index 97f38ab0c0d7c2a3c344256bb60243c26e9f17b9..64f2429a74bc18eb1ee14615c7a0d52b7af917de 100644 (file)
@@ -173,6 +173,7 @@ eval_code(co, globals, locals, arg)
        register object *u;
        register object *t;
        register frameobject *f; /* Current frame */
+       register listobject *fastlocals = NULL;
        object *trace = NULL;   /* Trace function or NULL */
        object *retval;         /* Return value iff why == WHY_RETURN */
        char *name;             /* Name used by some instructions */
@@ -911,19 +912,18 @@ eval_code(co, globals, locals, arg)
                        break;
                
                case STORE_ATTR:
-                       name = GETNAME(oparg);
+                       w = GETNAMEV(oparg);
                        v = POP();
                        u = POP();
-                       err = setattr(v, name, u); /* v.name = u */
+                       err = setattro(v, w, u); /* v.w = u */
                        DECREF(v);
                        DECREF(u);
                        break;
                
                case DELETE_ATTR:
-                       name = GETNAME(oparg);
+                       w = GETNAMEV(oparg);
                        v = POP();
-                       err = setattr(v, name, (object *)NULL);
-                                                       /* del v.name */
+                       err = setattro(v, w, (object *)NULL); /* del v.w */
                        DECREF(v);
                        break;
                
@@ -992,6 +992,22 @@ eval_code(co, globals, locals, arg)
                        INCREF(x);
                        PUSH(x);
                        break;
+
+               case RESERVE_FAST:
+                       if (oparg > 0) {
+                               XDECREF(fastlocals);
+                               x = newlistobject(oparg);
+                               fastlocals = (listobject *) x;
+                       }
+                       break;
+
+               case LOAD_FAST:
+                       /* NYI */
+                       break;
+
+               case STORE_FAST:
+                       /* NYI */
+                       break;
                
                case BUILD_TUPLE:
                        x = newtupleobject(oparg);
@@ -1025,9 +1041,9 @@ eval_code(co, globals, locals, arg)
                        break;
                
                case LOAD_ATTR:
-                       name = GETNAME(oparg);
+                       w = GETNAMEV(oparg);
                        v = POP();
-                       x = getattr(v, name);
+                       x = getattro(v, w);
                        DECREF(v);
                        PUSH(x);
                        break;
@@ -1283,6 +1299,8 @@ eval_code(co, globals, locals, arg)
        
        current_frame = f->f_back;
        DECREF(f);
+
+       XDECREF(fastlocals);
        
        return retval;
 }
index a3023ebb9c047ecc80e6d06688580fb907f4c531..5dcac867c75ec49df0f1d91c91c8e4933c0dc92b 100644 (file)
@@ -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
 
index 483e5247b4abe047cde50511e61cc168201ce106..116b6bb1c7cced2d3dfd599dab54db40cca52031 100644 (file)
@@ -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
 
@@ -50,6 +50,7 @@ static struct memberlist code_memberlist[] = {
        {"co_consts",   T_OBJECT,       OFF(co_consts),         READONLY},
        {"co_names",    T_OBJECT,       OFF(co_names),          READONLY},
        {"co_filename", T_OBJECT,       OFF(co_filename),       READONLY},
+       {"co_name",     T_OBJECT,       OFF(co_name),           READONLY},
        {NULL}  /* Sentinel */
 };
 
@@ -69,6 +70,7 @@ code_dealloc(co)
        XDECREF(co->co_consts);
        XDECREF(co->co_names);
        XDECREF(co->co_filename);
+       XDECREF(co->co_name);
        DEL(co);
 }
 
@@ -80,12 +82,15 @@ code_repr(co)
        int lineno = -1;
        char *p = GETSTRINGVALUE(co->co_code);
        char *filename = "???";
+       char *name = "???";
        if (*p == SET_LINENO)
                lineno = (p[1] & 0xff) | ((p[2] & 0xff) << 8);
        if (co->co_filename && is_stringobject(co->co_filename))
                filename = getstringvalue(co->co_filename);
-       sprintf(buf, "<code object at %lx, file \"%.400s\", line %d>",
-               (long)co, filename, lineno);
+       if (co->co_name && is_stringobject(co->co_name))
+               name = getstringvalue(co->co_name);
+       sprintf(buf, "<code object %.100s at %lx, file \"%.300s\", line %d>",
+               name, (long)co, filename, lineno);
        return newstringobject(buf);
 }
 
@@ -107,18 +112,20 @@ typeobject Codetype = {
 };
 
 codeobject *
-newcodeobject(code, consts, names, filename)
+newcodeobject(code, consts, names, filename, name)
        object *code;
        object *consts;
        object *names;
        object *filename;
+       object *name;
 {
        codeobject *co;
        int i;
        /* Check argument types */
        if (code == NULL || !is_stringobject(code) ||
                consts == NULL || !is_listobject(consts) ||
-               names == NULL || !is_listobject(names)) {
+               names == NULL || !is_listobject(names) ||
+               name == NULL || !is_stringobject(name)) {
                err_badcall();
                return NULL;
        }
@@ -140,6 +147,8 @@ newcodeobject(code, consts, names, filename)
                co->co_names = names;
                INCREF(filename);
                co->co_filename = filename;
+               INCREF(name);
+               co->co_name = name;
        }
        return co;
 }
@@ -162,6 +171,7 @@ struct compiling {
        int c_block[MAXBLOCKS]; /* stack of block types */
        int c_nblocks;          /* current block stack level */
        char *c_filename;       /* filename of current node */
+       char *c_name;           /* name of object (e.g. function) */
 };
 
 
@@ -232,6 +242,7 @@ com_init(c, filename)
        c->c_begin = 0;
        c->c_nblocks = 0;
        c->c_filename = filename;
+       c->c_name = "?";
        return 1;
        
   fail_0:
@@ -2020,6 +2031,8 @@ compile_funcdef(c, n)
 {
        node *ch;
        REQ(n, funcdef); /* funcdef: 'def' NAME parameters ':' suite */
+       c->c_name = STR(CHILD(n, 1));
+       com_addoparg(c, RESERVE_FAST, 0); /* Patched up later */
        ch = CHILD(n, 2); /* parameters: '(' [varargslist] ')' */
        ch = CHILD(ch, 1); /* ')' | varargslist */
        if (TYPE(ch) == RPAR)
@@ -2089,6 +2102,8 @@ compile_node(c, n)
 
 /* Optimization for local and global variables.
 
+   XXX Need to update this text for LOAD_FAST stuff...
+
    Attempt to replace all LOAD_NAME instructions that refer to a local
    variable with LOAD_LOCAL instructions, and all that refer to a global
    variable with LOAD_GLOBAL instructions.
@@ -2187,17 +2202,21 @@ compile(n, filename)
 {
        struct compiling sc;
        codeobject *co;
-       object *v;
        if (!com_init(&sc, filename))
                return NULL;
        compile_node(&sc, n);
        com_done(&sc);
-       if (sc.c_errors == 0 && (v = newstringobject(filename)) != NULL) {
-               co = newcodeobject(sc.c_code, sc.c_consts, sc.c_names, v);
-               DECREF(v);
+       co = NULL;
+       if (sc.c_errors == 0) {
+               object *v, *w;
+               v = newstringobject(sc.c_filename);
+               w = newstringobject(sc.c_name);
+               if (v != NULL && w != NULL)
+                       co = newcodeobject(sc.c_code, sc.c_consts,
+                                          sc.c_names, v, w);
+               XDECREF(v);
+               XDECREF(w);
        }
-       else
-               co = NULL;
        com_free(&sc);
        if (co != NULL && filename[0] != '<')
                optimizer(co);
index 607f6a5f823404dffbde2cbc847e3c597667ce0d..8301b944f055ed934b976573959e968f0ade9a97 100644 (file)
@@ -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
 
index 96c2291c8af321466606fbc0e939cf5604fb8d75..675c4a6b273717c29a1485d38bcbe8a2cc31b9bb 100644 (file)
@@ -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
 
index da9422b27d369f660a8f650416e4b9e2e0cb9af3..4b7ee1372d3da1eeabd1fabe86b35b3b29de017c 100644 (file)
@@ -52,9 +52,9 @@ extern int verbose; /* Defined in pythonmain.c */
 extern char *argv0;
 #endif
 
-/* Magic word to reject pre-0.9.4 .pyc files */
+/* Magic word to reject pre-0.9.9 .pyc files */
 
-#define MAGIC 0x949494L
+#define MAGIC 0x99BE2AL
 
 static object *modules;
 
index 268db00691872cd49a30c2263003d9521c705e1c..65f7f2d47fce4b663a126e38e2465c7c732ff386 100644 (file)
@@ -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;
index 1c6469231d01e5fa85a3df547af5f7dfef902b75..171861127f23adea925aa4889f6dbdd51470c004 100644 (file)
@@ -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
 
index 1bcc083b61a47750d7af9b7387ef797daad40f7d..e59458e5877554398b87dd73c144e270330197a3 100644 (file)
@@ -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
 
index ce9bd9809014749a783cbbdd95fc2d143e5ba282..a2f3acf768d232874a8bfe174ccfa7fc56c1357a 100644 (file)
@@ -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
 
index e2658a6fbc0f91ed23c39e567433e763643588bb..6b29c30e7d4de1779bd86798995e4e8b787902bf 100644 (file)
@@ -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
 
index 3c246b5c73600f2083d5383e80c6051ef5ae0c00..6ed19178efcbb73ec0d970899f282fe9fc059c68 100644 (file)
@@ -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