aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-08-04 16:10:34 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:17:13 -0300
commit784a4bbb707d132b26bcb177521745575dc0823f (patch)
treef637ef4134445b1cfdd0c33878b7a1ce46f02145 /tests/libsample
parent8b1ddcd3ef711bab70bb7cdebc26558a26f42df9 (diff)
Implements PSEP-0106 and fixes bug 902 - "Expose Shiboken functionality through a Python module".
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/objecttype.cpp6
-rw-r--r--tests/libsample/objecttype.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/libsample/objecttype.cpp b/tests/libsample/objecttype.cpp
index e4fce71e3..c253c610f 100644
--- a/tests/libsample/objecttype.cpp
+++ b/tests/libsample/objecttype.cpp
@@ -283,3 +283,9 @@ ObjectType* ObjectType::createChild(ObjectType* parent)
{
return new ObjectType(parent);
}
+
+std::size_t ObjectType::createObjectType()
+{
+ void* addr = new ObjectType();
+ return (std::size_t) addr;
+}
diff --git a/tests/libsample/objecttype.h b/tests/libsample/objecttype.h
index f032a09f8..84812a8d6 100644
--- a/tests/libsample/objecttype.h
+++ b/tests/libsample/objecttype.h
@@ -106,6 +106,7 @@ public:
virtual bool isPython() { return false; }
void callVirtualCreateChild();
virtual ObjectType* createChild(ObjectType* parent);
+ static std::size_t createObjectType();
//return a parent from C++
ObjectType* getCppParent() {