diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-05-27 18:51:24 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-05-27 18:51:24 +0100 |
commit | d8a0cbcd03efcbbde95bd6aaab12badd71a7ef4c (patch) | |
tree | 76d9ed2f0946083e420ec270cdf23dae47348c37 /tools/glib-errors-str-gen.py | |
parent | 61588053a440473581b872588cbd81f326f15f91 (diff) | |
download | telepathy-glib-d8a0cbcd03efcbbde95bd6aaab12badd71a7ef4c.tar.gz |
Make sure _gen/error-str.h and .c end with a newline
Some compilers don't like it otherwise.
This appears to remove the need for the hack that wjt used, where a
pointless comment was the last thing in the header.
Diffstat (limited to 'tools/glib-errors-str-gen.py')
-rw-r--r-- | tools/glib-errors-str-gen.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/glib-errors-str-gen.py b/tools/glib-errors-str-gen.py index 5c7ef86d8..9ea76956e 100644 --- a/tools/glib-errors-str-gen.py +++ b/tools/glib-errors-str-gen.py @@ -51,16 +51,15 @@ class Generator(object): self.b(' case TP_ERROR_%s:' % uc_nick) self.b(' return %s;' % name) - self.h('') - self.h("/* Work around a gtkdoc bug where it doesn't see the last") - self.h(" * definition in the file unless there's misc after it") - self.h(" */") - self.b(' default:') self.b(' g_return_val_if_reached (NULL);') self.b(' }') self.b('}') + # make both files end with a newline + self.h('') + self.b('') + open(self.basename + '.h', 'w').write('\n'.join(self.__header)) open(self.basename + '.c', 'w').write('\n'.join(self.__body)) |