supports suspending functions
authorMatthias Braun <matze@braunis.de>
Wed, 29 Jun 2005 00:59:05 +0000 (00:59 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 29 Jun 2005 00:59:05 +0000 (00:59 +0000)
SVN-Revision: 2651

tools/miniswig/create_wrapper.cpp

index 7ac2e92..7adce5d 100644 (file)
@@ -192,7 +192,11 @@ WrapperCreator::create_function_wrapper(Class* _class, Function* function)
     out << ind << "\n";
     // push return value back on stack and return
     if(function->return_type.is_void()) {
-        out << ind << "return 0;\n";
+        if(function->docu_comment.find("@SUSPEND@") != std::string::npos) {
+          out << ind << "sq_suspendvm(v);\n";
+        } else {
+          out << ind << "return 0;\n";
+        }
     } else {
         push_to_stack(function->return_type, "return_value");
         out << ind << "return 1;\n";