From: Andy Lester Date: Wed, 5 Feb 2020 21:09:57 +0000 (-0600) Subject: bpo-39127: Make _Py_HashPointer's argument be const (GH-17690) X-Git-Tag: v3.9.0a4~124 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d06953c34fd6421dd1dfdb615578cde676ee0eb;p=thirdparty%2FPython%2Fcpython.git bpo-39127: Make _Py_HashPointer's argument be const (GH-17690) --- diff --git a/Include/pyhash.h b/Include/pyhash.h index dbcc9744be35..2f398589cee7 100644 --- a/Include/pyhash.h +++ b/Include/pyhash.h @@ -8,7 +8,7 @@ extern "C" { /* Helpers for hash functions */ #ifndef Py_LIMITED_API PyAPI_FUNC(Py_hash_t) _Py_HashDouble(double); -PyAPI_FUNC(Py_hash_t) _Py_HashPointer(void*); +PyAPI_FUNC(Py_hash_t) _Py_HashPointer(const void*); PyAPI_FUNC(Py_hash_t) _Py_HashBytes(const void*, Py_ssize_t); #endif diff --git a/Python/pyhash.c b/Python/pyhash.c index 4c0b929586fc..d381dc0230c5 100644 --- a/Python/pyhash.c +++ b/Python/pyhash.c @@ -129,7 +129,7 @@ _Py_HashDouble(double v) } Py_hash_t -_Py_HashPointer(void *p) +_Py_HashPointer(const void *p) { Py_hash_t x; size_t y = (size_t)p;