Hi. I've just reverted to 0.14.1 because 0.15 breaks code that implements a cpp callback in python. It seems to be a name-mangling problem.
I've attached a short test case that shows the problem. They both compile fine on 14.1 and 15. But if I try and run the 15 compiled version I get this: Traceback (most recent call last): File "try_hello.py", line 1, in <module> import test ImportError: dlopen(/Users/brett/Dropbox/Code/kli-project/cython-test/test.so, 2): Symbol not found: __Z19callback_test_helloP7_objecti Referenced from: /Users/brett/Dropbox/Code/kli-project/cython-test/test.so Expected in: dynamic lookup Is there anything new I should be doing? Brett
#include "callbacks.h" // map callback functions into cython code // These are implemented in the pyx file void callback_test_hello(PyObject *object_ptr, int i); void callback_test::hello(int i) { callback_test_hello(object_ptr, i); }
#include "Python.h" class callback { public: virtual void hello(int i)=0; }; class caller { callback *m_c; public: void set_callback(callback *c) { m_c = c; } void say_hello(int i) { m_c->hello(i); } }; class callback_test : public callback { public: PyObject *object_ptr; void hello(int i); };
test.pyx
Description: Binary data
try_hello.py
Description: Binary data
_______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel