Hello,
I am considering trying cppyy on a large project, and I have a question.
I need to be able to add a reference to Python objects into the c++ classes.
In essence:
#Python code:
x="My python object"
inst = cpp_class()
inst.add_data(x)
inst.do_stuff()#This does not modify x in any way
z=inst.get_data(x)
So, cpp_class acts as a container for python objects, and it does not need to
know what kind of object is inside. I was able to make it work with pypy
through basic C API, using SWIG and typemaps by mapping void* into PyObject*,
but that is somewhat hackish. I am now thinking how would the same logic look
with cppyy extension.
PS:
building cppyy is pain in the ass... You guys seriously need to think about
build logs =)
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev