diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-07-09 15:29:30 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-07-09 19:26:16 -0300 |
commit | 4807359481f136145f404421ab8e99dd5f4cfefd (patch) | |
tree | bf5c7a71223e65b771cc99f5eee328a9c189745a /libshiboken/basewrapper.h | |
parent | c740aa812e6556747c51f2ac117c7107739aacab (diff) |
Use list on keep reference map.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'libshiboken/basewrapper.h')
-rw-r--r-- | libshiboken/basewrapper.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h index d5a23939c..7403491f6 100644 --- a/libshiboken/basewrapper.h +++ b/libshiboken/basewrapper.h @@ -40,6 +40,7 @@ #include "bindingmanager.h" #include <list> #include <map> +#include <string> namespace Shiboken { @@ -48,7 +49,7 @@ namespace Shiboken * This mapping associates a method and argument of an wrapper object with the wrapper of * said argument when it needs the binding to help manage its reference counting. */ -typedef std::map<const char*, PyObject*> RefCountMap; +typedef std::map<std::string, std::list<PyObject*> > RefCountMap; extern "C" { @@ -237,7 +238,7 @@ SbkBaseWrapper_TpNew(PyTypeObject* subtype, PyObject*, PyObject*); * \param key a key that identifies the C++ method signature and argument where the referredObject came from. * \parem referredObject the object whose reference is used by the self object. */ -LIBSHIBOKEN_API void keepReference(SbkBaseWrapper* self, const char* key, PyObject* referredObject); +LIBSHIBOKEN_API void keepReference(SbkBaseWrapper* self, const char* key, PyObject* referredObject, bool append=false); /// Returns true and sets a Python RuntimeError if the Python wrapper is not marked as valid. LIBSHIBOKEN_API bool cppObjectIsInvalid(PyObject* wrapper); |