From fa7d24005bd8173d7e392d8fcf2c70da8084e7a0 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Fri, 7 Feb 2014 17:11:06 +0400 Subject: [PATCH] Fixed `undefined symbol: PyLong_AsSize_t` on PyPy --- src/utils.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils.h b/src/utils.h index 3b3c42a07..60575b1ea 100644 --- a/src/utils.h +++ b/src/utils.h @@ -61,6 +61,10 @@ #define to_encoding(x) PyUnicode_DecodeASCII(x, strlen(x), "strict") #endif +#ifdef PYPY_VERSION + #define PyLong_AsSize_t (size_t)PyLong_AsUnsignedLong +#endif + #ifndef Py_hash_t #define Py_hash_t long #endif