Since recently lightweight_test introduced a sanitation to ensure that
`boost::report_errors()` is called, and it does not in module tests.
The problem could be fixed by exporting the function and calling it from
these python tests, but as it already done in other module tests I just
turned those usages lightweight_test to a regular assertation.
Name lookup in msvc has changed between 14.14 and 14.15 making it consistent with other compilers. Forward declaration of unwind_type() is now required as it is for other compilers.
Resolves compilation errors identified in:
https://github.com/boostorg/python/issues/228
This adds a missing return statement in the python3 specific
import logic of boost.python.numpy.
For python3 wrap_import_array() needs to return a pointer value.
The import_array() macro only returns NULL in case of error. The
missing return statement is UB, so the compiler can assume it does
not happen. This means the compiler can assume the error branch
is always taken, so import_array must always fail.
This example depends on the behaviour of ```__metaclass__```. This has
changed in python 3, and the example no longer works. Removing example
code as suggested, see #210 for more details and possible alternatives.
Closes#210.
Line no 138-139 suggest if condition satisfy if n_actual <=max_arity :
if (n_actual + f->m_nkeyword_values >= min_arity
&& n_actual <= max_arity)
So condition at Line no 161 is not reachable.
Python 3.7 changes the return type of _PyUnicode_AsString()
from void* to const char* -- causing the build of boost-python
to fail.
Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
Unfortunately due to optimised build of Python3 libraries and executable I got only partial stack from [http://clang.llvm.org/docs/AddressSanitizer.html], however digging into and reducing my code I tracked it down to be issue with `boost/libs/python/src/object/enum.cpp`.
It has to bits that leak (and comment mentioning there is one):
PyObject *mod = PyObject_GetAttrString( self_, "__module__");
Leaks reference, as it never decreases it.
It also stores a new string object under object's `name` that ref count never gets decremented.
That commit fixes both issues.
This was properly an oversight when switching to the BOOST_SYMBOL_*
symbols from Boost.Config in commit 0224f54a (see #1)
Since Boost.Config is already doing the differentiation between
different platforms and compilers we can simplify this bit and just
use BOOST_SYMBOL_EXPORT