diff options
author | Thomas Wouters <thomas@python.org> | 2000-07-25 12:56:38 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2000-07-25 12:56:38 (GMT) |
commit | 334fb8985bc126f62af65669150c30787eabddd9 (patch) | |
tree | 114a52660cda84eb69f1fe8c24d0df7458dbe875 /Objects | |
parent | bf680266da23b0b95a03d2b7ea5da493d341a562 (diff) | |
download | cpython-334fb8985bc126f62af65669150c30787eabddd9.zip cpython-334fb8985bc126f62af65669150c30787eabddd9.tar.gz cpython-334fb8985bc126f62af65669150c30787eabddd9.tar.bz2 |
Use 'void' directly instead of the ANY #define, now that all code is ANSI C.
Leave the actual #define in for API compatibility.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/listobject.c | 4 | ||||
-rw-r--r-- | Objects/object.c | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c index 52640fb..42eedf2 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -1258,8 +1258,8 @@ PyList_AsTuple(PyObject *v) if (w == NULL) return NULL; p = ((PyTupleObject *)w)->ob_item; - memcpy((ANY *)p, - (ANY *)((PyListObject *)v)->ob_item, + memcpy((void *)p, + (void *)((PyListObject *)v)->ob_item, n*sizeof(PyObject *)); while (--n >= 0) { Py_INCREF(*p); diff --git a/Objects/object.c b/Objects/object.c index ef3455e..6fe05f1 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -962,7 +962,7 @@ int (*_Py_abstract_hack)(PyObject *) = &PyObject_Size; /* Python's malloc wrappers (see mymalloc.h) */ -ANY * +void * PyMem_Malloc(size_t nbytes) { #if _PyMem_EXTRA > 0 @@ -972,8 +972,8 @@ PyMem_Malloc(size_t nbytes) return PyMem_MALLOC(nbytes); } -ANY * -PyMem_Realloc(ANY *p, size_t nbytes) +void * +PyMem_Realloc(void *p, size_t nbytes) { #if _PyMem_EXTRA > 0 if (nbytes == 0) @@ -983,7 +983,7 @@ PyMem_Realloc(ANY *p, size_t nbytes) } void -PyMem_Free(ANY *p) +PyMem_Free(void *p) { PyMem_FREE(p); } @@ -991,20 +991,20 @@ PyMem_Free(ANY *p) /* Python's object malloc wrappers (see objimpl.h) */ -ANY * +void * PyObject_Malloc(size_t nbytes) { return PyObject_MALLOC(nbytes); } -ANY * -PyObject_Realloc(ANY *p, size_t nbytes) +void * +PyObject_Realloc(void *p, size_t nbytes) { return PyObject_REALLOC(p, nbytes); } void -PyObject_Free(ANY *p) +PyObject_Free(void *p) { PyObject_FREE(p); } |