Kaydet (Commit) ab02db23 authored tarafından Trent Nelson's avatar Trent Nelson

Silence compiler warnings on Solaris 10 via explicit (void *) casts.

(Compiler: Solaris Studio 12.3)
üst 16d2b478
...@@ -5772,7 +5772,7 @@ update_one_slot(PyTypeObject *type, slotdef *p) ...@@ -5772,7 +5772,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
descr = _PyType_Lookup(type, p->name_strobj); descr = _PyType_Lookup(type, p->name_strobj);
if (descr == NULL) { if (descr == NULL) {
if (ptr == (void**)&type->tp_iternext) { if (ptr == (void**)&type->tp_iternext) {
specific = _PyObject_NextNotImplemented; specific = (void *)_PyObject_NextNotImplemented;
} }
continue; continue;
} }
...@@ -5819,7 +5819,7 @@ update_one_slot(PyTypeObject *type, slotdef *p) ...@@ -5819,7 +5819,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
/* We specifically allow __hash__ to be set to None /* We specifically allow __hash__ to be set to None
to prevent inheritance of the default to prevent inheritance of the default
implementation from object.__hash__ */ implementation from object.__hash__ */
specific = PyObject_HashNotImplemented; specific = (void *)PyObject_HashNotImplemented;
} }
else { else {
use_generic = 1; use_generic = 1;
...@@ -6034,7 +6034,7 @@ add_operators(PyTypeObject *type) ...@@ -6034,7 +6034,7 @@ add_operators(PyTypeObject *type)
continue; continue;
if (PyDict_GetItem(dict, p->name_strobj)) if (PyDict_GetItem(dict, p->name_strobj))
continue; continue;
if (*ptr == PyObject_HashNotImplemented) { if (*ptr == (void *)PyObject_HashNotImplemented) {
/* Classes may prevent the inheritance of the tp_hash /* Classes may prevent the inheritance of the tp_hash
slot by storing PyObject_HashNotImplemented in it. Make it slot by storing PyObject_HashNotImplemented in it. Make it
visible as a None value for the __hash__ attribute. */ visible as a None value for the __hash__ attribute. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment