Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 228c241 commit 2359eafCopy full SHA for 2359eaf
graalpython/com.oracle.graal.python.cext/src/typeobject.c
@@ -170,8 +170,12 @@ static PyObject* wrap_lenfunc(lenfunc f, PyObject* a) {
170
return PyLong_FromSsize_t(f(a));
171
}
172
173
-static Py_hash_t wrap_hashfunc(hashfunc f, PyObject* a) {
174
- return PyLong_FromSsize_t(f(a));
+static PyObject* wrap_hashfunc(hashfunc f, PyObject* a) {
+ Py_hash_t res = f(a);
175
+ if (res == -1 && PyErr_Occurred()) {
176
+ return NULL;
177
+ }
178
+ return PyLong_FromSsize_t(res);
179
180
181
static PyObject* wrap_reverse_binop(binaryfunc f, PyObject* a, PyObject* b) {
0 commit comments