Browse Source

bpo-39127: Make _Py_HashPointer's argument be const (GH-17690)

pull/18370/head
Andy Lester 6 years ago
committed by GitHub
parent
commit
3d06953c34
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Include/pyhash.h
  2. 2
      Python/pyhash.c

2
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

2
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;

Loading…
Cancel
Save