Skip to content

Instantly share code, notes, and snippets.

@dcolish
Created November 28, 2011 21:04
Show Gist options
  • Select an option

  • Save dcolish/1402050 to your computer and use it in GitHub Desktop.

Select an option

Save dcolish/1402050 to your computer and use it in GitHub Desktop.
Lame patch for less broken pypy support in swig
diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg
index d730a2d..b9bef17 100644
--- a/Lib/python/pyrun.swg
+++ b/Lib/python/pyrun.swg
@@ -1056,8 +1056,9 @@ SWIG_This(void)
/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
-/* TODO: I don't know how to implement the fast getset in Python 3 right now */
-#if PY_VERSION_HEX>=0x03000000
+/* TODO: I don't know how to implement the fast getset in Python 3 PyPy right
+ * now */
+#if ((PY_VERSION_HEX>=0x03000000) || defined(PYPY_VERSION))
#define SWIG_PYTHON_SLOW_GETSET_THIS
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment