id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 4125,Boost.Python should use macros to access members of PyMethodObject,Amaury Forgeot d'Arc ,Dave Abrahams,"In libs/python/src/wrapper.cpp, the members of !PyMethodObject are accessed directly: {{{ ((PyMethodObject*)m.get())->im_self ((PyMethodObject*)m.get())->im_func }}} 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: {{{ PyMethod_GET_SELF(m.get()) PyMethod_GET_FUNCTION(m.get()) }}} When using CPython, these macros expand to exactly the same code. 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. ",Patches,new,Boost 1.43.0,python USE GITHUB,Boost 1.42.0,Problem,,,