diff options
author | Marcin Kolny <marcin.kolny@gmail.com> | 2015-08-08 14:45:12 +0200 |
---|---|---|
committer | Marcin Kolny <marcin.kolny@gmail.com> | 2015-08-08 14:45:59 +0200 |
commit | 0d5f63b18f5766760cf39e82ee11482984e0a938 (patch) | |
tree | e3f74b9b37e7618c92840024077dff43e6d08f0d /glib/src/variant_basictypes.h.m4 | |
parent | dce7a844e48a582e42eb2b60eef5c1f2527540ac (diff) | |
parent | d94115843f38967b5e883f5f7d8057882ae364cb (diff) | |
download | glibmm-gir-gmmproc.tar.gz |
Merge branch 'master' into glibmm-gir-gmmprocglibmm-gir-gmmproc
Diffstat (limited to 'glib/src/variant_basictypes.h.m4')
-rw-r--r-- | glib/src/variant_basictypes.h.m4 | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/glib/src/variant_basictypes.h.m4 b/glib/src/variant_basictypes.h.m4 index 2f11a521..a6b6ec06 100644 --- a/glib/src/variant_basictypes.h.m4 +++ b/glib/src/variant_basictypes.h.m4 @@ -23,11 +23,14 @@ dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. include(template.macros.m4) dnl -dnl For instance, GLIB_VARIANT_BASIC(c++ type, c type, c type name) -dnl parameters: -dnl c++ type: The C++ type for the specialization, such as bool -dnl c type: The C type used by the C API, such as gboolean. -dnl c type name: The text used in the C API functions and macros, such as boolean, in g_variant_get_boolean() and G_VARIANT_TYPE_BOOLEAN. +dnl For instance, GLIB_VARIANT_BASIC(C++ type, C type, C type name [,C type name 2]) +dnl Parameters: +dnl C++ type: The C++ type for the specialization, such as bool. +dnl C type: The C type used by the C API, such as gboolean. +dnl C type name: The text used in the C API functions and macros, such as boolean +dnl in g_variant_get_boolean() and G_VARIANT_TYPE_BOOLEAN. +dnl C type name 2: Optional second text, such as handle in g_variant_get_handle() +dnl and G_VARIANT_TYPE_HANDLE. dnl define([GLIB_VARIANT_BASIC],[dnl LINE(]__line__[)dnl @@ -67,7 +70,13 @@ public: * @return The new Glib::Variant<$1>. */ static Variant<$1> create($1 data); - +ifelse($4,,,[ + /** Creates a new Glib::Variant<$1> of type VARIANT_TYPE_[]UPPER($4). + * @param data The value of the new Glib::Variant<$1>. + * @return The new Glib::Variant<$1>. + */ + static Variant<$1> create_$4($1 data); +]) /** Gets the value of the Glib::Variant<$1>. * @return The $1 value of the Glib::Variant<$1>. */ @@ -90,10 +99,9 @@ GLIB_VARIANT_BASIC(bool, gboolean, boolean) GLIB_VARIANT_BASIC(unsigned char, guchar, byte) GLIB_VARIANT_BASIC(gint16, gint16, int16) GLIB_VARIANT_BASIC(guint16, guint16, uint16) -GLIB_VARIANT_BASIC(gint32, gint32, int32) +GLIB_VARIANT_BASIC(gint32, gint32, int32, handle) GLIB_VARIANT_BASIC(guint32, guint32, uint32) GLIB_VARIANT_BASIC(gint64, gint64, int64) GLIB_VARIANT_BASIC(guint64, guint64, uint64) -dnl This would redeclare the <int> specialization: GLIB_VARIANT_BASIC(gint32, guint32, handle) GLIB_VARIANT_BASIC(double, gdouble, double) } // namespace Glib |