diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-08-30 11:19:22 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-08-30 17:44:16 -0300 |
commit | 1eda671a34eba38e7e74e592e4ae88fa6803bcba (patch) | |
tree | a7abd551d478f100579067b948e1a17103aedcfb /tests/libsample/multiple_derived.h | |
parent | 3dc673c7bcbad1613b9d3d6ff3dd4a73be41915d (diff) |
Fix the type resolver algorithm.
The new algorithm do the following:
- Try to use type_info on the object the get the object real name.
- Try to find a type resolver with the name returned by type_info.
- If a type resolver was found, get the python type.
- Else, ask binding manager to resolve the type walking on all possible
subclasses found in the inheritance tree.
The binding manager has a graph representing the class inheritance tree.
Note: This commit break the libshiboken ABI, but not the API.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Renato Araújo <renato.araujo@openbossa.org>
Diffstat (limited to 'tests/libsample/multiple_derived.h')
-rw-r--r-- | tests/libsample/multiple_derived.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/libsample/multiple_derived.h b/tests/libsample/multiple_derived.h index ffbe5feb4..98ccb4de8 100644 --- a/tests/libsample/multiple_derived.h +++ b/tests/libsample/multiple_derived.h @@ -36,6 +36,7 @@ #define MDERIVED_H #include "libsamplemacros.h" +#include <string> class Base1 { @@ -97,7 +98,7 @@ class Base3 { public: explicit Base3(int val = 3) : m_value(val) {} - ~Base3() {} + virtual ~Base3() {} int base3Method() { return m_value; } private: int m_value; @@ -107,7 +108,7 @@ class Base4 { public: Base4() : m_value(4) {} - ~Base4() {} + virtual ~Base4() {} int base4Method() { return m_value; } private: int m_value; |