mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
follow up to #9778: define and use an unsigned hash type
This commit is contained in:
parent
2b9af63b4f
commit
8035bc5c04
7 changed files with 22 additions and 20 deletions
|
|
@ -4314,14 +4314,14 @@ static PyObject *
|
|||
wrap_hashfunc(PyObject *self, PyObject *args, void *wrapped)
|
||||
{
|
||||
hashfunc func = (hashfunc)wrapped;
|
||||
long res;
|
||||
Py_hash_t res;
|
||||
|
||||
if (!check_num_args(args, 0))
|
||||
return NULL;
|
||||
res = (*func)(self);
|
||||
if (res == -1 && PyErr_Occurred())
|
||||
return NULL;
|
||||
return PyLong_FromLong(res);
|
||||
return PyLong_FromSsize_t(res);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue