[Python-checkins] cpython (3.2): Silence compiler warnings on Solaris 10 via explicit (void *) casts.

trent.nelson python-checkins at python.org
Wed Sep 19 03:58:17 CEST 2012


http://hg.python.org/cpython/rev/e9e6e5104936
changeset: 79048:e9e6e5104936
branch: 3.2
parent: 79044:6386e1f4f1fd
user: Trent Nelson <trent at trent.me>
date: Tue Sep 18 21:58:03 2012 -0400
summary:
 Silence compiler warnings on Solaris 10 via explicit (void *) casts.
(Compiler: Solaris Studio 12.3)
files:
 Objects/typeobject.c | 6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -5772,7 +5772,7 @@
 descr = _PyType_Lookup(type, p->name_strobj);
 if (descr == NULL) {
 if (ptr == (void**)&type->tp_iternext) {
- specific = _PyObject_NextNotImplemented;
+ specific = (void *)_PyObject_NextNotImplemented;
 }
 continue;
 }
@@ -5819,7 +5819,7 @@
 /* We specifically allow __hash__ to be set to None
 to prevent inheritance of the default
 implementation from object.__hash__ */
- specific = PyObject_HashNotImplemented;
+ specific = (void *)PyObject_HashNotImplemented;
 }
 else {
 use_generic = 1;
@@ -6034,7 +6034,7 @@
 continue;
 if (PyDict_GetItem(dict, p->name_strobj))
 continue;
- if (*ptr == PyObject_HashNotImplemented) {
+ if (*ptr == (void *)PyObject_HashNotImplemented) {
 /* Classes may prevent the inheritance of the tp_hash
 slot by storing PyObject_HashNotImplemented in it. Make it
 visible as a None value for the __hash__ attribute. */
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /