use of hash to map c++ pointers with python objects
Hi all, I'm working on PySide[1] and we have a problem with map between c++ pointers and PyObject. In this section of FAQ: http://www.boost.org/doc/libs/1_40_0/libs/python/doc/v2/faq.html#xref, they give some examples on how to handle this kind of problem. But the point is: dynamic_cast does not work between shared libraries. My wrapper class is not visible to another library then the dynamic_cast fails. Then I tried implement a hash table to map c++ pointers and python objects, but in some point of the code I received the pointer in another class representation and this moves the pointer address to another region of memory, causing a mess in my hash. I would like to know if someone has any idea about how to solve this problem. How can I map a c++ pointer to a PyObject between libraries without use dynamic_cast. I have attached a small use case for this case. Renato Araujo Oliveira Filho [1] PySide = http://pyside.org
participants (1)
-
Renato Araujo