summaryrefslogtreecommitdiff
path: root/Python/modsupport.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-04 19:12:13 +0000
committerGuido van Rossum <guido@python.org>1995-01-04 19:12:13 +0000
commit68d105942961ea7491ebcc86217669ee699f601e (patch)
tree2c3cdaf115044fa13f08447190f04f6c563c6354 /Python/modsupport.c
parent6b8bd2d5cb3134da00b673f7f2b4decc97ccef6d (diff)
downloadcpython-68d105942961ea7491ebcc86217669ee699f601e.tar.gz
Added 1995 to copyright message.
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().
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r--Python/modsupport.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 2952189f0f..f196095fff 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.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
@@ -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");