]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39127: Make _Py_HashPointer's argument be const (GH-17690)
authorAndy Lester <andy@petdance.com>
Wed, 5 Feb 2020 21:09:57 +0000 (15:09 -0600)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2020 21:09:57 +0000 (23:09 +0200)
Include/pyhash.h
Python/pyhash.c

index dbcc9744be35a7bba2b760840db4312d5b8cc08a..2f398589cee7efd5b5e511e32651d15085c3d801 100644 (file)
@@ -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
 
index 4c0b929586fc16e59f6917dfe6c9c1c858299275..d381dc0230c5bfdf606ad434fea2a58dde9e5d17 100644 (file)
@@ -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;