pybind11/include/pybind11
Jason Rhinelander 5e14aa6aa7 Allow module-local classes to be loaded externally
The main point of `py::module_local` is to make the C++ -> Python cast
unique so that returning/casting a C++ instance is well-defined.
Unfortunately it also makes loading unique, but this isn't particularly
desirable: when an instance contains `Type` instance there's no reason
it shouldn't be possible to pass that instance to a bound function
taking a `Type` parameter, even if that function is in another module.

This commit solves the issue by allowing foreign module (and global)
type loaders have a chance to load the value if the local module loader
fails.  The implementation here does this by storing a module-local
loading function in a capsule in the python type, which we can then call
if the local (and possibly global, if the local type is masking a global
type) version doesn't work.
2017-08-19 15:30:39 -04:00
..
detail Remove PYBIND11_UNSHARED_STATIC_LOCALS macro 2017-08-17 11:34:43 -04:00
attr.h Reimplement py::init<...> to use common factory code 2017-08-17 09:33:27 -04:00
buffer_info.h Move internal headers into detail subdirectory 2017-08-17 04:06:35 +02:00
cast.h Allow module-local classes to be loaded externally 2017-08-19 15:30:39 -04:00
chrono.h Force hidden visibility on pybind code 2017-08-14 11:40:38 -04:00
complex.h Force hidden visibility on pybind code 2017-08-14 11:40:38 -04:00
eigen.h Force hidden visibility on pybind code 2017-08-14 11:40:38 -04:00
embed.h Force hidden visibility on pybind code 2017-08-14 11:40:38 -04:00
eval.h Force hidden visibility on pybind code 2017-08-14 11:40:38 -04:00
functional.h Force hidden visibility on pybind code 2017-08-14 11:40:38 -04:00
numpy.h Added metatypes for dealing with functions/lambdas 2017-08-17 09:33:27 -04:00
operators.h Force hidden visibility on pybind code 2017-08-14 11:40:38 -04:00
options.h Move internal headers into detail subdirectory 2017-08-17 04:06:35 +02:00
pybind11.h Allow module-local classes to be loaded externally 2017-08-19 15:30:39 -04:00
pytypes.h Move internal headers into detail subdirectory 2017-08-17 04:06:35 +02:00
stl_bind.h Move internal headers into detail subdirectory 2017-08-17 04:06:35 +02:00
stl.h Force hidden visibility on pybind code 2017-08-14 11:40:38 -04:00