diff options
author | Guido van Rossum <guido@python.org> | 2000-05-03 23:44:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-05-03 23:44:39 (GMT) |
commit | b18618dab7b6b85bb05b084693706e59211fa180 (patch) | |
tree | 785d51f6677da8366be2ad4b4296a62f53161276 /Modules/cStringIO.c | |
parent | 2808b744e8d94459f189e1d89c97072d6a1f53b6 (diff) | |
download | cpython-b18618dab7b6b85bb05b084693706e59211fa180.zip cpython-b18618dab7b6b85bb05b084693706e59211fa180.tar.gz cpython-b18618dab7b6b85bb05b084693706e59211fa180.tar.bz2 |
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.)
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r-- | Modules/cStringIO.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c index e816178..557545f 100644 --- a/Modules/cStringIO.c +++ b/Modules/cStringIO.c @@ -56,7 +56,7 @@ static char cStringIO_module_documentation[] = "\n" "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" +"full generality if StringIO, but it provides enough for most\n" "applications and is especially useful in conjuction with the\n" "pickle module.\n" "\n" @@ -407,7 +407,7 @@ static void O_dealloc(Oobject *self) { if (self->buf != NULL) free(self->buf); - PyMem_DEL(self); + PyObject_Del(self); } static PyObject * @@ -465,7 +465,7 @@ static PyObject * newOobject(int size) { Oobject *self; - self = PyObject_NEW(Oobject, &Otype); + self = PyObject_New(Oobject, &Otype); if (self == NULL) return NULL; self->pos=0; @@ -536,7 +536,7 @@ static struct PyMethodDef I_methods[] = { static void I_dealloc(Iobject *self) { Py_XDECREF(self->pbuf); - PyMem_DEL(self); + PyObject_Del(self); } static PyObject * @@ -586,7 +586,7 @@ newIobject(PyObject *s) { } buf = PyString_AS_STRING(s); size = PyString_GET_SIZE(s); - UNLESS(self = PyObject_NEW(Iobject, &Itype)) return NULL; + UNLESS(self = PyObject_New(Iobject, &Itype)) return NULL; Py_INCREF(s); self->buf=buf; self->string_size=size; |