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
..
2016-04-26 23:48:55 +02:00
2017-06-08 16:42:44 -03:00
2017-04-07 02:08:29 +02:00
2017-08-17 15:10:51 +02:00
2017-08-17 15:10:51 +02:00
2017-08-17 15:10:51 +02:00
2016-09-19 13:45:31 +02:00
2015-10-13 03:16:44 +02:00
2017-01-01 17:14:27 +01:00
2017-03-12 22:36:48 +01:00