From 515d3e34046415007027a1749a7a3be2a8b7a534 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Tue, 17 Nov 2009 16:20:43 -0300 Subject: 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. --- tests/libsample/objecttype.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/libsample/objecttype.cpp') 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; } -- cgit v1.2.3