diff --git a/gst/Makefile.am b/gst/Makefile.am index 83e7fc80e8..d67ea805d6 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -227,9 +227,9 @@ gstenumtypes.c: $(gst_headers) glib-mkenums \ --fhead "#include \"gst_private.h\"\n#include \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[] = {" \ + --vhead "GType\n@enum_name@_get_type (void)\n{\n static gsize id = 0;\n static const G@Type@Value values[] = {" \ --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" \ + --vtail " { 0, NULL, NULL }\n };\n\n if (g_once_init_enter (&id)) {\n GType tmp = g_@type@_register_static (\"@EnumName@\", values);\n g_once_init_leave (&id, tmp);\n }\n\n return (GType) id;\n}" \ $^ > gstenumtypes.c %.c.gcov: .libs/libgstreamer_@GST_MAJORMINOR@_la-%.gcda %.c