aboutsummaryrefslogtreecommitdiffstats
path: root/generator/shibokengenerator.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-04-06 22:50:56 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:15:20 -0300
commit6ea5f0caa16f783d50221f817431d2cadc22f947 (patch)
tree8620c3da1dcc7695c689b874d8e5559420330797 /generator/shibokengenerator.h
parentf107f41c2b99517133ac4d2d624e8ee61cac2bb2 (diff)
Added the type system variables %BEGIN_ALLOW_THREADS and %END_ALLOW_THREADS.
Also moved the save and restore thread state lines to a macro in ShibokenGenerator header file. The type system variables documentation was updated accordingly. Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'generator/shibokengenerator.h')
-rw-r--r--generator/shibokengenerator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/generator/shibokengenerator.h b/generator/shibokengenerator.h
index c660f2efd..abf74c5fe 100644
--- a/generator/shibokengenerator.h
+++ b/generator/shibokengenerator.h
@@ -30,6 +30,8 @@
#define CPP_SELF_VAR "cppSelf"
#define CPP_ARG "cppArg"
#define CPP_ARG0 (CPP_ARG "0")
+#define BEGIN_ALLOW_THREADS "PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS"
+#define END_ALLOW_THREADS "PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS"
#include <generator.h>
#include <QtCore/QTextStream>