comparison Python/modsupport.c @ 488:90f35fcf8ea0 legacy-trunk

Add "varargs" attribute.
author Guido van Rossum <guido@python.org>
date Mon, 16 Dec 1991 13:07:24 +0000
parents 16b18f586fec
children 3cb686c48cdd
comparison
equal deleted inserted replaced
487:77b80a91d357 488:90f35fcf8ea0
43 } 43 }
44 d = getmoduledict(m); 44 d = getmoduledict(m);
45 for (ml = methods; ml->ml_name != NULL; ml++) { 45 for (ml = methods; ml->ml_name != NULL; ml++) {
46 sprintf(namebuf, "%s.%s", name, ml->ml_name); 46 sprintf(namebuf, "%s.%s", name, ml->ml_name);
47 v = newmethodobject(strdup(namebuf), ml->ml_meth, 47 v = newmethodobject(strdup(namebuf), ml->ml_meth,
48 (object *)NULL); 48 (object *)NULL, ml->ml_varargs);
49 /* XXX The strdup'ed memory is never freed */ 49 /* XXX The strdup'ed memory is never freed */
50 if (v == NULL || dictinsert(d, ml->ml_name, v) != 0) { 50 if (v == NULL || dictinsert(d, ml->ml_name, v) != 0) {
51 fprintf(stderr, "initializing module: %s\n", name); 51 fprintf(stderr, "initializing module: %s\n", name);
52 fatal("can't initialize module"); 52 fatal("can't initialize module");
53 } 53 }