summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-10 16:35:00 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-10 16:35:00 -0200
commit9b0ebbdba7a3d94611875b368ef1d9abb0d038c5 (patch)
tree681e08833c83b3b3bac737f188e9fe51b92597f8
parentc984b7ee0adf8aebbb45f826dd18a6be8d36d5ec (diff)
downloadshiboken-9b0ebbdba7a3d94611875b368ef1d9abb0d038c5.tar.gz
shiboken-9b0ebbdba7a3d94611875b368ef1d9abb0d038c5.tar.xz
shiboken-9b0ebbdba7a3d94611875b368ef1d9abb0d038c5.zip
Added Shiboken::Wrapper::hasOwnership function.
-rw-r--r--libshiboken/basewrapper.cpp5
-rw-r--r--libshiboken/basewrapper.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index fd9d8dec..0214998a 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -641,6 +641,11 @@ bool hasCppWrapper(SbkObject* pyObj)
return pyObj->d->containsCppWrapper;
}
+bool hasOwnership(SbkObject* pyObj)
+{
+ return pyObj->d->hasOwnership;
+}
+
void getOwnership(SbkObject* pyObj)
{
pyObj->d->hasOwnership = true;
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h
index 2c6c9c96..bc3ecf53 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -197,6 +197,7 @@ LIBSHIBOKEN_API void setValidCpp(SbkObject* pyObj, bool value);
LIBSHIBOKEN_API void setHasCppWrapper(SbkObject* pyObj, bool value);
LIBSHIBOKEN_API bool hasCppWrapper(SbkObject* pyObj);
+LIBSHIBOKEN_API bool hasOwnership(SbkObject* pyObj);
LIBSHIBOKEN_API void getOwnership(PyObject* pyObj);
LIBSHIBOKEN_API void getOwnership(SbkObject* pyObj);
LIBSHIBOKEN_API void releaseOwnership(PyObject* pyObj);