[Python-checkins] CVS: python/dist/src/Modules _sre.c,2.2,2.3 _tkinter.c,1.96,1.97 almodule.c,1.23,1.24 arraymodule.c,2.38,2.39 bsddbmodule.c,1.17,1.18 cPickle.c,2.40,2.41 cStringIO.c,2.19,2.20 cdmodule.c,1.18,1.19 clmodule.c,2.19,2.20 cursesmodule.c,2.19,2.20 dbmmodule.c,2.16,2.17 dlmodule.c,2.6,2.7 flmodule.c,1.35,1.36 fmmodule.c,1.10,1.11 gdbmmodule.c,2.21,2.22 getpath.c,1.20,1.21 linuxaudiodev.c,2.1,2.2 md5module.c,2.14,2.15 mmapmodule.c,2.7,2.8 mpzmodule.c,2.22,2.23 newmodule.c,2.19,2.20 nismodule.c,2.15,2.16 parsermodule.c,2.38,2.39 pcremodule.c,2.18,2.19 pyexpat.c,2.3,2.4 readline.c,2.16,2.17 regexmodule.c,1.33,1.34 rotormodule.c,2.22,2.23 selectmodule.c,2.31,2.32 shamodule.c,2.4,2.5 socketmodule.c,1.106,1.107 stropmodule.c,2.62,2.63 sunaudiodev.c,1.16,1.17 svmodule.c,2.10,2.11 threadmodule.c,2.30,2.31 xxmodule.c,2.15,2.16 zlibmodule.c,2.31,2.32
Guido van Rossum
python-dev@python.org
Wed, 3 May 2000 19:45:13 -0400 (EDT)
- Previous message: [Python-checkins] CVS: python/dist/src/Parser myreadline.c,2.16,2.17 parsetok.c,2.15,2.16 pgenmain.c,2.15,2.16 tokenizer.c,2.40,2.41
- Next message: [Python-checkins] CVS: python/dist/src/Objects bufferobject.c,2.6,2.7 classobject.c,2.85,2.86 cobject.c,2.7,2.8 complexobject.c,2.23,2.24 dictobject.c,2.51,2.52 fileobject.c,2.72,2.73 floatobject.c,2.56,2.57 frameobject.c,2.38,2.39 funcobject.c,2.19,2.20 intobject.c,2.40,2.41 listobject.c,2.68,2.69 longobject.c,1.56,1.57 methodobject.c,2.25,2.26 moduleobject.c,2.24,2.25 object.c,2.69,2.70 rangeobject.c,2.11,2.12 sliceobject.c,2.3,2.4 stringobject.c,2.62,2.63 tupleobject.c,2.32,2.33 unicodeobject.c,2.15,2.16 xxobject.c,2.14,2.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /projects/cvsroot/python/dist/src/Modules
In directory eric:/projects/python/develop/guido/clean/Modules
Modified Files:
_sre.c _tkinter.c almodule.c arraymodule.c bsddbmodule.c
cPickle.c cStringIO.c cdmodule.c clmodule.c cursesmodule.c
dbmmodule.c dlmodule.c flmodule.c fmmodule.c gdbmmodule.c
getpath.c linuxaudiodev.c md5module.c mmapmodule.c mpzmodule.c
newmodule.c nismodule.c parsermodule.c pcremodule.c pyexpat.c
readline.c regexmodule.c rotormodule.c selectmodule.c
shamodule.c socketmodule.c stropmodule.c sunaudiodev.c
svmodule.c threadmodule.c xxmodule.c zlibmodule.c
Log Message:
Vladimir Marangozov's long-awaited malloc restructuring.
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.
(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode. I'm also holding back on his
change to main.c, which seems unnecessary to me.)
Index: _sre.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/_sre.c,v
retrieving revision 2.2
retrieving revision 2.3
diff -C2 -r2.2 -r2.3
*** _sre.c 2000/04/10 17:06:55 2.2
--- _sre.c 2000/05/03 23:44:30 2.3
***************
*** 2,6 ****
*
* Secret Labs' Regular Expression Engine
! * $Id: _sre.c,v 2.2 2000/04/10 17:06:55 guido Exp $
*
* simple regular expression matching engine
--- 2,6 ----
*
* Secret Labs' Regular Expression Engine
! * $Id: _sre.c,v 2.3 2000/05/03 23:44:30 guido Exp $
*
* simple regular expression matching engine
***************
*** 849,853 ****
return NULL;
! self = PyObject_NEW(PatternObject, &Pattern_Type);
if (self == NULL)
return NULL;
--- 849,853 ----
return NULL;
! self = PyObject_New(PatternObject, &Pattern_Type);
if (self == NULL)
return NULL;
***************
*** 887,891 ****
/* create match object (with room for extra group marks) */
! match = PyObject_NEW_VAR(MatchObject, &Match_Type, 2*pattern->groups);
if (match == NULL)
return NULL;
--- 887,891 ----
/* create match object (with room for extra group marks) */
! match = PyObject_NewVar(MatchObject, &Match_Type, 2*pattern->groups);
if (match == NULL)
return NULL;
***************
*** 1003,1007 ****
Py_XDECREF(self->pattern);
Py_XDECREF(self->groupindex);
! PyMem_DEL(self);
}
--- 1003,1007 ----
Py_XDECREF(self->pattern);
Py_XDECREF(self->groupindex);
! PyObject_Del(self);
}
***************
*** 1164,1168 ****
Py_XDECREF(self->string);
Py_DECREF(self->pattern);
! PyMem_DEL(self);
}
--- 1164,1168 ----
Py_XDECREF(self->string);
Py_DECREF(self->pattern);
! PyObject_Del(self);
}
Index: _tkinter.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/_tkinter.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -r1.96 -r1.97
*** _tkinter.c 2000/04/27 20:14:31 1.96
--- _tkinter.c 2000/05/03 23:44:31 1.97
***************
*** 470,474 ****
char *argv0;
! v = PyObject_NEW(TkappObject, &Tkapp_Type);
if (v == NULL)
return NULL;
--- 470,474 ----
char *argv0;
! v = PyObject_New(TkappObject, &Tkapp_Type);
if (v == NULL)
return NULL;
***************
*** 1641,1645 ****
TkttObject *v;
! v = PyObject_NEW(TkttObject, &Tktt_Type);
if (v == NULL)
return NULL;
--- 1641,1645 ----
TkttObject *v;
! v = PyObject_New(TkttObject, &Tktt_Type);
if (v == NULL)
return NULL;
***************
*** 1663,1667 ****
Py_XDECREF(func);
! PyMem_DEL(self);
}
--- 1663,1667 ----
Py_XDECREF(func);
! PyObject_Del(self);
}
***************
*** 1911,1915 ****
Tcl_DeleteInterp(Tkapp_Interp(self));
LEAVE_TCL
! PyMem_DEL(self);
DisableEventHook();
}
--- 1911,1915 ----
Tcl_DeleteInterp(Tkapp_Interp(self));
LEAVE_TCL
! PyObject_Del(self);
DisableEventHook();
}
Index: almodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/almodule.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** almodule.c 2000/02/29 13:59:22 1.23
--- almodule.c 2000/05/03 23:44:31 1.24
***************
*** 649,653 ****
alcobject *self;
! self = PyObject_NEW(alcobject, &Alctype);
if (self == NULL)
return NULL;
--- 649,653 ----
alcobject *self;
! self = PyObject_New(alcobject, &Alctype);
if (self == NULL)
return NULL;
***************
*** 668,672 ****
(void) ALfreeconfig(self->config); /* ignore errors */
#endif
! PyMem_DEL(self);
}
--- 668,672 ----
(void) ALfreeconfig(self->config); /* ignore errors */
#endif
! PyObject_Del(self);
}
***************
*** 1422,1426 ****
alpobject *self;
! self = PyObject_NEW(alpobject, &Alptype);
if (self == NULL)
return NULL;
--- 1422,1426 ----
alpobject *self;
! self = PyObject_New(alpobject, &Alptype);
if (self == NULL)
return NULL;
***************
*** 1443,1447 ****
#endif
}
! PyMem_DEL(self);
}
--- 1443,1447 ----
#endif
}
! PyObject_Del(self);
}
Index: arraymodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/arraymodule.c,v
retrieving revision 2.38
retrieving revision 2.39
diff -C2 -r2.38 -r2.39
*** arraymodule.c 2000/02/04 20:33:49 2.38
--- arraymodule.c 2000/05/03 23:44:31 2.39
***************
*** 347,351 ****
return PyErr_NoMemory();
}
! op = PyMem_NEW(arrayobject, 1);
if (op == NULL) {
return PyErr_NoMemory();
--- 347,351 ----
return PyErr_NoMemory();
}
! op = PyObject_NewVar(arrayobject, &Arraytype, size);
if (op == NULL) {
return PyErr_NoMemory();
***************
*** 357,368 ****
op->ob_item = PyMem_NEW(char, nbytes);
if (op->ob_item == NULL) {
! PyMem_DEL(op);
return PyErr_NoMemory();
}
}
- op->ob_type = &Arraytype;
- op->ob_size = size;
op->ob_descr = descr;
- _Py_NewReference((PyObject *)op);
return (PyObject *) op;
}
--- 357,365 ----
op->ob_item = PyMem_NEW(char, nbytes);
if (op->ob_item == NULL) {
! PyObject_Del(op);
return PyErr_NoMemory();
}
}
op->ob_descr = descr;
return (PyObject *) op;
}
***************
*** 467,471 ****
if (op->ob_item != NULL)
PyMem_DEL(op->ob_item);
! PyMem_DEL(op);
}
--- 464,468 ----
if (op->ob_item != NULL)
PyMem_DEL(op->ob_item);
! PyObject_Del(op);
}
Index: bsddbmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/bsddbmodule.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** bsddbmodule.c 2000/02/29 13:59:22 1.17
--- bsddbmodule.c 2000/05/03 23:44:31 1.18
***************
*** 90,94 ****
HASHINFO info;
! if ((dp = PyObject_NEW(bsddbobject, &Bsddbtype)) == NULL)
return NULL;
--- 90,94 ----
HASHINFO info;
! if ((dp = PyObject_New(bsddbobject, &Bsddbtype)) == NULL)
return NULL;
***************
*** 144,148 ****
BTREEINFO info;
! if ((dp = PyObject_NEW(bsddbobject, &Bsddbtype)) == NULL)
return NULL;
--- 144,148 ----
BTREEINFO info;
! if ((dp = PyObject_New(bsddbobject, &Bsddbtype)) == NULL)
return NULL;
***************
*** 201,205 ****
RECNOINFO info;
! if ((dp = PyObject_NEW(bsddbobject, &Bsddbtype)) == NULL)
return NULL;
--- 201,205 ----
RECNOINFO info;
! if ((dp = PyObject_New(bsddbobject, &Bsddbtype)) == NULL)
return NULL;
***************
*** 262,266 ****
errno);
}
! PyMem_DEL(dp);
}
--- 262,266 ----
errno);
}
! PyObject_Del(dp);
}
Index: cPickle.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.40
retrieving revision 2.41
diff -C2 -r2.40 -r2.41
*** cPickle.c 2000/04/21 20:49:36 2.40
--- cPickle.c 2000/05/03 23:44:31 2.41
***************
*** 172,176 ****
if (self->data) free(self->data);
! PyMem_DEL(self);
}
--- 172,176 ----
if (self->data) free(self->data);
! PyObject_Del(self);
}
***************
*** 187,191 ****
Pdata *self;
! UNLESS (self = PyObject_NEW(Pdata, &PdataType)) return NULL;
self->size=8;
self->length=0;
--- 187,191 ----
Pdata *self;
! UNLESS (self = PyObject_New(Pdata, &PdataType)) return NULL;
self->size=8;
self->length=0;
***************
*** 2133,2137 ****
Picklerobject *self;
! UNLESS (self = PyObject_NEW(Picklerobject, &Picklertype))
return NULL;
--- 2133,2137 ----
Picklerobject *self;
! UNLESS (self = PyObject_New(Picklerobject, &Picklertype))
return NULL;
***************
*** 2244,2248 ****
}
! PyMem_DEL(self);
}
--- 2244,2248 ----
}
! PyObject_Del(self);
}
***************
*** 2886,2890 ****
PyErr_Clear();
! UNLESS (inst=PyObject_NEW(PyInstanceObject, &PyInstance_Type))
goto err;
inst->in_class=(PyClassObject*)cls;
--- 2886,2890 ----
PyErr_Clear();
! UNLESS (inst=PyObject_New(PyInstanceObject, &PyInstance_Type))
goto err;
inst->in_class=(PyClassObject*)cls;
***************
*** 4037,4041 ****
Unpicklerobject *self;
! UNLESS (self = PyObject_NEW(Unpicklerobject, &Unpicklertype))
return NULL;
--- 4037,4041 ----
Unpicklerobject *self;
! UNLESS (self = PyObject_New(Unpicklerobject, &Unpicklertype))
return NULL;
***************
*** 4142,4146 ****
}
! PyMem_DEL(self);
}
--- 4142,4146 ----
}
! PyObject_Del(self);
}
Index: cStringIO.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/cStringIO.c,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -r2.19 -r2.20
*** cStringIO.c 2000/04/12 22:04:01 2.19
--- cStringIO.c 2000/05/03 23:44:31 2.20
***************
*** 57,61 ****
"This module provides a simple useful replacement for\n"
"the StringIO module that is written in C. It does not provide the\n"
! "full generality if StringIO, but it provides anough for most\n"
"applications and is especially useful in conjuction with the\n"
"pickle module.\n"
--- 57,61 ----
"This module provides a simple useful replacement for\n"
"the StringIO module that is written in C. It does not provide the\n"
! "full generality if StringIO, but it provides enough for most\n"
"applications and is especially useful in conjuction with the\n"
"pickle module.\n"
***************
*** 408,412 ****
if (self->buf != NULL)
free(self->buf);
! PyMem_DEL(self);
}
--- 408,412 ----
if (self->buf != NULL)
free(self->buf);
! PyObject_Del(self);
}
***************
*** 466,470 ****
Oobject *self;
! self = PyObject_NEW(Oobject, &Otype);
if (self == NULL)
return NULL;
--- 466,470 ----
Oobject *self;
! self = PyObject_New(Oobject, &Otype);
if (self == NULL)
return NULL;
***************
*** 537,541 ****
I_dealloc(Iobject *self) {
Py_XDECREF(self->pbuf);
! PyMem_DEL(self);
}
--- 537,541 ----
I_dealloc(Iobject *self) {
Py_XDECREF(self->pbuf);
! PyObject_Del(self);
}
***************
*** 587,591 ****
buf = PyString_AS_STRING(s);
size = PyString_GET_SIZE(s);
! UNLESS(self = PyObject_NEW(Iobject, &Itype)) return NULL;
Py_INCREF(s);
self->buf=buf;
--- 587,591 ----
buf = PyString_AS_STRING(s);
size = PyString_GET_SIZE(s);
! UNLESS(self = PyObject_New(Iobject, &Itype)) return NULL;
Py_INCREF(s);
self->buf=buf;
Index: cdmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/cdmodule.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** cdmodule.c 2000/02/29 13:59:23 1.18
--- cdmodule.c 2000/05/03 23:44:31 1.19
***************
*** 448,452 ****
if (self->ob_cdplayer != NULL)
CDclose(self->ob_cdplayer);
! PyMem_DEL(self);
}
--- 448,452 ----
if (self->ob_cdplayer != NULL)
CDclose(self->ob_cdplayer);
! PyObject_Del(self);
}
***************
*** 484,488 ****
cdplayerobject *p;
! p = PyObject_NEW(cdplayerobject, &CdPlayertype);
if (p == NULL)
return NULL;
--- 484,488 ----
cdplayerobject *p;
! p = PyObject_New(cdplayerobject, &CdPlayertype);
if (p == NULL)
return NULL;
***************
*** 762,766 ****
}
CDdeleteparser(self->ob_cdparser);
! PyMem_DEL(self);
}
--- 762,766 ----
}
CDdeleteparser(self->ob_cdparser);
! PyObject_Del(self);
}
***************
*** 800,804 ****
int i;
! p = PyObject_NEW(cdparserobject, &CdParsertype);
if (p == NULL)
return NULL;
--- 800,804 ----
int i;
! p = PyObject_New(cdparserobject, &CdParsertype);
if (p == NULL)
return NULL;
Index: clmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/clmodule.c,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -r2.19 -r2.20
*** clmodule.c 1997/10/08 15:26:28 2.19
--- clmodule.c 2000/05/03 23:44:31 2.20
***************
*** 674,678 ****
clCloseDecompressor(SELF->ob_compressorHdl);
}
! PyMem_DEL(self);
}
--- 674,678 ----
clCloseDecompressor(SELF->ob_compressorHdl);
}
! PyObject_Del(self);
}
***************
*** 714,718 ****
return NULL;
! new = PyObject_NEW(clobject, &Cltype);
if (new == NULL)
return NULL;
--- 714,718 ----
return NULL;
! new = PyObject_New(clobject, &Cltype);
if (new == NULL)
return NULL;
Index: cursesmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/cursesmodule.c,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -r2.19 -r2.20
*** cursesmodule.c 1999/01/05 17:16:46 2.19
--- cursesmodule.c 2000/05/03 23:44:31 2.20
***************
*** 274,278 ****
PyFileObject *out_fo;
PyCursesScreenObject *xp;
! xp = PyObject_NEW(PyCursesScreenObject, &PyCursesScreen_Type);
if (xp == NULL)
return NULL;
--- 274,278 ----
PyFileObject *out_fo;
PyCursesScreenObject *xp;
! xp = PyObject_New(PyCursesScreenObject, &PyCursesScreen_Type);
if (xp == NULL)
return NULL;
***************
*** 290,294 ****
PyCursesWindowObject *wo;
! wo = PyObject_NEW(PyCursesWindowObject, &PyCursesWindow_Type);
if (wo == NULL)
return NULL;
--- 290,294 ----
PyCursesWindowObject *wo;
! wo = PyObject_New(PyCursesWindowObject, &PyCursesWindow_Type);
if (wo == NULL)
return NULL;
***************
*** 304,308 ****
if (wo->win != stdscr)
delwin(wo->win);
! PyMem_DEL(wo);
}
--- 304,308 ----
if (wo->win != stdscr)
delwin(wo->win);
! PyObject_Del(wo);
}
***************
*** 1126,1130 ****
{
PyCursesPadObject *po;
! po = PyObject_NEW(PyCursesPadObject, &PyCursesPad_Type);
if (po == NULL)
return NULL;
--- 1126,1130 ----
{
PyCursesPadObject *po;
! po = PyObject_New(PyCursesPadObject, &PyCursesPad_Type);
if (po == NULL)
return NULL;
Index: dbmmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/dbmmodule.c,v
retrieving revision 2.16
retrieving revision 2.17
diff -C2 -r2.16 -r2.17
*** dbmmodule.c 2000/02/29 13:59:23 2.16
--- dbmmodule.c 2000/05/03 23:44:32 2.17
***************
*** 63,67 ****
dbmobject *dp;
! dp = PyObject_NEW(dbmobject, &Dbmtype);
if (dp == NULL)
return NULL;
--- 63,67 ----
dbmobject *dp;
! dp = PyObject_New(dbmobject, &Dbmtype);
if (dp == NULL)
return NULL;
***************
*** 83,87 ****
if ( dp->di_dbm )
dbm_close(dp->di_dbm);
! PyMem_DEL(dp);
}
--- 83,87 ----
if ( dp->di_dbm )
dbm_close(dp->di_dbm);
! PyObject_Del(dp);
}
Index: dlmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/dlmodule.c,v
retrieving revision 2.6
retrieving revision 2.7
diff -C2 -r2.6 -r2.7
*** dlmodule.c 1997/12/16 23:58:15 2.6
--- dlmodule.c 2000/05/03 23:44:32 2.7
***************
*** 55,59 ****
{
dlobject *xp;
! xp = PyObject_NEW(dlobject, &Dltype);
if (xp == NULL)
return NULL;
--- 55,59 ----
{
dlobject *xp;
! xp = PyObject_New(dlobject, &Dltype);
if (xp == NULL)
return NULL;
***************
*** 68,72 ****
if (xp->dl_handle != NULL)
dlclose(xp->dl_handle);
! PyMem_DEL(xp);
}
--- 68,72 ----
if (xp->dl_handle != NULL)
dlclose(xp->dl_handle);
! PyObject_Del(xp);
}
Index: flmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/flmodule.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** flmodule.c 1998/12/04 18:49:46 1.35
--- flmodule.c 2000/05/03 23:44:32 1.36
***************
*** 333,337 ****
Py_XDECREF(g->ob_callback);
Py_XDECREF(g->ob_callback_arg);
! PyMem_DEL(g);
}
--- 333,337 ----
Py_XDECREF(g->ob_callback);
Py_XDECREF(g->ob_callback_arg);
! PyObject_Del(g);
}
***************
*** 462,466 ****
{
genericobject *g;
! g = PyObject_NEW(genericobject, &GenericObjecttype);
if (g == NULL)
return NULL;
--- 462,466 ----
{
genericobject *g;
! g = PyObject_New(genericobject, &GenericObjecttype);
if (g == NULL)
return NULL;
***************
*** 1853,1857 ****
fl_hide_form(f->ob_form);
fl_free_form(f->ob_form);
! PyMem_DEL(f);
}
--- 1853,1857 ----
fl_hide_form(f->ob_form);
fl_free_form(f->ob_form);
! PyObject_Del(f);
}
***************
*** 1932,1936 ****
{
formobject *f;
! f = PyObject_NEW(formobject, &Formtype);
if (f == NULL)
return NULL;
--- 1932,1936 ----
{
formobject *f;
! f = PyObject_New(formobject, &Formtype);
if (f == NULL)
return NULL;
Index: fmmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/fmmodule.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** fmmodule.c 1997/01/17 16:08:55 1.10
--- fmmodule.c 2000/05/03 23:44:32 1.11
***************
*** 60,64 ****
return NULL;
}
! fhp = PyObject_NEW(fhobject, &Fhtype);
if (fhp == NULL)
return NULL;
--- 60,64 ----
return NULL;
}
! fhp = PyObject_New(fhobject, &Fhtype);
if (fhp == NULL)
return NULL;
***************
*** 197,201 ****
{
fmfreefont(fhp->fh_fh);
! PyMem_DEL(fhp);
}
--- 197,201 ----
{
fmfreefont(fhp->fh_fh);
! PyObject_Del(fhp);
}
Index: gdbmmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/gdbmmodule.c,v
retrieving revision 2.21
retrieving revision 2.22
diff -C2 -r2.21 -r2.22
*** gdbmmodule.c 2000/02/29 13:59:23 2.21
--- gdbmmodule.c 2000/05/03 23:44:32 2.22
***************
*** 94,98 ****
dbmobject *dp;
! dp = PyObject_NEW(dbmobject, &Dbmtype);
if (dp == NULL)
return NULL;
--- 94,98 ----
dbmobject *dp;
! dp = PyObject_New(dbmobject, &Dbmtype);
if (dp == NULL)
return NULL;
***************
*** 118,122 ****
if ( dp->di_dbm )
gdbm_close(dp->di_dbm);
! PyMem_DEL(dp);
}
--- 118,122 ----
if ( dp->di_dbm )
gdbm_close(dp->di_dbm);
! PyObject_Del(dp);
}
Index: getpath.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/getpath.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** getpath.c 1999/01/27 17:52:00 1.20
--- getpath.c 2000/05/03 23:44:32 1.21
***************
*** 530,534 ****
/* This is the only malloc call in this file */
! buf = malloc(bufsz);
if (buf == NULL) {
--- 530,534 ----
/* This is the only malloc call in this file */
! buf = PyMem_Malloc(bufsz);
if (buf == NULL) {
Index: linuxaudiodev.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/linuxaudiodev.c,v
retrieving revision 2.1
retrieving revision 2.2
diff -C2 -r2.1 -r2.2
*** linuxaudiodev.c 2000/03/31 16:56:32 2.1
--- linuxaudiodev.c 2000/05/03 23:44:32 2.2
***************
*** 105,109 ****
/* Create and initialize the object */
! if ((xp = PyObject_NEW(lad_t, &Ladtype)) == NULL) {
close(fd);
return NULL;
--- 105,109 ----
/* Create and initialize the object */
! if ((xp = PyObject_New(lad_t, &Ladtype)) == NULL) {
close(fd);
return NULL;
***************
*** 119,123 ****
{
close(xp->x_fd);
! PyMem_DEL(xp);
}
--- 119,123 ----
{
close(xp->x_fd);
! PyObject_Del(xp);
}
Index: md5module.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/md5module.c,v
retrieving revision 2.14
retrieving revision 2.15
diff -C2 -r2.14 -r2.15
*** md5module.c 2000/02/29 13:59:23 2.14
--- md5module.c 2000/05/03 23:44:32 2.15
***************
*** 57,61 ****
md5object *md5p;
! md5p = PyObject_NEW(md5object, &MD5type);
if (md5p == NULL)
return NULL;
--- 57,61 ----
md5object *md5p;
! md5p = PyObject_New(md5object, &MD5type);
if (md5p == NULL)
return NULL;
***************
*** 72,76 ****
md5object *md5p;
{
! PyMem_DEL(md5p);
}
--- 72,76 ----
md5object *md5p;
{
! PyObject_Del(md5p);
}
Index: mmapmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/mmapmodule.c,v
retrieving revision 2.7
retrieving revision 2.8
diff -C2 -r2.7 -r2.8
*** mmapmodule.c 2000/04/10 21:34:37 2.7
--- mmapmodule.c 2000/05/03 23:44:32 2.8
***************
*** 2,6 ****
/ Author: Sam Rushing <rushing@nightmare.com>
/ Hacked for Unix by A.M. Kuchling <amk1@bigfoot.com>
! / $Id: mmapmodule.c,v 2.7 2000/04/10 21:34:37 guido Exp $
/ mmapmodule.cpp -- map a view of a file into memory
--- 2,6 ----
/ Author: Sam Rushing <rushing@nightmare.com>
/ Hacked for Unix by A.M. Kuchling <amk1@bigfoot.com>
! / $Id: mmapmodule.c,v 2.8 2000/05/03 23:44:32 guido Exp $
/ mmapmodule.cpp -- map a view of a file into memory
***************
*** 70,74 ****
#endif /* UNIX */
! PyMem_DEL(m_obj);
}
--- 70,74 ----
#endif /* UNIX */
! PyObject_Del(m_obj);
}
***************
*** 707,711 ****
return NULL;
! m_obj = PyObject_NEW (mmap_object, &mmap_object_type);
if (m_obj == NULL) {return NULL;}
m_obj->size = (size_t) map_size;
--- 707,711 ----
return NULL;
! m_obj = PyObject_New (mmap_object, &mmap_object_type);
if (m_obj == NULL) {return NULL;}
m_obj->size = (size_t) map_size;
***************
*** 758,762 ****
}
! m_obj = PyObject_NEW (mmap_object, &mmap_object_type);
if (fh) {
--- 758,762 ----
}
! m_obj = PyObject_New (mmap_object, &mmap_object_type);
if (fh) {
Index: mpzmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/mpzmodule.c,v
retrieving revision 2.22
retrieving revision 2.23
diff -C2 -r2.22 -r2.23
*** mpzmodule.c 2000/02/25 22:23:31 2.22
--- mpzmodule.c 2000/05/03 23:44:32 2.23
***************
*** 124,128 ****
fputs( "mpz_object() called...\n", stderr );
#endif /* def MPZ_DEBUG */
! mpzp = PyObject_NEW(mpzobject, &MPZtype);
if (mpzp == NULL)
return NULL;
--- 124,128 ----
fputs( "mpz_object() called...\n", stderr );
#endif /* def MPZ_DEBUG */
! mpzp = PyObject_New(mpzobject, &MPZtype);
if (mpzp == NULL)
return NULL;
***************
*** 286,290 ****
#endif /* def MPZ_DEBUG */
mpz_clear(&mpzp->mpz);
! PyMem_DEL(mpzp);
} /* mpz_dealloc() */
--- 286,290 ----
#endif /* def MPZ_DEBUG */
mpz_clear(&mpzp->mpz);
! PyObject_Del(mpzp);
} /* mpz_dealloc() */
Index: newmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/newmodule.c,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -r2.19 -r2.20
*** newmodule.c 2000/02/29 13:59:23 2.19
--- newmodule.c 2000/05/03 23:44:32 2.20
***************
*** 50,54 ****
&PyDict_Type, &dict))
return NULL;
! inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
if (inst == NULL)
return NULL;
--- 50,54 ----
&PyDict_Type, &dict))
return NULL;
! inst = PyObject_New(PyInstanceObject, &PyInstance_Type);
if (inst == NULL)
return NULL;
Index: nismodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/nismodule.c,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -r2.15 -r2.16
*** nismodule.c 2000/02/29 15:52:40 2.15
--- nismodule.c 2000/05/03 23:44:32 2.16
***************
*** 354,362 ****
goto finally;
! PyMem_DEL(server);
return list->maps;
finally:
! PyMem_DEL(server);
return NULL;
}
--- 354,362 ----
goto finally;
! free(server);
return list->maps;
finally:
! free(server);
return NULL;
}
Index: parsermodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/parsermodule.c,v
retrieving revision 2.38
retrieving revision 2.39
diff -C2 -r2.38 -r2.39
*** parsermodule.c 2000/04/25 04:14:46 2.38
--- parsermodule.c 2000/05/03 23:44:32 2.39
***************
*** 296,300 ****
parser_newastobject(node *ast, int type)
{
! PyAST_Object* o = PyObject_NEW(PyAST_Object, &PyAST_Type);
if (o != 0) {
--- 296,300 ----
parser_newastobject(node *ast, int type)
{
! PyAST_Object* o = PyObject_New(PyAST_Object, &PyAST_Type);
if (o != 0) {
***************
*** 318,322 ****
{
PyNode_Free(ast->ast_node);
! PyMem_DEL(ast);
}
--- 318,322 ----
{
PyNode_Free(ast->ast_node);
! PyObject_Del(ast);
}
***************
*** 791,798 ****
/* check_terminal_tuple() already verified it's a string */
! strn = (char *)malloc(PyString_GET_SIZE(temp) + 1);
if (strn != NULL)
(void) strcpy(strn, PyString_AS_STRING(temp));
! Py_XDECREF(temp);
if (PyObject_Length(elem) == 3) {
--- 791,798 ----
/* check_terminal_tuple() already verified it's a string */
! strn = (char *)PyMem_MALLOC(PyString_GET_SIZE(temp) + 1);
if (strn != NULL)
(void) strcpy(strn, PyString_AS_STRING(temp));
! Py_DECREF(temp);
if (PyObject_Length(elem) == 3) {
Index: pcremodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/pcremodule.c,v
retrieving revision 2.18
retrieving revision 2.19
diff -C2 -r2.18 -r2.19
*** pcremodule.c 2000/04/25 15:59:32 2.18
--- pcremodule.c 2000/05/03 23:44:32 2.19
***************
*** 80,84 ****
{
PcreObject *self;
! self = PyObject_NEW(PcreObject, &Pcre_Type);
if (self == NULL)
return NULL;
--- 80,84 ----
{
PcreObject *self;
! self = PyObject_New(PcreObject, &Pcre_Type);
if (self == NULL)
return NULL;
***************
*** 96,100 ****
if (self->regex) (pcre_free)(self->regex);
if (self->regex_extra) (pcre_free)(self->regex_extra);
! PyMem_DEL(self);
}
--- 96,100 ----
if (self->regex) (pcre_free)(self->regex);
if (self->regex_extra) (pcre_free)(self->regex_extra);
! PyObject_Del(self);
}
Index: pyexpat.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/pyexpat.c,v
retrieving revision 2.3
retrieving revision 2.4
diff -C2 -r2.3 -r2.4
*** pyexpat.c 2000/04/10 12:46:05 2.3
--- pyexpat.c 2000/05/03 23:44:33 2.4
***************
*** 472,476 ****
xmlparseobject *self;
! self = PyObject_NEW(xmlparseobject, &Xmlparsetype);
if (self == NULL)
return NULL;
--- 472,476 ----
xmlparseobject *self;
! self = PyObject_New(xmlparseobject, &Xmlparsetype);
if (self == NULL)
return NULL;
***************
*** 513,517 ****
Py_XDECREF( self->handlers[i] );
}
! PyMem_DEL(self);
}
--- 513,517 ----
Py_XDECREF( self->handlers[i] );
}
! PyObject_Del(self);
}
***************
*** 684,688 ****
initpyexpat(){
PyObject *m, *d;
! char *rev="$Revision: 2.3 $";
PyObject *errors_module, *errors_dict;
--- 684,688 ----
initpyexpat(){
PyObject *m, *d;
! char *rev="$Revision: 2.4 $";
PyObject *errors_module, *errors_dict;
Index: readline.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/readline.c,v
retrieving revision 2.16
retrieving revision 2.17
diff -C2 -r2.16 -r2.17
*** readline.c 2000/02/29 13:59:23 2.16
--- readline.c 2000/05/03 23:44:33 2.17
***************
*** 378,382 ****
{
int n;
! char *p;
RETSIGTYPE (*old_inthandler)();
old_inthandler = signal(SIGINT, onintr);
--- 378,382 ----
{
int n;
! char *p, *q;
RETSIGTYPE (*old_inthandler)();
old_inthandler = signal(SIGINT, onintr);
***************
*** 392,397 ****
p = readline(prompt);
signal(SIGINT, old_inthandler);
if (p == NULL) {
! p = malloc(1);
if (p != NULL)
*p = '\0';
--- 392,399 ----
p = readline(prompt);
signal(SIGINT, old_inthandler);
+
+ /* We must return a buffer allocated with PyMem_Malloc. */
if (p == NULL) {
! p = PyMem_Malloc(1);
if (p != NULL)
*p = '\0';
***************
*** 401,408 ****
if (n > 0)
add_history(p);
! if ((p = realloc(p, n+2)) != NULL) {
p[n] = '\n';
p[n+1] = '\0';
}
return p;
}
--- 403,416 ----
if (n > 0)
add_history(p);
! /* Copy the malloc'ed buffer into a PyMem_Malloc'ed one and
! release the original. */
! q = p;
! p = PyMem_Malloc(n+2);
! if (p != NULL) {
! strncpy(p, q, n);
p[n] = '\n';
p[n+1] = '\0';
}
+ free(q);
return p;
}
Index: regexmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/regexmodule.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** regexmodule.c 2000/02/29 13:59:23 1.33
--- regexmodule.c 2000/05/03 23:44:33 1.34
***************
*** 65,69 ****
regexobject *re;
{
! PyMem_XDEL(re->re_patbuf.buffer);
Py_XDECREF(re->re_translate);
Py_XDECREF(re->re_lastok);
--- 65,70 ----
regexobject *re;
{
! if (re->re_patbuf.buffer)
! PyMem_DEL(re->re_patbuf.buffer);
Py_XDECREF(re->re_translate);
Py_XDECREF(re->re_lastok);
***************
*** 71,75 ****
Py_XDECREF(re->re_givenpat);
Py_XDECREF(re->re_realpat);
! PyMem_DEL(re);
}
--- 72,76 ----
Py_XDECREF(re->re_givenpat);
Py_XDECREF(re->re_realpat);
! PyObject_Del(re);
}
***************
*** 419,423 ****
return NULL;
}
! re = PyObject_NEW(regexobject, &Regextype);
if (re != NULL) {
char *error;
--- 420,424 ----
return NULL;
}
! re = PyObject_New(regexobject, &Regextype);
if (re != NULL) {
char *error;
Index: rotormodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/rotormodule.c,v
retrieving revision 2.22
retrieving revision 2.23
diff -C2 -r2.22 -r2.23
*** rotormodule.c 2000/02/29 13:59:23 2.22
--- rotormodule.c 2000/05/03 23:44:33 2.23
***************
*** 179,183 ****
Rotorobj *xp;
! xp = PyObject_NEW(Rotorobj, &Rotor_Type);
if (xp == NULL)
return NULL;
--- 179,183 ----
Rotorobj *xp;
! xp = PyObject_New(Rotorobj, &Rotor_Type);
if (xp == NULL)
return NULL;
***************
*** 205,212 ****
finally:
! PyMem_XDEL(xp->e_rotor);
! PyMem_XDEL(xp->d_rotor);
! PyMem_XDEL(xp->positions);
! PyMem_XDEL(xp->advances);
Py_DECREF(xp);
return (Rotorobj*)PyErr_NoMemory();
--- 205,216 ----
finally:
! if (xp->e_rotor)
! PyMem_DEL(xp->e_rotor);
! if (xp->d_rotor)
! PyMem_DEL(xp->d_rotor);
! if (xp->positions)
! PyMem_DEL(xp->positions);
! if (xp->advances)
! PyMem_DEL(xp->advances);
Py_DECREF(xp);
return (Rotorobj*)PyErr_NoMemory();
***************
*** 474,482 ****
Rotorobj *xp;
{
! PyMem_XDEL(xp->e_rotor);
! PyMem_XDEL(xp->d_rotor);
! PyMem_XDEL(xp->positions);
! PyMem_XDEL(xp->advances);
! PyMem_DEL(xp);
}
--- 478,490 ----
Rotorobj *xp;
{
! if (xp->e_rotor)
! PyMem_DEL(xp->e_rotor);
! if (xp->d_rotor)
! PyMem_DEL(xp->d_rotor);
! if (xp->positions)
! PyMem_DEL(xp->positions);
! if (xp->advances)
! PyMem_DEL(xp->advances);
! PyObject_Del(xp);
}
Index: selectmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/selectmodule.c,v
retrieving revision 2.31
retrieving revision 2.32
diff -C2 -r2.31 -r2.32
*** selectmodule.c 2000/02/29 13:59:23 2.31
--- selectmodule.c 2000/05/03 23:44:33 2.32
***************
*** 279,285 ****
efd2obj = PyMem_NEW(pylist, FD_SETSIZE + 3);
if (rfd2obj == NULL || wfd2obj == NULL || efd2obj == NULL) {
! PyMem_XDEL(rfd2obj);
! PyMem_XDEL(wfd2obj);
! PyMem_XDEL(efd2obj);
return NULL;
}
--- 279,285 ----
efd2obj = PyMem_NEW(pylist, FD_SETSIZE + 3);
if (rfd2obj == NULL || wfd2obj == NULL || efd2obj == NULL) {
! if (rfd2obj) PyMem_DEL(rfd2obj);
! if (wfd2obj) PyMem_DEL(wfd2obj);
! if (efd2obj) PyMem_DEL(efd2obj);
return NULL;
}
Index: shamodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/shamodule.c,v
retrieving revision 2.4
retrieving revision 2.5
diff -C2 -r2.4 -r2.5
*** shamodule.c 2000/02/29 13:59:23 2.4
--- shamodule.c 2000/05/03 23:44:33 2.5
***************
*** 381,385 ****
newSHAobject()
{
! return (SHAobject *)PyObject_NEW(SHAobject, &SHAtype);
}
--- 381,385 ----
newSHAobject()
{
! return (SHAobject *)PyObject_New(SHAobject, &SHAtype);
}
***************
*** 390,394 ****
PyObject *ptr;
{
! PyMem_DEL(ptr);
}
--- 390,394 ----
PyObject *ptr;
{
! PyObject_Del(ptr);
}
Index: socketmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -C2 -r1.106 -r1.107
*** socketmodule.c 2000/04/25 21:53:58 1.106
--- socketmodule.c 2000/05/03 23:44:33 1.107
***************
*** 390,394 ****
PySocketSockObject *s;
PySocketSock_Type.ob_type = &PyType_Type;
! s = PyObject_NEW(PySocketSockObject, &PySocketSock_Type);
if (s != NULL) {
s->sock_fd = fd;
--- 390,394 ----
PySocketSockObject *s;
PySocketSock_Type.ob_type = &PyType_Type;
! s = PyObject_New(PySocketSockObject, &PySocketSock_Type);
if (s != NULL) {
s->sock_fd = fd;
***************
*** 1369,1373 ****
if (s->sock_fd != -1)
(void) SOCKETCLOSE(s->sock_fd);
! PyMem_DEL(s);
}
--- 1369,1373 ----
if (s->sock_fd != -1)
(void) SOCKETCLOSE(s->sock_fd);
! PyObject_Del(s);
}
***************
*** 1949,1953 ****
#endif
! self = PyObject_NEW(SSLObject, &SSL_Type); /* Create new object */
if (self == NULL){
PyErr_SetObject(SSLErrorObject,
--- 1949,1953 ----
#endif
! self = PyObject_New(SSLObject, &SSL_Type); /* Create new object */
if (self == NULL){
PyErr_SetObject(SSLErrorObject,
***************
*** 1963,1967 ****
PyErr_SetObject(SSLErrorObject,
PyString_FromString("SSL_CTX_new error"));
! PyMem_DEL(self);
return NULL;
}
--- 1963,1967 ----
PyErr_SetObject(SSLErrorObject,
PyString_FromString("SSL_CTX_new error"));
! PyObject_Del(self);
return NULL;
}
***************
*** 1972,1976 ****
PyString_FromString(
"Both the key & certificate files must be specified"));
! PyMem_DEL(self);
return NULL;
}
--- 1972,1976 ----
PyString_FromString(
"Both the key & certificate files must be specified"));
! PyObject_Del(self);
return NULL;
}
***************
*** 1984,1988 ****
PyString_FromString(
"SSL_CTX_use_PrivateKey_file error"));
! PyMem_DEL(self);
return NULL;
}
--- 1984,1988 ----
PyString_FromString(
"SSL_CTX_use_PrivateKey_file error"));
! PyObject_Del(self);
return NULL;
}
***************
*** 1994,1998 ****
PyString_FromString(
"SSL_CTX_use_certificate_chain_file error"));
! PyMem_DEL(self);
return NULL;
}
--- 1994,1998 ----
PyString_FromString(
"SSL_CTX_use_certificate_chain_file error"));
! PyObject_Del(self);
return NULL;
}
***************
*** 2009,2013 ****
PyErr_SetObject(SSLErrorObject,
PyString_FromString("SSL_connect error"));
! PyMem_DEL(self);
return NULL;
}
--- 2009,2013 ----
PyErr_SetObject(SSLErrorObject,
PyString_FromString("SSL_connect error"));
! PyObject_Del(self);
return NULL;
}
***************
*** 2080,2084 ****
Py_XDECREF(self->x_attr);
Py_XDECREF(self->Socket);
! PyMem_DEL(self);
}
--- 2080,2084 ----
Py_XDECREF(self->x_attr);
Py_XDECREF(self->Socket);
! PyObject_Del(self);
}
Index: stropmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/stropmodule.c,v
retrieving revision 2.62
retrieving revision 2.63
diff -C2 -r2.62 -r2.63
*** stropmodule.c 2000/03/20 16:36:39 2.62
--- stropmodule.c 2000/05/03 23:44:33 2.63
***************
*** 1153,1157 ****
new_len = len + nfound*(sub_len - pat_len);
! new_s = (char *)malloc(new_len);
if (new_s == NULL) return NULL;
--- 1153,1157 ----
new_len = len + nfound*(sub_len - pat_len);
! new_s = (char *)PyMem_MALLOC(new_len);
if (new_s == NULL) return NULL;
***************
*** 1226,1230 ****
else {
new = PyString_FromStringAndSize(new_s, out_len);
! free(new_s);
}
return new;
--- 1226,1230 ----
else {
new = PyString_FromStringAndSize(new_s, out_len);
! PyMem_FREE(new_s);
}
return new;
Index: sunaudiodev.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/sunaudiodev.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** sunaudiodev.c 1998/10/31 22:52:54 1.16
--- sunaudiodev.c 2000/05/03 23:44:33 1.17
***************
*** 140,144 ****
/* Create and initialize the object */
! xp = PyObject_NEW(sadobject, &Sadtype);
if (xp == NULL) {
close(fd);
--- 140,144 ----
/* Create and initialize the object */
! xp = PyObject_New(sadobject, &Sadtype);
if (xp == NULL) {
close(fd);
***************
*** 159,163 ****
{
close(xp->x_fd);
! PyMem_DEL(xp);
}
--- 159,163 ----
{
close(xp->x_fd);
! PyObject_Del(xp);
}
***************
*** 413,417 ****
static sadstatusobject *
sads_alloc() {
! return PyObject_NEW(sadstatusobject, &Sadstatustype);
}
--- 413,417 ----
static sadstatusobject *
sads_alloc() {
! return PyObject_New(sadstatusobject, &Sadstatustype);
}
Index: svmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/svmodule.c,v
retrieving revision 2.10
retrieving revision 2.11
diff -C2 -r2.10 -r2.11
*** svmodule.c 1997/10/01 04:28:58 2.10
--- svmodule.c 2000/05/03 23:44:33 2.11
***************
*** 341,345 ****
self->ob_svideo = NULL;
}
! PyMem_DEL(self);
}
--- 341,345 ----
self->ob_svideo = NULL;
}
! PyObject_Del(self);
}
***************
*** 375,379 ****
captureobject *p;
! p = PyObject_NEW(captureobject, &Capturetype);
if (p == NULL)
return NULL;
--- 375,379 ----
captureobject *p;
! p = PyObject_New(captureobject, &Capturetype);
if (p == NULL)
return NULL;
***************
*** 995,999 ****
if (self->ob_svideo != NULL)
(void) svCloseVideo(self->ob_svideo);
! PyMem_DEL(self);
}
--- 995,999 ----
if (self->ob_svideo != NULL)
(void) svCloseVideo(self->ob_svideo);
! PyObject_Del(self);
}
***************
*** 1027,1031 ****
svobject *p;
! p = PyObject_NEW(svobject, &Svtype);
if (p == NULL)
return NULL;
--- 1027,1031 ----
svobject *p;
! p = PyObject_New(svobject, &Svtype);
if (p == NULL)
return NULL;
Index: threadmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/threadmodule.c,v
retrieving revision 2.30
retrieving revision 2.31
diff -C2 -r2.30 -r2.31
*** threadmodule.c 2000/02/29 13:59:24 2.30
--- threadmodule.c 2000/05/03 23:44:33 2.31
***************
*** 59,68 ****
{
lockobject *self;
! self = PyObject_NEW(lockobject, &Locktype);
if (self == NULL)
return NULL;
self->lock_lock = PyThread_allocate_lock();
if (self->lock_lock == NULL) {
! PyMem_DEL(self);
self = NULL;
PyErr_SetString(ThreadError, "can't allocate lock");
--- 59,68 ----
{
lockobject *self;
! self = PyObject_New(lockobject, &Locktype);
if (self == NULL)
return NULL;
self->lock_lock = PyThread_allocate_lock();
if (self->lock_lock == NULL) {
! PyObject_Del(self);
self = NULL;
PyErr_SetString(ThreadError, "can't allocate lock");
***************
*** 80,84 ****
PyThread_free_lock(self->lock_lock);
! PyMem_DEL(self);
}
--- 80,84 ----
PyThread_free_lock(self->lock_lock);
! PyObject_Del(self);
}
Index: xxmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/xxmodule.c,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -r2.15 -r2.16
*** xxmodule.c 2000/02/29 13:59:24 2.15
--- xxmodule.c 2000/05/03 23:44:33 2.16
***************
*** 63,67 ****
{
XxoObject *self;
! self = PyObject_NEW(XxoObject, &Xxo_Type);
if (self == NULL)
return NULL;
--- 63,67 ----
{
XxoObject *self;
! self = PyObject_New(XxoObject, &Xxo_Type);
if (self == NULL)
return NULL;
***************
*** 77,81 ****
{
Py_XDECREF(self->x_attr);
! PyMem_DEL(self);
}
--- 77,81 ----
{
Py_XDECREF(self->x_attr);
! PyObject_Del(self);
}
Index: zlibmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/zlibmodule.c,v
retrieving revision 2.31
retrieving revision 2.32
diff -C2 -r2.31 -r2.32
*** zlibmodule.c 2000/04/06 13:20:38 2.31
--- zlibmodule.c 2000/05/03 23:44:33 2.32
***************
*** 47,51 ****
{
compobject *self;
! self = PyObject_NEW(compobject, type);
if (self == NULL)
return NULL;
--- 47,51 ----
{
compobject *self;
! self = PyObject_New(compobject, type);
if (self == NULL)
return NULL;
***************
*** 370,374 ****
deflateEnd(&self->zst);
Py_XDECREF(self->unused_data);
! PyMem_DEL(self);
}
--- 370,374 ----
deflateEnd(&self->zst);
Py_XDECREF(self->unused_data);
! PyObject_Del(self);
}
***************
*** 379,383 ****
inflateEnd(&self->zst);
Py_XDECREF(self->unused_data);
! PyMem_DEL(self);
}
--- 379,383 ----
inflateEnd(&self->zst);
Py_XDECREF(self->unused_data);
! PyObject_Del(self);
}
- Previous message: [Python-checkins] CVS: python/dist/src/Parser myreadline.c,2.16,2.17 parsetok.c,2.15,2.16 pgenmain.c,2.15,2.16 tokenizer.c,2.40,2.41
- Next message: [Python-checkins] CVS: python/dist/src/Objects bufferobject.c,2.6,2.7 classobject.c,2.85,2.86 cobject.c,2.7,2.8 complexobject.c,2.23,2.24 dictobject.c,2.51,2.52 fileobject.c,2.72,2.73 floatobject.c,2.56,2.57 frameobject.c,2.38,2.39 funcobject.c,2.19,2.20 intobject.c,2.40,2.41 listobject.c,2.68,2.69 longobject.c,1.56,1.57 methodobject.c,2.25,2.26 moduleobject.c,2.24,2.25 object.c,2.69,2.70 rangeobject.c,2.11,2.12 sliceobject.c,2.3,2.4 stringobject.c,2.62,2.63 tupleobject.c,2.32,2.33 unicodeobject.c,2.15,2.16 xxobject.c,2.14,2.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]