From af2ba2b7bf6388b46f98706991430b827737e0d0 Mon Sep 17 00:00:00 2001 From: Paul Pogonyshev Date: Wed, 27 Aug 2008 21:40:12 +0000 Subject: Bug 549351 – an unitialized variable in PyGLib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-08-28 Paul Pogonyshev Bug 549351 – an unitialized variable in PyGLib * glib/pygmainloop.c (pyg_main_loop_init): Initialize `is_running'. svn path=/trunk/; revision=953 --- ChangeLog | 7 +++++++ glib/pygmainloop.c | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ded2d7d..2e190a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-28 Paul Pogonyshev + + Bug 549351 – an unitialized variable in PyGLib + + * glib/pygmainloop.c (pyg_main_loop_init): Initialize + `is_running'. + 2008-08-28 Paul Pogonyshev Bug 547633 – cannot create new threads when pygtk is used diff --git a/glib/pygmainloop.c b/glib/pygmainloop.c index e966962..50459a0 100644 --- a/glib/pygmainloop.c +++ b/glib/pygmainloop.c @@ -232,10 +232,9 @@ PYGLIB_DEFINE_TYPE("glib.MainLoop", PyGMainLoop_Type, PyGMainLoop) static int pyg_main_loop_init(PyGMainLoop *self, PyObject *args, PyObject *kwargs) { - static char *kwlist[] = { "context", "is_running", NULL }; PyObject *py_context = Py_None; - int is_running; + int is_running = 0; GMainContext *context; if (!PyArg_ParseTupleAndKeywords(args, kwargs, @@ -246,7 +245,7 @@ pyg_main_loop_init(PyGMainLoop *self, PyObject *args, PyObject *kwargs) if (!PyObject_TypeCheck(py_context, &PyGMainContext_Type) && py_context != Py_None) { PyErr_SetString(PyExc_TypeError, - "context must be a glib.GMainContext or None"); + "context must be a glib.MainContext or None"); return -1; } -- cgit