Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 22977:4ba091cc70b8 legacy-trunk
Remove PyMalloc_New, _PyMalloc_MALLOC, and PyMalloc_Del.
| author | Neil Schemenauer <nascheme@enme.ucalgary.ca> |
|---|---|
| date | Fri, 12 Apr 2002 03:05:19 +0000 |
| parents | aa8d59823add |
| children | 202ae5b75cca |
line wrap: on
line diff
--- a/Objects/stringobject.c Fri Apr 12 02:44:55 2002 +0000 +++ b/Objects/stringobject.c Fri Apr 12 03:05:19 2002 +0000 @@ -64,7 +64,7 @@ /* 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 @@ /* 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 @@ 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 @@ 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 @@ 0, /* tp_init */ 0, /* tp_alloc */ string_new, /* tp_new */ - _PyMalloc_Del, /* tp_free */ + PyObject_Del, /* tp_free */ }; void @@ -2807,10 +2807,10 @@ #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; }
