@@ -68,7 +68,7 @@ PyString_FromStringAndSize(const char *str, int size)
6868
6969 /* PyObject_NewVar is inlined */
7070 op = (PyStringObject * )
71- PyObject_MALLOC (sizeof (PyStringObject ) + size * sizeof (char ));
71+ _PyMalloc_MALLOC (sizeof (PyStringObject ) + size * sizeof (char ));
7272 if (op == NULL )
7373 return PyErr_NoMemory ();
7474 PyObject_INIT_VAR (op , & PyString_Type , size );
@@ -131,7 +131,7 @@ PyString_FromString(const char *str)
131131
132132 /* PyObject_NewVar is inlined */
133133 op = (PyStringObject * )
134- PyObject_MALLOC (sizeof (PyStringObject ) + size * sizeof (char ));
134+ _PyMalloc_MALLOC (sizeof (PyStringObject ) + size * sizeof (char ));
135135 if (op == NULL )
136136 return PyErr_NoMemory ();
137137 PyObject_INIT_VAR (op , & PyString_Type , size );
@@ -733,7 +733,7 @@ string_concat(register PyStringObject *a, register PyObject *bb)
733733 size = a -> ob_size + b -> ob_size ;
734734 /* PyObject_NewVar is inlined */
735735 op = (PyStringObject * )
736- PyObject_MALLOC (sizeof (PyStringObject ) + size * sizeof (char ));
736+ _PyMalloc_MALLOC (sizeof (PyStringObject ) + size * sizeof (char ));
737737 if (op == NULL )
738738 return PyErr_NoMemory ();
739739 PyObject_INIT_VAR (op , & PyString_Type , size );
@@ -780,7 +780,7 @@ string_repeat(register PyStringObject *a, register int n)
780780 return NULL ;
781781 }
782782 op = (PyStringObject * )
783- PyObject_MALLOC (sizeof (PyStringObject ) + nbytes );
783+ _PyMalloc_MALLOC (sizeof (PyStringObject ) + nbytes );
784784 if (op == NULL )
785785 return PyErr_NoMemory ();
786786 PyObject_INIT_VAR (op , & PyString_Type , size );
@@ -2789,7 +2789,7 @@ PyTypeObject PyString_Type = {
27892789 0 , /* tp_init */
27902790 0 , /* tp_alloc */
27912791 string_new , /* tp_new */
2792- _PyObject_Del , /* tp_free */
2792+ _PyMalloc_Del , /* tp_free */
27932793};
27942794
27952795void
@@ -2841,10 +2841,10 @@ _PyString_Resize(PyObject **pv, int newsize)
28412841#endif
28422842 _Py_ForgetReference (v );
28432843 * pv = (PyObject * )
2844- PyObject_REALLOC ((char * )v ,
2844+ _PyMalloc_REALLOC ((char * )v ,
28452845 sizeof (PyStringObject ) + newsize * sizeof (char ));
28462846 if (* pv == NULL ) {
2847- PyObject_DEL (v );
2847+ PyMalloc_Del (v );
28482848 PyErr_NoMemory ();
28492849 return -1 ;
28502850 }
0 commit comments