summaryrefslogtreecommitdiffstats
path: root/Modules/gcmodule.c
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2006-04-11 12:14:09 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2006-04-11 12:14:09 (GMT)
commit64182fe0b39870d30b08da54696c4d02e7b52bc5 (patch)
treedc4d5d2672d7fe70e9f0ed8411ca23be9df849b6 /Modules/gcmodule.c
parent7b782b61c597a989a21a22c15ee95decf997429f (diff)
downloadcpython-64182fe0b39870d30b08da54696c4d02e7b52bc5.zip
cpython-64182fe0b39870d30b08da54696c4d02e7b52bc5.tar.gz
cpython-64182fe0b39870d30b08da54696c4d02e7b52bc5.tar.bz2
Some more changes to make code compile under a C++ compiler.
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r--Modules/gcmodule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 5bf95b9..5d9e548 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -1281,7 +1281,8 @@ PyObject *
_PyObject_GC_Malloc(size_t basicsize)
{
PyObject *op;
- PyGC_Head *g = PyObject_MALLOC(sizeof(PyGC_Head) + basicsize);
+ PyGC_Head *g = (PyGC_Head *)PyObject_MALLOC(
+ sizeof(PyGC_Head) + basicsize);
if (g == NULL)
return PyErr_NoMemory();
g->gc.gc_refs = GC_UNTRACKED;
@@ -1323,7 +1324,7 @@ _PyObject_GC_Resize(PyVarObject *op, Py_ssize_t nitems)
{
const size_t basicsize = _PyObject_VAR_SIZE(op->ob_type, nitems);
PyGC_Head *g = AS_GC(op);
- g = PyObject_REALLOC(g, sizeof(PyGC_Head) + basicsize);
+ g = (PyGC_Head *)PyObject_REALLOC(g, sizeof(PyGC_Head) + basicsize);
if (g == NULL)
return (PyVarObject *)PyErr_NoMemory();
op = (PyVarObject *) FROM_GC(g);