diff options
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r-- | Objects/funcobject.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index b976eab..d9ce027 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -231,10 +231,12 @@ static long func_hash(f) PyFunctionObject *f; { - long h; + long h,x; h = PyObject_Hash(f->func_code); if (h == -1) return h; - h = h ^ (long)f->func_globals; + x = _Py_HashPointer(f->func_globals); + if (x == -1) return x; + h ^= x; if (h == -1) h = -2; return h; } |