[pypy-svn] r75028 - pypy/trunk/pypy/module/cpyext/patches
afa at codespeak.net
afa at codespeak.net
Wed Jun 2 23:58:03 CEST 2010
Author: afa
Date: Wed Jun 2 23:58:01 2010
New Revision: 75028
Added:
pypy/trunk/pypy/module/cpyext/patches/boost.patch (contents, props changed)
Log:
The patch I use to compile Boost.Python.
This one is against boost version 1.43.0, but it should also apply
to other versions.
The change in wrapper.cpp is has been proposed to Boost:
https://svn.boost.org/trac/boost/ticket/4125
Added: pypy/trunk/pypy/module/cpyext/patches/boost.patch
==============================================================================
--- (empty file)
+++ pypy/trunk/pypy/module/cpyext/patches/boost.patch Wed Jun 2 23:58:01 2010
@@ -0,0 +1,63 @@
+Index: libs/python/src/object/class.cpp
+===================================================================
+--- libs/python/src/object/class.cpp 2009-11-13 01:40:01 +0100
++++ libs/python/src/object/class.cpp 2010-06-02 23:25:08 +0200
+@@ -195,7 +195,7 @@
+
+ namespace objects
+ {
+-#if PY_VERSION_HEX < 0x03000000
++#if PY_VERSION_HEX < 0x03000000 && !defined(PYPY_VERSION)
+ // XXX Not sure why this run into compiling error in Python 3
+ extern "C"
+ {
+Index: libs/python/src/object/function.cpp
+===================================================================
+--- libs/python/src/object/function.cpp 2010-04-04 07:19:57 +0200
++++ libs/python/src/object/function.cpp 2010-06-02 23:26:12 +0200
+@@ -435,7 +435,7 @@
+ function* new_func = downcast<function>(attribute.ptr());
+ PyObject* dict = 0;
+
+-#if PY_VERSION_HEX < 0x03000000
++#if PY_VERSION_HEX < 0x03000000 && !defined(PYPY_VERSION)
+ // Old-style class gone in Python 3
+ if (PyClass_Check(ns))
+ dict = ((PyClassObject*)ns)->cl_dict;
+Index: libs/python/src/wrapper.cpp
+===================================================================
+--- libs/python/src/wrapper.cpp 2008-03-22 22:45:55 +0100
++++ libs/python/src/wrapper.cpp 2010-06-02 23:27:44 +0200
+@@ -25,7 +25,7 @@
+
+ if (
+ PyMethod_Check(m.get())
+- && ((PyMethodObject*)m.get())->im_self == this->m_self
++ && PyMethod_GET_SELF(m.get()) == this->m_self
+ && class_object->tp_dict != 0
+ )
+ {
+@@ -34,7 +34,7 @@
+
+
+ }
+- if (borrowed_f != ((PyMethodObject*)m.get())->im_func)
++ if (borrowed_f != PyMethod_GET_FUNCTION(m.get()))
+ return override(m);
+ }
+ }
+Index: tools/build/v2/user-config.jam
+===================================================================
+--- tools/build/v2/user-config.jam 2008-07-15 15:53:41 +0200
++++ tools/build/v2/user-config.jam 2010-06-02 23:46:13 +0200
+@@ -84,3 +84,9 @@
+
+ # Configure with an explicit installation prefix.
+ # using qt : /usr/opt/qt ;
++
++using python : 2.5
++ : /home/amaury/trunk/pypy/pypy-c
++ : /home/amaury/trunk/pypy/module/cpyext/include
++ /home/amaury/trunk/pypy/_interfaces
++ ;
+
More information about the Pypy-commit
mailing list