diff --git a/moo/mooutils/mooscript/mooscript-value.c b/moo/mooutils/mooscript/mooscript-value.c index cd2abeed..542bce5f 100644 --- a/moo/mooutils/mooscript/mooscript-value.c +++ b/moo/mooutils/mooscript/mooscript-value.c @@ -1616,3 +1616,17 @@ ms_vaprintf (const char *format, return g_string_free (buffer, FALSE); } + + +GType +ms_value_get_type (void) +{ + static GType type; + + if (!type) + type = g_boxed_type_register_static ("MSValue", + (GBoxedCopyFunc) ms_value_ref, + (GBoxedFreeFunc) ms_value_unref); + + return type; +} diff --git a/moo/mooutils/mooscript/mooscript-value.h b/moo/mooutils/mooscript/mooscript-value.h index c11e69d6..c3d9de4c 100644 --- a/moo/mooutils/mooscript/mooscript-value.h +++ b/moo/mooutils/mooscript/mooscript-value.h @@ -19,6 +19,9 @@ G_BEGIN_DECLS +#define MS_TYPE_VALUE (ms_value_get_type ()) + + typedef struct _MSValue MSValue; typedef struct _MSValueClass MSValueClass; typedef struct _MSFunc MSFunc; @@ -92,6 +95,8 @@ struct _MSValue { }; +GType ms_value_get_type (void) G_GNUC_CONST; + void ms_type_init (void); void _ms_type_init_builtin (MSValueClass *types);