aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-10 20:05:13 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:08:58 -0300
commit4564787f4785ba6b2ace7fe4afa70b30246adb6a (patch)
tree2d0c26db78227526695a755b09c7de91720cb861 /libshiboken
parentc3e3500c309be004434293895775e5579656d72c (diff)
Added Shiboken::Wrapper::hasParentInfo function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/basewrapper.cpp5
-rw-r--r--libshiboken/basewrapper.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index af61aa007..47ec27492 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -666,6 +666,11 @@ void releaseOwnership(PyObject* pyObj)
setSequenceOwnership(pyObj, false);
}
+bool hasParentInfo(SbkObject* pyObj)
+{
+ return pyObj->d->parentInfo;
+}
+
void* cppPointer(SbkObject* pyObj, PyTypeObject* desiredType)
{
PyTypeObject* type = pyObj->ob_type;
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h
index 0c85e9079..98b9a4e0a 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -203,6 +203,8 @@ LIBSHIBOKEN_API void getOwnership(SbkObject* pyObj);
LIBSHIBOKEN_API void releaseOwnership(PyObject* pyObj);
LIBSHIBOKEN_API void releaseOwnership(SbkObject* pyObj);
+LIBSHIBOKEN_API bool hasParentInfo(SbkObject* pyObj);
+
/**
* Get the C++ pointer of type \p desiredType from a Python object.
*/