summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/accessobject.c4
-rw-r--r--Objects/classobject.c4
-rw-r--r--Objects/dictobject.c4
-rw-r--r--Objects/fileobject.c4
-rw-r--r--Objects/floatobject.c6
-rw-r--r--Objects/frameobject.c4
-rw-r--r--Objects/funcobject.c4
-rw-r--r--Objects/intobject.c4
-rw-r--r--Objects/listobject.c4
-rw-r--r--Objects/longobject.c4
-rw-r--r--Objects/mappingobject.c4
-rw-r--r--Objects/methodobject.c23
-rw-r--r--Objects/moduleobject.c4
-rw-r--r--Objects/object.c4
-rw-r--r--Objects/rangeobject.c4
-rw-r--r--Objects/stringobject.c4
-rw-r--r--Objects/tupleobject.c4
-rw-r--r--Objects/typeobject.c4
-rw-r--r--Objects/xxobject.c4
19 files changed, 50 insertions, 47 deletions
diff --git a/Objects/accessobject.c b/Objects/accessobject.c
index d516e67..f3c7dfc 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 376f031..b1b355b 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 bb4e051..d74e74f 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 44bc51b..07bab90 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 3f8e6aa..b1bb968 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 4d943694..29cb171 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 d7549e0..9255b57 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 6b41ae1..f020453 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 521d1a8..f6ae50f 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 6561edc..1829c3d 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 bb4e051..d74e74f 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 a9bc508..671bdda 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 b98d843..8ab2f45 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 f5c22d1..d1bc681 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 5f9da1d..7243e1f 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 ae96cea..d9366ae 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 59660f9..1e5ea13 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 40bdc88..b391858 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 7a29925..bb8a5f6 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