diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-04-12 03:05:19 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-04-12 03:05:19 (GMT) |
commit | 510492e98552131b1326bb5caa4e347fc15389f8 (patch) | |
tree | 3a305c2f698f591a0f367d8caf96f05609126165 /Objects | |
parent | 9acae5a0a6f9fd15dbe7d8da8c5604a161b0d7a6 (diff) | |
download | cpython-510492e98552131b1326bb5caa4e347fc15389f8.zip cpython-510492e98552131b1326bb5caa4e347fc15389f8.tar.gz cpython-510492e98552131b1326bb5caa4e347fc15389f8.tar.bz2 |
Remove PyMalloc_New, _PyMalloc_MALLOC, and PyMalloc_Del.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/stringobject.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 2a63cfe..359e942 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -64,7 +64,7 @@ PyString_FromStringAndSize(const char *str, int size) /* PyObject_NewVar is inlined */ op = (PyStringObject *) - _PyMalloc_MALLOC(sizeof(PyStringObject) + size * sizeof(char)); + PyObject_MALLOC(sizeof(PyStringObject) + size * sizeof(char)); if (op == NULL) return PyErr_NoMemory(); PyObject_INIT_VAR(op, &PyString_Type, size); @@ -120,7 +120,7 @@ PyString_FromString(const char *str) /* PyObject_NewVar is inlined */ op = (PyStringObject *) - _PyMalloc_MALLOC(sizeof(PyStringObject) + size * sizeof(char)); + PyObject_MALLOC(sizeof(PyStringObject) + size * sizeof(char)); if (op == NULL) return PyErr_NoMemory(); PyObject_INIT_VAR(op, &PyString_Type, size); @@ -717,7 +717,7 @@ string_concat(register PyStringObject *a, register PyObject *bb) size = a->ob_size + b->ob_size; /* PyObject_NewVar is inlined */ op = (PyStringObject *) - _PyMalloc_MALLOC(sizeof(PyStringObject) + size * sizeof(char)); + PyObject_MALLOC(sizeof(PyStringObject) + size * sizeof(char)); if (op == NULL) return PyErr_NoMemory(); PyObject_INIT_VAR(op, &PyString_Type, size); @@ -760,7 +760,7 @@ string_repeat(register PyStringObject *a, register int n) return NULL; } op = (PyStringObject *) - _PyMalloc_MALLOC(sizeof(PyStringObject) + nbytes); + PyObject_MALLOC(sizeof(PyStringObject) + nbytes); if (op == NULL) return PyErr_NoMemory(); PyObject_INIT_VAR(op, &PyString_Type, size); @@ -2755,7 +2755,7 @@ PyTypeObject PyString_Type = { 0, /* tp_init */ 0, /* tp_alloc */ string_new, /* tp_new */ - _PyMalloc_Del, /* tp_free */ + PyObject_Del, /* tp_free */ }; void @@ -2807,10 +2807,10 @@ _PyString_Resize(PyObject **pv, int newsize) #endif _Py_ForgetReference(v); *pv = (PyObject *) - _PyMalloc_REALLOC((char *)v, + PyObject_REALLOC((char *)v, sizeof(PyStringObject) + newsize * sizeof(char)); if (*pv == NULL) { - PyMalloc_Del(v); + PyObject_Del(v); PyErr_NoMemory(); return -1; } |