summaryrefslogtreecommitdiff
path: root/tools/glib-ginterface-gen.py
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2009-01-20 12:46:20 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2009-01-20 12:47:46 +0000
commit3017a8bab2bd04fa824370b18818cda73136cc96 (patch)
tree9d6999e6e88d3d2fe75e30e43547fdadfa616bb6 /tools/glib-ginterface-gen.py
parent588a1337d667d7328b3ab513bca05a9c265bd49d (diff)
downloadtelepathy-glib-3017a8bab2bd04fa824370b18818cda73136cc96.tar.gz
glib-ginterface-gen: Don't emit empty arrays of method descriptions
This is a non-portable gcc extension, which causes trouble for the Spicebird people on Windows.
Diffstat (limited to 'tools/glib-ginterface-gen.py')
-rw-r--r--tools/glib-ginterface-gen.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/glib-ginterface-gen.py b/tools/glib-ginterface-gen.py
index 8e84a61ab..3e4195e54 100644
--- a/tools/glib-ginterface-gen.py
+++ b/tools/glib-ginterface-gen.py
@@ -279,6 +279,10 @@ class Generator(object):
for method, offset in zip(methods, offsets):
self.do_method_glue(method, offset)
+ if len(methods) == 0:
+ # empty arrays are a gcc extension, so put in a dummy member
+ self.b(" { NULL, NULL, 0 }")
+
self.b('};')
self.b('')