gst/Makefile.am: Cast values when making gstenumtypes.h. This pacifies Forte so...
authorJosep Torre Valles <josep@fluendo.com>
Tue, 10 Oct 2006 12:12:44 +0000 (12:12 +0000)
committerZaheer Abbas Merali <zaheerabbas@merali.org>
Tue, 10 Oct 2006 12:12:44 +0000 (12:12 +0000)
Original commit message from CVS:
2006-10-10  Zaheer Abbas Merali  <zaheerabbas at merali dot org>

Patch by: Josep Torre Valles <josep@fluendo.com>

* gst/Makefile.am:
Cast values when making gstenumtypes.h.  This pacifies Forte
so it doesn't warn about the ~0 as GST_MESSAGE_ANY not fitting
in the enumeration.

ChangeLog
gst/Makefile.am

index 1535df9..6aa681c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-10-10  Zaheer Abbas Merali  <zaheerabbas at merali dot org>
+
+       Patch by: Josep Torre Valles <josep@fluendo.com>
+
+       * gst/Makefile.am:
+       Cast values when making gstenumtypes.h.  This pacifies Forte
+       so it doesn't warn about the ~0 as GST_MESSAGE_ANY not fitting
+       in the enumeration.
+
 2006-10-09  Wim Taymans  <wim@fluendo.com>
 
        * gst/gstevent.c: (gst_event_new_seek), (gst_event_parse_seek):
index 1866a2c..f3e4f49 100644 (file)
@@ -233,10 +233,10 @@ gstenumtypes.h: $(gst_headers)
 
 gstenumtypes.c: $(gst_headers)
        glib-mkenums \
-       --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>" \
+       --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>\n#define C_ENUM(v) ((gint) v)\n#define C_FLAGS(v) ((guint) v)\n " \
        --fprod "\n/* enumerations from \"@filename@\" */" \
        --vhead "static void\nregister_@enum_name@ (GType* id)\n{\n  static const G@Type@Value values[] = {"     \
-       --vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+       --vprod "    { C_@TYPE@(@VALUENAME@), \"@VALUENAME@\", \"@valuenick@\" }," \
        --vtail "    { 0, NULL, NULL }\n  };\n  *id = g_@type@_register_static (\"@EnumName@\", values);\n}\nGType\n@enum_name@_get_type (void)\n{\n  static GType id;\n  static GOnce once = G_ONCE_INIT;\n\n  g_once (&once, (GThreadFunc)register_@enum_name@, &id);\n  return id;\n}\n" \
        $^ > gstenumtypes.c