diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 10 | ||||
-rw-r--r-- | Python/import.c | 9 | ||||
-rw-r--r-- | Python/modsupport.c | 4 | ||||
-rw-r--r-- | Python/sysmodule.c | 23 | ||||
-rw-r--r-- | Python/thread.c | 24 |
5 files changed, 53 insertions, 17 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index a46fd36..b28f17c 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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 @@ -1577,10 +1577,8 @@ add(v, w) DECREF(w); return x; } - else { - err_setstr(TypeError, "+ not supported by operands"); - return NULL; - } + err_setstr(TypeError, "bad operand type(s) for +"); + return NULL; } static object * diff --git a/Python/import.c b/Python/import.c index 44f6d7b..da9422b 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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 @@ -395,11 +395,6 @@ doneimport() /* Initialize built-in modules when first imported */ -extern struct { - char *name; - void (*initfunc)(); -} inittab[]; - static int init_builtin(name) char *name; diff --git a/Python/modsupport.c b/Python/modsupport.c index 1f28126..f92739a 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -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 diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 5dff38e..2ad8a26 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -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 @@ -154,6 +154,23 @@ static struct methodlist sys_methods[] = { static object *sysin, *sysout, *syserr; +static object * +list_builtin_module_names() +{ + object *list = newlistobject(0); + int i; + if (list == NULL) + return NULL; + for (i = 0; inittab[i].name != NULL; i++) { + object *name = newstringobject(inittab[i].name); + if (name == NULL) + break; + addlistitem(list, name); + DECREF(name); + } + return list; +} + void initsys() { @@ -175,6 +192,8 @@ initsys() dictinsert(sysdict, "stderr", syserr); dictinsert(sysdict, "version", v); dictinsert(sysdict, "modules", get_modules()); + dictinsert(sysdict, "builtin_module_names", + list_builtin_module_names()); if (err_occurred()) fatal("can't insert sys.* objects in sys dict"); DECREF(v); diff --git a/Python/thread.c b/Python/thread.c index 44f2896..56ef137 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -1,3 +1,27 @@ +/*********************************************************** +Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum, +Amsterdam, The Netherlands. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +******************************************************************/ + #include "thread.h" #ifdef DEBUG |