mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
* Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.
Added $(SYSDEF) to its build rule in Makefile. * cgensupport.[ch], modsupport.[ch]: removed some old stuff. Also changed files that still used it... And made several things static that weren't but should have been... And other minor cleanups... * listobject.[ch]: add external interfaces {set,get}listslice * socketmodule.c: fix bugs in new send() argument parsing. * sunaudiodevmodule.c: added flush() and close().
This commit is contained in:
parent
6a0e2282c3
commit
234f942aef
33 changed files with 299 additions and 124 deletions
|
@ -725,12 +725,12 @@ CD_addcallback(self, args)
|
|||
object *args;
|
||||
{
|
||||
int type;
|
||||
object *funcobject, *funcargobject;
|
||||
object *func, *funcarg;
|
||||
|
||||
CheckParser(self);
|
||||
|
||||
/* XXX - more work here */
|
||||
if (!getargs(args, "(iOO)", &type, &funcobject, &funcargobject))
|
||||
if (!getargs(args, "(iOO)", &type, &func, &funcarg))
|
||||
return NULL;
|
||||
|
||||
if (type < 0 || type >= NCALLBACKS) {
|
||||
|
@ -744,11 +744,11 @@ CD_addcallback(self, args)
|
|||
CDsetcallback(self->ob_cdparser, (CDDATATYPES) type, CD_callback, (void *) self);
|
||||
#endif
|
||||
XDECREF(self->ob_cdcallbacks[type].ob_cdcallback);
|
||||
INCREF(funcobject);
|
||||
self->ob_cdcallbacks[type].ob_cdcallback = funcobject;
|
||||
INCREF(func);
|
||||
self->ob_cdcallbacks[type].ob_cdcallback = func;
|
||||
XDECREF(self->ob_cdcallbacks[type].ob_cdcallbackarg);
|
||||
INCREF(funcargobject);
|
||||
self->ob_cdcallbacks[type].ob_cdcallbackarg = funcargobject;
|
||||
INCREF(funcarg);
|
||||
self->ob_cdcallbacks[type].ob_cdcallbackarg = funcarg;
|
||||
|
||||
INCREF(None);
|
||||
return None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue