diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-11-10 20:05:13 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-11-10 20:16:23 -0200 |
commit | 9d3dfe4077857f1829ecdc6899ac4a383b9c32b7 (patch) | |
tree | 38f495b92654fdf5464c2c1bed2a4f3294b8d6db | |
parent | f28d985527dd5674db0acbf3009f704b489eb870 (diff) | |
download | shiboken-9d3dfe4077857f1829ecdc6899ac4a383b9c32b7.tar.gz shiboken-9d3dfe4077857f1829ecdc6899ac4a383b9c32b7.tar.xz shiboken-9d3dfe4077857f1829ecdc6899ac4a383b9c32b7.zip |
Added Shiboken::Wrapper::hasParentInfo function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
-rw-r--r-- | libshiboken/basewrapper.cpp | 5 | ||||
-rw-r--r-- | libshiboken/basewrapper.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp index af61aa00..47ec2749 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 0c85e907..98b9a4e0 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. */ |