diff options
author | Matthias Clasen <mclasen@redhat.com> | 2012-08-28 22:06:20 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-08-28 22:06:20 -0400 |
commit | 88692e4eb0a971f6d32da9207c9c91c8d8c7c8d9 (patch) | |
tree | 284b1eb2e54678898a581f31850a15d6eb52ae35 /pango/pango-enum-types.h.template | |
parent | 4ea16a17ca32d11bb3fd59132823350a77568b70 (diff) | |
download | pango-88692e4eb0a971f6d32da9207c9c91c8d8c7c8d9.tar.gz |
Make enum get_type functions thread-safe
Use a more modern, template-based way of calling glib-mkenums,
and use templates that use g_once_init_enter/leave to be
thread-safe.
Diffstat (limited to 'pango/pango-enum-types.h.template')
-rw-r--r-- | pango/pango-enum-types.h.template | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pango/pango-enum-types.h.template b/pango/pango-enum-types.h.template new file mode 100644 index 00000000..e5ffbe81 --- /dev/null +++ b/pango/pango-enum-types.h.template @@ -0,0 +1,24 @@ +/*** BEGIN file-header ***/ +#ifndef __PANGO_ENUM_TYPES_H__ +#define __PANGO_ENUM_TYPES_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS +/*** END file-header ***/ + +/*** BEGIN file-production ***/ + +/* enumerations from "@filename@" */ +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType @enum_name@_get_type (void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) +/*** END value-header ***/ + +/*** BEGIN file-tail ***/ +G_END_DECLS + +#endif /* __PANGO_ENUM_TYPES_H__ */ +/*** END file-tail ***/ |