diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-11-16 00:23:47 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-11-18 09:22:51 -0300 |
commit | 0d5ddc094018a4b2a7e1caf4d57f39bf38ac8930 (patch) | |
tree | 1412c15f73c6cd1c4c156d950203c7fc417aad93 /libshiboken | |
parent | 88f1e3aa4f3677687355813f4ff326d273a17e48 (diff) |
In multiple inheritance cases the binding manager only assigns a
wrapper to a base pointer plus offset if the latter is greater than
0 to avoid duplicated associations with the base pointer.
Diffstat (limited to 'libshiboken')
-rw-r--r-- | libshiboken/basewrapper.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp index 04ab3a8f0..9b36ba0d2 100644 --- a/libshiboken/basewrapper.cpp +++ b/libshiboken/basewrapper.cpp @@ -54,7 +54,8 @@ PyBaseWrapper_New(PyTypeObject* instanceType, ShiboTypeObject* baseWrapperType, if (((ShiboTypeObject*) instanceType)->mi_offsets) { int* offset = ((ShiboTypeObject*) instanceType)->mi_offsets; while (*offset != -1) { - BindingManager::instance().assignWrapper(self, (void*) ((size_t) cptr + (*offset))); + if (*offset > 0) + BindingManager::instance().assignWrapper(self, (void*) ((size_t) cptr + (*offset))); offset++; } } |