summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-29 14:37:39 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-29 14:37:39 -0200
commit78aa3a49685e0d1775c0a2a7bf447c49db25f654 (patch)
treeb7e907b2ebe87c42ee09c73216e3f7d6406cf433
parent927a93926b792d83d5205ab7cbb086882c3a0688 (diff)
downloadshiboken-78aa3a49685e0d1775c0a2a7bf447c49db25f654.tar.gz
shiboken-78aa3a49685e0d1775c0a2a7bf447c49db25f654.tar.xz
shiboken-78aa3a49685e0d1775c0a2a7bf447c49db25f654.zip
Add function Shiboken::ObjectType::getUserData(SbjObjectTyoe*)
-rw-r--r--libshiboken/basewrapper.cpp5
-rw-r--r--libshiboken/basewrapper.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 8f5acff8..eb01116c 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -560,6 +560,11 @@ void initPrivateData(SbkObjectType* self)
memset(self->d, 0, sizeof(SbkObjectTypePrivate));
}
+void* getTypeUserData(SbkObjectType* type)
+{
+ return type->d->user_data;
+}
+
} // namespace ObjectType
namespace Object
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h
index 460f3159..30268dce 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -155,6 +155,11 @@ LIBSHIBOKEN_API MultipleInheritanceInitFunction getMultipleIheritanceFunction(Sb
LIBSHIBOKEN_API void setDestructorFunction(SbkObjectType* self, ObjectDestructor func);
LIBSHIBOKEN_API void initPrivateData(SbkObjectType* self);
+
+/**
+ * Get the user data previously setted by Shiboken::Object::setTypeUserData
+ */
+LIBSHIBOKEN_API void* getTypeUserData(SbkObjectType* type);
}
namespace Object {