summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo J. A. M. Carneiro <gcarneiro@src.gnome.org>2004-10-13 20:12:09 +0000
committerGustavo J. A. M. Carneiro <gcarneiro@src.gnome.org>2004-10-13 20:12:09 +0000
commit5e96f8f28bbb37551b5dc9592d53262a853b2dbf (patch)
tree485a8f14a742993845dda117df528f5e2ab8bacd
parente253e06b50a425f882c044f8614f791106edc361 (diff)
downloadpygtk-5e96f8f28bbb37551b5dc9592d53262a853b2dbf.tar.gz
Bug 155304: pygobject.h cannot be included in C++ programs
-rw-r--r--ChangeLog7
-rw-r--r--gobject/pygobject.h8
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index eb38b832..d48ef926 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-10-13 Gustavo J. A. M. Carneiro <gustavo@users.sourceforge.net>
+
+ * gobject/pygobject.h: s/typename/typename_/, because typename is
+ a C++ keyword.
+ Add G_BEGIN_DECLS / G_END_DECLS.
+ Fixes #155304: pygobject.h cannot be included in C++ programs.
+
2004-10-05 Johan Dahlin <johan@gnome.org>
* gtk/libglade.override (pyglade_xml_lookup_type): Fix silly silly
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
index ec06faac..056d3e35 100644
--- a/gobject/pygobject.h
+++ b/gobject/pygobject.h
@@ -7,6 +7,8 @@
#include <glib.h>
#include <glib-object.h>
+G_BEGIN_DECLS
+
/* Work around bugs in PyGILState api fixed in 2.4.0a4 */
#if PY_HEXVERSION < 0x020400A4
#define PYGIL_API_IS_BUGGY TRUE
@@ -137,14 +139,14 @@ struct _PyGObject_Functions {
const GParamSpec* pspec);
PyTypeObject *enum_type;
PyObject *(*enum_add)(PyObject *module,
- const char *typename,
+ const char *typename_,
const char *strip_prefix,
GType gtype);
PyObject* (*enum_from_gtype)(GType gtype, int value);
PyTypeObject *flags_type;
PyObject *(*flags_add)(PyObject *module,
- const char *typename,
+ const char *typename_,
const char *strip_prefix,
GType gtype);
PyObject* (*flags_from_gtype)(GType gtype, int value);
@@ -253,4 +255,6 @@ struct _PyGObject_Functions *_PyGObject_API;
#endif /* !_INSIDE_PYGOBJECT_ */
+G_END_DECLS
+
#endif /* !_PYGOBJECT_H_ */