[telepathy-glib/master] Make sure _gen/error-str.h and .c end with a newline

Simon McVittie simon.mcvittie at collabora.co.uk
Wed May 27 10:51:24 PDT 2009


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.
---
 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 5c7ef86..9ea7695 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))
 
-- 
1.5.6.5



More information about the telepathy-commits mailing list