From: Guido van Rossum Date: Wed, 4 Jan 1995 19:07:38 +0000 (+0000) Subject: Added 1995 to copyright message. X-Git-Tag: v1.2b1~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6610ad9d6bfe484a026f1fd34ebdcdf9924f9114;p=thirdparty%2FPython%2Fcpython.git Added 1995 to copyright message. floatobject.c: fix hash(). methodobject.c: support METH_FREENAME flag bit. --- diff --git a/Objects/accessobject.c b/Objects/accessobject.c index d516e674d56e..f3c7dfc9b9ef 100644 --- a/Objects/accessobject.c +++ b/Objects/accessobject.c @@ -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 diff --git a/Objects/classobject.c b/Objects/classobject.c index 376f031f98f8..b1b355b905fb 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -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 diff --git a/Objects/dictobject.c b/Objects/dictobject.c index bb4e051b1c77..d74e74ffd1b9 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -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 diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 44bc51bdf7e8..07bab90eabce 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -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 diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 3f8e6aa105a3..b1bb96821fd3 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -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 @@ -212,7 +212,7 @@ float_hash(v) } else { fractpart = frexp(fractpart, &expo); - fractpart = fractpart*4294967296.0; /* 2**32 */ + fractpart = fractpart*2147483648.0; /* 2**31 */ x = (long) (intpart + fractpart) ^ expo; /* Rather arbitrary */ } if (x == -1) diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 4d943694688b..29cb1718c465 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -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 diff --git a/Objects/funcobject.c b/Objects/funcobject.c index d7549e0eb43d..9255b5718747 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -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 diff --git a/Objects/intobject.c b/Objects/intobject.c index 6b41ae10b8da..f020453049f7 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -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 diff --git a/Objects/listobject.c b/Objects/listobject.c index 521d1a8741cb..f6ae50fa5e6b 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -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 diff --git a/Objects/longobject.c b/Objects/longobject.c index 6561edc80859..1829c3dee72d 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -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 diff --git a/Objects/mappingobject.c b/Objects/mappingobject.c index bb4e051b1c77..d74e74ffd1b9 100644 --- a/Objects/mappingobject.c +++ b/Objects/mappingobject.c @@ -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 diff --git a/Objects/methodobject.c b/Objects/methodobject.c index a9bc508f806c..671bdda35647 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -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 @@ -33,15 +33,15 @@ typedef struct { char *m_name; method m_meth; object *m_self; - int m_varargs; + int m_flags; } methodobject; object * -newmethodobject(name, meth, self, varargs) - char *name; /* static string */ +newmethodobject(name, meth, self, flags) + char *name; method meth; object *self; - int varargs; + int flags; { methodobject *op = NEWOBJ(methodobject, &Methodtype); if (op != NULL) { @@ -50,7 +50,7 @@ newmethodobject(name, meth, self, varargs) if (self != NULL) INCREF(self); op->m_self = self; - op->m_varargs = varargs; + op->m_flags = flags; } return (object *)op; } @@ -85,7 +85,7 @@ getvarargs(op) err_badcall(); return -1; } - return ((methodobject *)op) -> m_varargs; + return ((methodobject *)op) -> m_flags & METH_VARARGS; } /* Methods (the standard built-in methods, that is) */ @@ -96,6 +96,8 @@ meth_dealloc(m) { if (m->m_self != NULL) DECREF(m->m_self); + if (m->m_flags & METH_FREENAME) + free(m->m_name); free((char *)m); } @@ -199,8 +201,9 @@ findmethod(ml, op, name) return listmethods(ml); for (; ml->ml_name != NULL; ml++) { if (strcmp(name, ml->ml_name) == 0) - return newmethodobject(ml->ml_name, ml->ml_meth, - op, ml->ml_varargs); + return newmethodobject(ml->ml_name, ml->ml_meth, op, + ml->ml_varargs ? + METH_VARARGS : 0); } err_setstr(AttributeError, name); return NULL; diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index b98d843d6352..8ab2f455c301 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -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 diff --git a/Objects/object.c b/Objects/object.c index f5c22d1774aa..d1bc681805f3 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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 diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 5f9da1d84b46..7243e1fe824b 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -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 diff --git a/Objects/stringobject.c b/Objects/stringobject.c index ae96cea2c362..d9366aedadc1 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -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 diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 59660f990421..1e5ea1392f73 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -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 diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 40bdc88cea90..b391858f27d2 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -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 diff --git a/Objects/xxobject.c b/Objects/xxobject.c index 7a29925db7d5..bb8a5f677f90 100644 --- a/Objects/xxobject.c +++ b/Objects/xxobject.c @@ -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