Hi,<br><br>Im really scared because I fear a fundamental issue concerning the script system in my game engine.<br><br><br>In C++, I have a class. In my class I map data to GameObject like:<br><br><b>class<br>{<br>    map&lt;GameObject*, Data&gt; .....<br>
}</b><br><br>As you see, I use the pointer as key.<br><br>When I from c++, in the same class, call a python function I pass the key like this:<br><br><b>class::callPythonFunctions()<br>{<br>   boost::python::get_override(&quot;callbackFunction&quot;)(boost::python::object(boost::python::ptr(gameobject))); // the variable <i>gameobj </i>is of type GameObject*<br>
}<br></b><br>When I recieve the call in python I do some checks like this:<br><br><b>def callbackFunction(self, gameobj):<br>   for x in self.mydict.keys():<br>     print(&quot;Checking&quot;)<br>     print(gameobj == self.mydict)<br>
     print(gameobj in self.mydict)</b><br>     <br><br>The above will print something like:<br><i>....<br>Checking<br>True<br>False<br>...</i><br><br>I do have a overloaded == operator. But how can I fix so that python checks for my pointer and not the PyObject* pointer ?<br>
<br>// Simon<br>