diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2012-10-18 21:18:42 (GMT) |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2012-10-18 21:18:42 (GMT) |
commit | e453e4c007b5dd5feade42bd3f3294cb8af9fd37 (patch) | |
tree | 33801cbc4c67e00998d532763329410f01f6b923 /Objects/longobject.c | |
parent | 74375fc06aac5093f14cb13e64fef439a1f972ab (diff) | |
download | cpython-e453e4c007b5dd5feade42bd3f3294cb8af9fd37.zip cpython-e453e4c007b5dd5feade42bd3f3294cb8af9fd37.tar.gz cpython-e453e4c007b5dd5feade42bd3f3294cb8af9fd37.tar.bz2 |
Issue 16280: Drop questionable special-casing of null pointer in PyLong_FromVoidPtr.
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 95bd836..4024491 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -936,9 +936,6 @@ PyObject * PyLong_FromVoidPtr(void *p) { #if SIZEOF_VOID_P <= SIZEOF_LONG - /* special-case null pointer */ - if (!p) - return PyLong_FromLong(0); return PyLong_FromUnsignedLong((unsigned long)(Py_uintptr_t)p); #else @@ -948,9 +945,6 @@ PyLong_FromVoidPtr(void *p) #if SIZEOF_LONG_LONG < SIZEOF_VOID_P # error "PyLong_FromVoidPtr: sizeof(PY_LONG_LONG) < sizeof(void*)" #endif - /* special-case null pointer */ - if (!p) - return PyLong_FromLong(0); return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)(Py_uintptr_t)p); #endif /* SIZEOF_VOID_P <= SIZEOF_LONG */ |