pybind11/include/pybind11
Jason Rhinelander 6873c202b3 Prevent overwriting previous declarations
Currently pybind11 doesn't check when you define a new object (e.g. a
class, function, or exception) that overwrites an existing one.  If the
thing being overwritten is a class, this leads to a segfault (because
pybind still thinks the type is defined, even though Python no longer
has the type).  In other cases this is harmless (e.g. replacing a
function with an exception), but even in that case it's most likely a
bug.

This code doesn't prevent you from actively doing something harmful,
like deliberately overwriting a previous definition, but detects
overwriting with a run-time error if it occurs in the standard
class/function/exception/def registration interfaces.

All of the additions are in non-template code; the result is actually a
tiny decrease in .so size compared to master without the new test code
(977304 to 977272 bytes), and about 4K higher with the new tests.
2016-10-24 22:45:51 -04:00
..
attr.h Fix dynamic attribute inheritance in C++ 2016-10-14 18:01:17 +02:00
cast.h Merge pull request #453 from aldanor/feature/numpy-scalars 2016-10-25 01:15:25 +02:00
chrono.h Simplify redundant code, conform to style suggestions, improve logic 2016-09-28 01:01:44 +10:00
common.h Merge pull request #453 from aldanor/feature/numpy-scalars 2016-10-25 01:15:25 +02:00
complex.h nicer type_caster::load() calling conventions 2016-05-15 20:23:27 +02:00
descr.h use detail::enable_if_t everywhere 2016-09-19 13:45:34 +02:00
eigen.h Simplify base class detection for Eigen types 2016-09-29 10:38:13 +02:00
eval.h Python 2.7 fixes for eval() 2016-07-08 15:14:48 +02:00
functional.h fixed Py_None reference couting 2016-09-08 22:53:18 +09:00
numpy.h Merge pull request #453 from aldanor/feature/numpy-scalars 2016-10-25 01:15:25 +02:00
operators.h Multiple inheritance support 2016-09-19 13:45:31 +02:00
pybind11.h Prevent overwriting previous declarations 2016-10-24 22:45:51 -04:00
pytypes.h Make operator bool() explicit 2016-10-17 02:01:53 +02:00
stl_bind.h use detail::enable_if_t everywhere 2016-09-19 13:45:34 +02:00
stl.h Accept any sequence type as std::vector (or std::list) 2016-10-12 12:35:36 -04:00
typeid.h minor cleanups in common.h; updated author info and copyright year 2016-04-18 10:53:38 +02:00