aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore/typesystem_core.xml
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-01-04 18:46:40 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:48:07 -0300
commitaa305dc5ae5f463c31938fb50cd92257b0fc7911 (patch)
tree5147f99ab893e27e54e752cff69de7d6c211bb65 /PySide/QtCore/typesystem_core.xml
parentf7fd9277f47359f8eb4490bcb8f5bdc84000035e (diff)
Lock the gil on some hand written code to avoid crashes.
Reviewer: Renato Araújo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'PySide/QtCore/typesystem_core.xml')
-rw-r--r--PySide/QtCore/typesystem_core.xml8
1 files changed, 4 insertions, 4 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 54513f951..f41acd5ca 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -650,13 +650,13 @@
// Define a global variable to handle qInstallMsgHandler callback
static PyObject* qtmsghandler = 0;
- void
- msghandlercallback(QtMsgType type, const char* msg)
+ static void msgHandlerCallback(QtMsgType type, const char* msg)
{
+ Shiboken::GilState state;
Shiboken::AutoDecRef arglist(Shiboken::makeTuple(type, msg));
Shiboken::AutoDecRef ret(PyObject_CallObject(qtmsghandler, arglist));
}
- void QtCoreModuleExit()
+ static void QtCoreModuleExit()
{
PySide::SignalManager::instance().clear();
}
@@ -673,7 +673,7 @@
%PYARG_0 = qtmsghandler ? qtmsghandler : Py_None;
Py_INCREF(%PYARG_1);
qtmsghandler = %PYARG_1;
- qInstallMsgHandler(msghandlercallback);
+ qInstallMsgHandler(msgHandlerCallback);
}
if (%PYARG_0 == Py_None)