mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
Add a function g_pointer_type_register_static() to register a type derived
Sun Nov 4 14:01:23 2001 Owen Taylor <otaylor@redhat.com> * gvaluetypes.[ch]: Add a function g_pointer_type_register_static() to register a type derived from G_TYPE_POINTER.
This commit is contained in:
parent
90bb210e1e
commit
49d9628efc
@ -1,3 +1,8 @@
|
|||||||
|
Sun Nov 4 14:01:23 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gvaluetypes.[ch]: Add a function g_pointer_type_register_static()
|
||||||
|
to register a type derived from G_TYPE_POINTER.
|
||||||
|
|
||||||
2001-11-03 Hans Breuer <hans@breuer.org>
|
2001-11-03 Hans Breuer <hans@breuer.org>
|
||||||
|
|
||||||
* makefile.msc.in : gobject-query needs gmarshal.[hc,stings]
|
* makefile.msc.in : gobject-query needs gmarshal.[hc,stings]
|
||||||
|
@ -872,3 +872,29 @@ g_strdup_value_contents (const GValue *value)
|
|||||||
|
|
||||||
return contents;
|
return contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GType
|
||||||
|
g_pointer_type_register_static (const gchar *name)
|
||||||
|
{
|
||||||
|
static const GTypeInfo type_info = {
|
||||||
|
0, /* class_size */
|
||||||
|
NULL, /* base_init */
|
||||||
|
NULL, /* base_finalize */
|
||||||
|
NULL, /* class_init */
|
||||||
|
NULL, /* class_finalize */
|
||||||
|
NULL, /* class_data */
|
||||||
|
0, /* instance_size */
|
||||||
|
0, /* n_preallocs */
|
||||||
|
NULL, /* instance_init */
|
||||||
|
NULL /* value_table */
|
||||||
|
};
|
||||||
|
GType type;
|
||||||
|
|
||||||
|
g_return_val_if_fail (name != NULL, 0);
|
||||||
|
g_return_val_if_fail (g_type_from_name (name) == 0, 0);
|
||||||
|
|
||||||
|
type = g_type_register_static (G_TYPE_POINTER, name, &type_info, 0);
|
||||||
|
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -87,6 +87,9 @@ void g_value_set_pointer (GValue *value,
|
|||||||
gpointer g_value_get_pointer (const GValue *value);
|
gpointer g_value_get_pointer (const GValue *value);
|
||||||
|
|
||||||
|
|
||||||
|
/* Convenience for registering new pointer types */
|
||||||
|
GType g_pointer_type_register_static (const gchar *name);
|
||||||
|
|
||||||
/* debugging aid, describe value contents as string */
|
/* debugging aid, describe value contents as string */
|
||||||
gchar* g_strdup_value_contents (const GValue *value);
|
gchar* g_strdup_value_contents (const GValue *value);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user