Boost C++ Libraries: Ticket #4125: Boost.Python should use macros to access members of PyMethodObject https://svn.boost.org/trac10/ticket/4125 <p> In libs/python/src/wrapper.cpp, the members of PyMethodObject are accessed directly: </p> <pre class="wiki"> ((PyMethodObject*)m.get())-&gt;im_self ((PyMethodObject*)m.get())-&gt;im_func </pre><p> These accesses are not documented in the python API. I suggest to use the following macros instead, which have been existing since python 1.6 at least: </p> <pre class="wiki"> PyMethod_GET_SELF(m.get()) PyMethod_GET_FUNCTION(m.get()) </pre><p> When using CPython, these macros expand to exactly the same code. </p> <p> The goal is to allow other implementations of python, like PyPy, to provide alternate compatible implementation of these macros, and thus be able to load modules compiled with Boost.Python. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4125 Trac 1.4.3 Matthew Bradbury <matt-bradbury@…> Thu, 23 Dec 2010 13:43:46 GMT attachment set https://svn.boost.org/trac10/ticket/4125 https://svn.boost.org/trac10/ticket/4125 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">4125-use-macros-instead-of-direct-access.patch</span> </li> </ul> Ticket Matthew Bradbury <matt-bradbury@…> Thu, 23 Dec 2010 13:44:23 GMT attachment set https://svn.boost.org/trac10/ticket/4125 https://svn.boost.org/trac10/ticket/4125 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">4125-use-macros-instead-of-direct-access.2.patch</span> </li> </ul> Ticket Matthew Bradbury <matt-bradbury@…> Thu, 23 Dec 2010 13:44:59 GMT type changed https://svn.boost.org/trac10/ticket/4125#comment:1 https://svn.boost.org/trac10/ticket/4125#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> </ul> Ticket