]> granicus.if.org Git - python/commitdiff
Add (void *) casts to solve some problems on HP-UX 11.0, as discussed
authorGuido van Rossum <guido@python.org>
Mon, 15 Oct 2001 19:44:24 +0000 (19:44 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 15 Oct 2001 19:44:24 +0000 (19:44 +0000)
on SF bug #467145.

Objects/typeobject.c

index 8f372292986f950ae543865261272f06aad4e70f..b401abcb900e1c0946fe96ac727146c50b71e858 100644 (file)
@@ -3461,7 +3461,7 @@ slot_tp_getattr_hook(PyObject *self, PyObject *name)
        if (getattribute != NULL &&
            getattribute->ob_type == &PyWrapperDescr_Type &&
            ((PyWrapperDescrObject *)getattribute)->d_wrapped ==
-           PyObject_GenericGetAttr)
+           (void *)PyObject_GenericGetAttr)
                    getattribute = NULL;
        if (getattr == NULL && getattribute == NULL) {
                /* Use the default dispatcher */
@@ -3700,9 +3700,9 @@ typedef struct {
 #undef RBINSLOT
 
 #define TPSLOT(NAME, SLOT, FUNCTION, WRAPPER) \
-       {NAME, offsetof(PyTypeObject, SLOT), FUNCTION, WRAPPER}
+       {NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER}
 #define ETSLOT(NAME, SLOT, FUNCTION, WRAPPER) \
-       {NAME, offsetof(etype, SLOT), FUNCTION, WRAPPER}
+       {NAME, offsetof(etype, SLOT), (void *)(FUNCTION), WRAPPER}
 #define SQSLOT(NAME, SLOT, FUNCTION, WRAPPER) \
        ETSLOT(NAME, as_sequence.SLOT, FUNCTION, WRAPPER)
 #define MPSLOT(NAME, SLOT, FUNCTION, WRAPPER) \