| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The new semantic is:
Returns true when the type can be converted to T OR the type is T.
The old semantic was:
Returns true when the type can be converted to T and false if the
type is T, however int and float converters did not follow this
rule, because they used PyNumber_Check on their isConvertible implementation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
To improve legibility and understanding ConverterBase<T> was renamed
to ValueTypeConverter<T>, and ConverterBase<T*> specialization is
now an independent base converter ObjectTypeConverter<T>.
Converter_CppEnum was renamed to EnumConverter.
The HeaderGenerator and custom converters for the test bindings were
updated accordingly.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
|
| |
|
| |
|
|
|
|
|
|
| |
This allow the user to full custommize the type conversion.
Note: This change added a known regression on test_derived
|
| |
|
|
at each possible call, instead of receiving the return value in the C++
type and converting it later. Having the result value as a PyObject
pointer avoids the problem of declaring the return value variable with
a class that do not have a simple constructor.
Example: "Foo resultValue;" is a problem when the only constructor for
"Foo" is "Foo(int)".
The above described problem is made worse with the addition of OddBool
and OddBoolUser cases to the sample library. OddBool is registered as a
primitive (and convertible) type, registered this way it is only
available as a TypeEntry and a suitable constructor cannot possibly
be found. This is different from Value and Object types for they
become AbstractMetaClass objects and all constructor signatures
can be queried.
|