summaryrefslogtreecommitdiffstats
path: root/glib/pygmainloop.c
diff options
context:
space:
mode:
authorPaul Pogonyshev <pogonyshev@gmx.net>2008-08-27 21:40:12 +0000
committerPaul Pogonyshev <paulp@src.gnome.org>2008-08-27 21:40:12 +0000
commitaf2ba2b7bf6388b46f98706991430b827737e0d0 (patch)
tree8e35940bab27f926326dd75628da8c43bec9fb3b /glib/pygmainloop.c
parent328b8849ee7e8db2cb02c710a2fadaaac20d0da3 (diff)
downloadpygobject-af2ba2b7bf6388b46f98706991430b827737e0d0.tar.gz
pygobject-af2ba2b7bf6388b46f98706991430b827737e0d0.tar.xz
pygobject-af2ba2b7bf6388b46f98706991430b827737e0d0.zip
Bug 549351 – an unitialized variable in PyGLib
2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net> Bug 549351 – an unitialized variable in PyGLib * glib/pygmainloop.c (pyg_main_loop_init): Initialize `is_running'. svn path=/trunk/; revision=953
Diffstat (limited to 'glib/pygmainloop.c')
-rw-r--r--glib/pygmainloop.c5
1 files changed, 2 insertions, 3 deletions
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;
}