Jason Rhinelander 4b159230d9 Made module_local types take precedence over global types
Attempting to mix py::module_local and non-module_local classes results
in some unexpected/undesirable behaviour:

- if a class is registered non-local by some other module, a later
  attempt to register it locally fails.  It doesn't need to: it is
  perfectly acceptable for the local registration to simply override
  the external global registration.
- going the other way (i.e. module `A` registers a type `T` locally,
  then `B` registers the same type `T` globally) causes a more serious
  issue: `A.T`'s constructors no longer work because the `self` argument
  gets converted to a `B.T`, which then fails to resolve.

Changing the cast precedence to prefer local over global fixes this and
makes it work more consistently, regardless of module load order.
2017-08-05 11:23:34 -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
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