diff options
author | John Ehresman <jpe@wingware.com> | 2006-09-12 18:53:39 +0000 |
---|---|---|
committer | John Ehresman <jpe@src.gnome.org> | 2006-09-12 18:53:39 +0000 |
commit | 6b2ef8f2f320cab102211e5e7e3cd056565d1a74 (patch) | |
tree | 0b04cca953e68c1d7a2988e9d8d427067e34c6c6 | |
parent | 10cf507b6dbbc85113e3ff3f189ffa43ce400580 (diff) | |
download | pygobject-6b2ef8f2f320cab102211e5e7e3cd056565d1a74.tar.gz |
Declare variables at start of code block
2006-09-12 John Ehresman <jpe@wingware.com>
* gobject/pygobject.h (init_pygobject_check): Declare variables
at start of code block
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gobject/pygobject.h | 9 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2006-09-12 John Ehresman <jpe@wingware.com> + + * gobject/pygobject.h (init_pygobject_check): Declare variables + at start of code block + 2006-09-06 Johan Dahlin <jdahlin@async.com.br> * gobject/pygmainloop.c (pyg_signal_watch_prepare): Increase the timeout diff --git a/gobject/pygobject.h b/gobject/pygobject.h index dadfe76b..a8ab6edb 100644 --- a/gobject/pygobject.h +++ b/gobject/pygobject.h @@ -294,11 +294,12 @@ struct _PyGObject_Functions *_PyGObject_API; } G_STMT_END #define init_pygobject_check(req_major, req_minor, req_micro) G_STMT_START { \ - init_pygobject(); \ - PyObject *gobject = PyImport_ImportModule("gobject"); \ - PyObject *mdict = PyModule_GetDict(gobject); \ - PyObject *version = PyDict_GetItemString(mdict, "pygobject_version"); \ + PyObject *gobject, *mdict, *version; \ int found_major, found_minor, found_micro; \ + init_pygobject(); \ + gobject = PyImport_ImportModule("gobject"); \ + mdict = PyModule_GetDict(gobject); \ + version = PyDict_GetItemString(mdict, "pygobject_version"); \ if (!version) \ version = PyDict_GetItemString(mdict, "pygtk_version"); \ if (!version) { \ |