]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added 1995 to copyright message.
authorGuido van Rossum <guido@python.org>
Wed, 4 Jan 1995 19:12:13 +0000 (19:12 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 4 Jan 1995 19:12:13 +0000 (19:12 +0000)
bltinmodule.c: fixed coerce() nightmare in ternary pow().
modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject().
pythonrun.c: move flushline() into and around print_error().

32 files changed:
Modules/cgensupport.c
Python/bltinmodule.c
Python/ceval.c
Python/cgensupport.c
Python/compile.c
Python/errors.c
Python/fmod.c
Python/frozenmain.c
Python/getargs.c
Python/getcwd.c
Python/getmtime.c
Python/import.c
Python/importdl.c
Python/importdl.h
Python/marshal.c
Python/memmove.c
Python/modsupport.c
Python/mystrtoul.c
Python/pythonmain.c
Python/pythonrun.c
Python/sigcheck.c
Python/strerror.c
Python/structmember.c
Python/sysmodule.c
Python/thread.c
Python/thread_cthread.h
Python/thread_foobar.h
Python/thread_lwp.h
Python/thread_pthread.h
Python/thread_sgi.h
Python/thread_solaris.h
Python/traceback.c

index 5f3ad047f97e112a98d1a8dad5606becc6a05a75..69514673061d451024661ad7e2c9395ec94e1fce 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 39dcc411b2ff8fae67849655f9c1684089ae3017..c553be60aa003cc60086eff5ae8785bd10587068 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
@@ -922,16 +922,31 @@ builtin_pow(self, args)
        }
        if (coerce(&v, &w) != 0)
                return NULL;
-       if (z!=None) {
-               if (coerce(&w, &z) != 0)
-                       return NULL;
-               if (coerce(&v, &z) != 0)
-                       return NULL;
+       if (z == None) {
+               x = (*v->ob_type->tp_as_number->nb_power)(v, w, z);
+       }
+       else {
+               object *v1, *z1, *w2, *z2;
+               x = NULL;
+               v1 = v;
+               z1 = z;
+               if (coerce(&v1, &z1) != 0)
+                       goto error2;
+               w2 = w;
+               z2 = z1;
+               if (coerce(&w2, &z2) != 0)
+                       goto error1;
+               x = (*v1->ob_type->tp_as_number->nb_power)(v1, w2, z2);
+               DECREF(w2);
+               DECREF(z2);
+       error1:
+               DECREF(v1);
+               DECREF(z1);
+       error2:
+               ;
        }
-       x = (*v->ob_type->tp_as_number->nb_power)(v, w, z);
        DECREF(v);
        DECREF(w);
-       if (z!=None) {DECREF(w); DECREF(v); DECREF(z); DECREF(z);}
        return x;
 }
 
index 2a3fe7be2686c1e28c8a41d2bc84348709131a41..5fa5dbba20a82d04e78742c6401dfc14a53bf359 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 5f3ad047f97e112a98d1a8dad5606becc6a05a75..69514673061d451024661ad7e2c9395ec94e1fce 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index dbc6314bc1ba9cc193395c51ce57cc8cbb78d395..a83f9296386d42d2d0db21dc7e2c4351505b7209 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 9b0a8d28d83680576a58f82267132fcb3c333933..61cb448e71be75c66b370b94caa7426d64b8e2db 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 106ad1a3fe8eb831fc3103effb21b8d7564822bb..3ddab75abb16ae76093c66c997ee49327309e8a8 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 20d0364722a3c3682d1ea1c49af66716d088f6f9..9be8d5c5a530829f53da60f55325d55accb7a748 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 1232fd0924f6021270e2cf42105f7bcd35b93d3c..68bfd0e53190730c09c1366c3e8328e807c3576e 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 05b58bcd13df6e2cb4ce75ac24a25f6bebbd10e3..894993faa0820dcefc183f80fefb7e988a1750e2 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 7c8561062185685e7f1c943e1d77aacbde77c20b..f5de0faba568f92e35a52e3e500dc6435b48ebee 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index a0af0507eef3f93d5fe765c2268c0fdf3d2959a5..ef24883ac5edd34cc485545bedb8de1bcb328f7c 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index f377c612baeb02411e4a5c01c0fe097e94ae784f..f676e3f2df411e5dc46b5905543da994595869db 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index c90608e6f8904a9eeeb89b0302d56a978fda4a1b..e56794a110565ebf74bcbf69118c867e29c2c330 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 48612b094e223e996e8fcc524f2ff0cad8856815..54cabf63e6d98b63b5a266dc717099e8ce17cbf8 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 143e6422d1fd63d33c5de1bcd000dd66229b28d1..c299d12ba933e17ae531a2e404f47af333eef77c 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 2952189f0f815c03f4a9630aa05ec9afdcfdb4d1..f196095fff17c1a0d46de01f3945154ab1214f5f 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
@@ -58,8 +58,9 @@ initmodule2(name, methods, passthrough)
                        fatal("out of mem for method name");
                sprintf(namebuf, "%s.%s", name, ml->ml_name);
                v = newmethodobject(namebuf, ml->ml_meth,
-                                   (object *)passthrough, ml->ml_varargs);
-               /* XXX The malloc'ed memory in namebuf is never freed */
+                                   (object *)passthrough,
+                                   (ml->ml_varargs ? METH_VARARGS : 0) |
+                                   METH_FREENAME);
                if (v == NULL || dictinsert(d, ml->ml_name, v) != 0) {
                        fprintf(stderr, "initializing module: %s\n", name);
                        fatal("can't initialize module");
index 6b2a06ffe7c457863c8d42647d5aa065dfba5601..10ddc6ec2fcacdc4ba405c6d9440f0dd528953d3 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 4cf44dc666d2b29bea3ba3334b038887ba0d66c9..ac9ca2c5b5fbf8bd036845dcfcb3586ba8ba208f 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index f66c8d738ad059ec9ae66ea84bec6f1f0f7facb3..c706081c68d3e02d4b7bcb8f12b3bad7ccf170e6 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
@@ -178,12 +178,12 @@ run_tty_1(fp, filename)
                return -1;
        d = getmoduledict(m);
        v = run_node(n, filename, d, d);
-       flushline();
        if (v == NULL) {
                print_error();
                return -1;
        }
        DECREF(v);
+       flushline();
        return 0;
 }
 
@@ -211,12 +211,12 @@ run_script(fp, filename)
        } else {
                v = run_file(fp, filename, file_input, d, d);
        }
-       flushline();
        if (v == NULL) {
                print_error();
                return -1;
        }
        DECREF(v);
+       flushline();
        return 0;
 }
 
@@ -230,12 +230,12 @@ run_command(command)
                return -1;
        d = getmoduledict(m);
        v = run_string(command, file_input, d, d);
-       flushline();
        if (v == NULL) {
                print_error();
                return -1;
        }
        DECREF(v);
+       flushline();
        return 0;
 }
 
@@ -244,6 +244,7 @@ print_error()
 {
        object *exception, *v, *tb, *f;
        err_fetch(&exception, &v, &tb);
+       flushline();
        if (exception == NULL)
                fatal("print_error called but no exception");
        if (exception == SystemExit) {
index 9a5f0db74d16ade6a017282d5913ca615dfe0c5d..4a4d11d5993833b6ca400ae069d6404ba3d8781a 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index d5e0e037a31e8faa926a85dcb955f88911437dab..3f9438a756d4c8649cbe3f5b375d46e392350d5c 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 7ec48b341023791a6aca997c878ca88551f8b1a0..81a52030ce8e8164a7dbdd26e86e8fc6a56b3acf 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 4cb16585bc1b5e0187c716a293969066a42e17e0..ea673639158acb45737ebf15bc43a25f84903a4b 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 3ee71aafcee2ab3a09cfbadc70b7533daeccbbcc..fb0f6a2851644ead0079247f671e1aa41fb93b4f 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index bf9a0249ebd2f783f7a27473e07745ce1a772818..1a1a8608c7a523c339e560f47fe90fa0330c6700 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 4b767b1e9508b91c2636fa012d996c946bfc4654..772f26b6f9f27316612b12656c7241e155d4f3a7 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index ab59ccd274f2e56dbfe5255c417cf2685dfea97b..a4e943f008f459b51e71124e4b29fb1a0aef851b 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index c5d7be4d88c727f25bbd6bbd925ea25798614214..94b918245bcf3eee370c962c292e7ca2b923f412 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 489e0ba465fd94f96cfa09394570f81d136e17e5..654d4aec3a6c676f949163c5b06ce6670c96c30e 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 97be126c5f903cf785d86219d7c0107f7b6bd978..199d7d09d6f9309a80d8d1e7939260d31349109f 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
index 414fc8d26daa4a20af2f1ebdab6d1954c1c41ce2..bea0b19b57e7608d389474f8e1342603b3d30590 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved