| 1 |
Index: libs/python/src/object/function.cpp |
| 2 |
=================================================================== |
| 3 |
--- libs/python/src/object/function.cpp 2010-04-04 07:19:57 +0200 |
| 4 |
+++ libs/python/src/object/function.cpp 2010-06-02 23:26:12 +0200 |
| 5 |
@@ -435,7 +435,7 @@ |
| 6 |
function* new_func = downcast<function>(attribute.ptr()); |
| 7 |
PyObject* dict = 0; |
| 8 |
|
| 9 |
-#if PY_VERSION_HEX < 0x03000000 |
| 10 |
+#if PY_VERSION_HEX < 0x03000000 && !defined(PYPY_VERSION) |
| 11 |
// Old-style class gone in Python 3 |
| 12 |
if (PyClass_Check(ns)) |
| 13 |
dict = ((PyClassObject*)ns)->cl_dict; |
| 14 |
Index: libs/python/src/wrapper.cpp |
| 15 |
=================================================================== |
| 16 |
--- libs/python/src/wrapper.cpp 2008-03-22 22:45:55 +0100 |
| 17 |
+++ libs/python/src/wrapper.cpp 2010-06-02 23:27:44 +0200 |
| 18 |
@@ -25,7 +25,7 @@ |
| 19 |
|
| 20 |
if ( |
| 21 |
PyMethod_Check(m.get()) |
| 22 |
- && ((PyMethodObject*)m.get())->im_self == this->m_self |
| 23 |
+ && PyMethod_GET_SELF(m.get()) == this->m_self |
| 24 |
&& class_object->tp_dict != 0 |
| 25 |
) |
| 26 |
{ |
| 27 |
@@ -34,7 +34,7 @@ |
| 28 |
|
| 29 |
|
| 30 |
} |
| 31 |
- if (borrowed_f != ((PyMethodObject*)m.get())->im_func) |
| 32 |
+ if (borrowed_f != PyMethod_GET_FUNCTION(m.get())) |
| 33 |
return override(m); |
| 34 |
} |
| 35 |
} |
| 36 |
Index: tools/build/v2/user-config.jam |
| 37 |
=================================================================== |
| 38 |
--- tools/build/v2/user-config.jam 2008-07-15 15:53:41 +0200 |
| 39 |
+++ tools/build/v2/user-config.jam 2010-06-02 23:46:13 +0200 |
| 40 |
@@ -84,3 +84,16 @@ |
| 41 |
|
| 42 |
# Configure with an explicit installation prefix. |
| 43 |
# using qt : /usr/opt/qt ; |
| 44 |
+ |
| 45 |
+# ------------------- |
| 46 |
+# PyPy configuration. |
| 47 |
+# ------------------- |
| 48 |
+ |
| 49 |
+PYPY_HOME = /home/amaury/trunk ; |
| 50 |
+ |
| 51 |
+using python : 2.5 |
| 52 |
+ : $(PYPY_HOME)/pypy/pypy-c # interpreter |
| 53 |
+ : $(PYPY_HOME)/pypy/module/cpyext/include # include paths |
| 54 |
+ $(PYPY_HOME)/pypy/_interfaces |
| 55 |
+ : $(PYPY_HOME)/pypy/_interfaces # library path |
| 56 |
+ ; |
| 57 |
|