diff --git a/Objects/accessobject.c b/Objects/accessobject.c index d516e674d56..f3c7dfc9b9e 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 376f031f98f..b1b355b905f 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 bb4e051b1c7..d74e74ffd1b 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 44bc51bdf7e..07bab90eabc 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 3f8e6aa105a..b1bb96821fd 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 4d943694688..29cb1718c46 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 d7549e0eb43..9255b571874 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 6b41ae10b8d..f020453049f 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 521d1a8741c..f6ae50fa5e6 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 6561edc8085..1829c3dee72 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 bb4e051b1c7..d74e74ffd1b 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 a9bc508f806..671bdda3564 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 b98d843d635..8ab2f455c30 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 f5c22d1774a..d1bc681805f 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 5f9da1d84b4..7243e1fe824 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 ae96cea2c36..d9366aedadc 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 59660f99042..1e5ea1392f7 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 40bdc88cea9..b391858f27d 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 7a29925db7d..bb8a5f677f9 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