aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample/objecttype.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-11-17 16:20:43 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-11-18 08:47:46 -0300
commit515d3e34046415007027a1749a7a3be2a8b7a534 (patch)
tree601160d7c800345bf2d62161e95b727fa7e4ad7f /tests/libsample/objecttype.cpp
parent5a579efa850071ef06345a982611eb19995f8187 (diff)
Added support for the type system "invalidate-after-use" argument modification.
The Python wrapper object produced for an argument received from C++ on a virtual method call is marked as invalid after the call to the Python override. If the Python script keeps the wrapper and try to use it afterwards a RuntimeError exception is raised. Test cases were added using the ObjectType::event method and the new Event class.
Diffstat (limited to 'tests/libsample/objecttype.cpp')
-rw-r--r--tests/libsample/objecttype.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/libsample/objecttype.cpp b/tests/libsample/objecttype.cpp
index cc4733040..e6a42d6d8 100644
--- a/tests/libsample/objecttype.cpp
+++ b/tests/libsample/objecttype.cpp
@@ -84,7 +84,13 @@ ObjectType::objectName() const
return *m_objectName;
}
-bool ObjectType::event()
+bool ObjectType::causeEvent(Event::EventType eventType)
+{
+ Event e(eventType);
+ return this->event(&e);
+}
+
+bool ObjectType::event(Event* event)
{
return true;
}