glib/gobject/gvaluetransform.c
Tim Janik 37e4b8c87e changed prototype of g_boxed_type_register_static() to contain an optional
Wed Mar  7 09:36:33 2001  Tim Janik  <timj@gtk.org>

	* gboxed.[hc]: changed prototype of g_boxed_type_register_static()
	to contain an optional init function and a hint at whether the
	boxed structure uses ref counting internally.
	added g_value_set_boxed_take_ownership().
	made G_TYPE_BOXED an abstract value type.

	* genums.[hc]: made G_TYPE_ENUM and G_TYPE_FLAGS abstract value
	types.

	* glib-genmarshal.c: argument type changes, preparation for third-party
	arg specification.

	* gobject.[hc]: cleaned up get/set property code.
	added g_strdup_value_contents() to improve warnings.

	* gparam.[hc]: added g_param_value_convert(), taking over responsibility
	of the old g_value_convert(). added G_PARAM_LAX_VALIDATION flag so
	validation alterations may be valid a part of the property setting
	process.

	* gparamspecs.[hc]: made value comparisons stable (for sort applications).
	added GParamSpecValueArray, a param spec for value arrays and
	GParamSpecClosure. nuked the value exchange functions and
	GParamSpecCCallback.

	* gtype.[hc]: catch unintialized usages of the type system with
	g_return_val_if_uninitialized(). introduced G_TYPE_FLAG_VALUE_ABSTRACT
	to flag types that introduce a value table, but can't be used for
	g_value_init(). cleaned up reserved type ids.

	* gvalue.[hc]: code cleanups and saner checking.
	nuked the value exchange API. implemented value transformations, we
	can't really "convert" values, rather transforms are an anylogy to
	C casts, real conversions need a param spec for validation, which is
	why g_param_value_convert() does real conversions now.

	* gvaluearray.[hc]: new files that implement a GValueArray, a struct
	that can hold inhomogeneous arrays of value (to that extend that it
	also allowes undefined values, i.e. G_VALUE_TYPE(value)==0).
	this is exposed to the type system as a boxed type.

	* gvaluetransform.c: new file implementing most of the former value
	exchange functions as single-sided transformations.

	* gvaluetypes.[hc]: nuked G_TYPE_CCALLBACK, added
	g_value_set_string_take_ownership().

	* *.h: s/G_IS_VALUE_/G_VALUE_HOLDS_/.

	* *.[hc]: many fixes and cleanups.

	* many warning improvements.

Tue Feb 27 18:35:15 2001  Tim Janik  <timj@gtk.org>

	* gobject.c (g_object_get_valist): urg, pass G_VALUE_NOCOPY_CONTENTS
	into G_VALUE_LCOPY(), this needs proper documenting.

	* gparam.c: fixed G_PARAM_USER_MASK.

	* gtype.c (type_data_make_W):
	(type_data_last_unref_Wm): fixed invalid memory freeing.

	* gobject.c (g_object_last_unref): destroy signal handlers associated
	with object, right before finalization.

	* gsignal.c (g_signal_parse_name): catch destroyed nodes or signals
	that don't actually support details.

	* gobject.[hc]: got rid of property trailers. nuked GObject
	properties "data" and the "signal" variants.
	(g_object_connect): new convenience function to do multiple
	signal connections at once.
	(g_object_disconnect): likewise, for disconnections.

	* gparam.[hc] (g_param_spec_pool_lookup): took out trailer support.

	* gvalue.[hc]: marked g_value_fits_pointer() and g_value_peek_pointer()
	as private (the latter got renamed from g_value_get_as_pointer()).

Wed Mar  7 09:32:06 2001  Tim Janik  <timj@gtk.org>

        * glib-object.h: add gvaluearray.h.

        * gstring.[hc]: fixup naming of g_string_sprint*.

        * gtypes.h: fixed GCompareDataFunc naming.

Wed Mar  7 09:33:27 2001  Tim Janik  <timj@gtk.org>

        * gobject/Makefile.am: shuffled rules to avoid excessive
        rebuilds.

        * gobject/gobject-sections.txt: updates.

        * gobject/tmpl/*: bunch of updates, added another patch
        from Eric Lemings <eric.b.lemings@lmco.com>.
2001-03-07 14:46:45 +00:00

340 lines
19 KiB
C

/* GObject - GLib Type, Object, Parameter and Signal Library
* Copyright (C) 2001 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "gvalue.h"
#include "genums.h"
/* same type transforms
*/
static void
value_transform_memcpy_data0 (const GValue *src_value,
GValue *dest_value)
{
memcpy (&dest_value->data[0], &src_value->data[0], sizeof (src_value->data[0]));
}
#define value_transform_int_int value_transform_memcpy_data0
#define value_transform_uint_uint value_transform_memcpy_data0
#define value_transform_long_long value_transform_memcpy_data0
#define value_transform_ulong_ulong value_transform_memcpy_data0
#define value_transform_float_float value_transform_memcpy_data0
#define value_transform_double_double value_transform_memcpy_data0
/* numeric casts
*/
#define DEFINE_CAST(func_name, from_member, ctype, to_member) \
static void \
value_transform_##func_name (const GValue *src_value, \
GValue *dest_value) \
{ \
ctype c_value = src_value->data[0].##from_member; \
dest_value->data[0].##to_member = c_value; \
}
DEFINE_CAST (int_s8, v_int, gint8, v_int);
DEFINE_CAST (int_u8, v_int, guint8, v_uint);
DEFINE_CAST (int_uint, v_int, guint, v_uint);
DEFINE_CAST (int_long, v_int, glong, v_long);
DEFINE_CAST (int_ulong, v_int, gulong, v_ulong);
DEFINE_CAST (int_float, v_int, gfloat, v_float);
DEFINE_CAST (int_double, v_int, gdouble, v_double);
DEFINE_CAST (uint_s8, v_uint, gint8, v_int);
DEFINE_CAST (uint_u8, v_uint, guint8, v_uint);
DEFINE_CAST (uint_int, v_uint, gint, v_int);
DEFINE_CAST (uint_long, v_uint, glong, v_long);
DEFINE_CAST (uint_ulong, v_uint, gulong, v_ulong);
DEFINE_CAST (uint_float, v_uint, gfloat, v_float);
DEFINE_CAST (uint_double, v_uint, gdouble, v_double);
DEFINE_CAST (long_s8, v_long, gint8, v_int);
DEFINE_CAST (long_u8, v_long, guint8, v_uint);
DEFINE_CAST (long_int, v_long, gint, v_int);
DEFINE_CAST (long_uint, v_long, guint, v_uint);
DEFINE_CAST (long_ulong, v_long, gulong, v_ulong);
DEFINE_CAST (long_float, v_long, gfloat, v_float);
DEFINE_CAST (long_double, v_long, gdouble, v_double);
DEFINE_CAST (ulong_s8, v_ulong, gint8, v_int);
DEFINE_CAST (ulong_u8, v_ulong, guint8, v_uint);
DEFINE_CAST (ulong_int, v_ulong, gint, v_int);
DEFINE_CAST (ulong_uint, v_ulong, guint, v_uint);
DEFINE_CAST (ulong_long, v_ulong, glong, v_long);
DEFINE_CAST (ulong_float, v_ulong, gfloat, v_float);
DEFINE_CAST (ulong_double, v_ulong, gdouble, v_double);
DEFINE_CAST (float_s8, v_float, gint8, v_int);
DEFINE_CAST (float_u8, v_float, guint8, v_uint);
DEFINE_CAST (float_int, v_float, gint, v_int);
DEFINE_CAST (float_uint, v_float, guint, v_uint);
DEFINE_CAST (float_long, v_float, glong, v_long);
DEFINE_CAST (float_ulong, v_float, gulong, v_ulong);
DEFINE_CAST (float_double, v_float, gdouble, v_double);
DEFINE_CAST (double_s8, v_double, gint8, v_int);
DEFINE_CAST (double_u8, v_double, guint8, v_uint);
DEFINE_CAST (double_int, v_double, gint, v_int);
DEFINE_CAST (double_uint, v_double, guint, v_uint);
DEFINE_CAST (double_long, v_double, glong, v_long);
DEFINE_CAST (double_ulong, v_double, gulong, v_ulong);
DEFINE_CAST (double_float, v_double, gfloat, v_float);
/* boolean assignments
*/
#define DEFINE_BOOL_CHECK(func_name, from_member) \
static void \
value_transform_##func_name (const GValue *src_value, \
GValue *dest_value) \
{ \
dest_value->data[0].v_int = src_value->data[0].##from_member != 0; \
}
DEFINE_BOOL_CHECK (int_bool, v_int);
DEFINE_BOOL_CHECK (uint_bool, v_uint);
DEFINE_BOOL_CHECK (long_bool, v_long);
DEFINE_BOOL_CHECK (ulong_bool, v_uint);
/* string printouts
*/
#define DEFINE_SPRINTF(func_name, from_member, format) \
static void \
value_transform_##func_name (const GValue *src_value, \
GValue *dest_value) \
{ \
dest_value->data[0].v_pointer = \
g_strdup_printf ((format), src_value->data[0].##from_member); \
}
DEFINE_SPRINTF (int_string, v_int, "%d");
DEFINE_SPRINTF (uint_string, v_uint, "%u");
DEFINE_SPRINTF (long_string, v_long, "%ld");
DEFINE_SPRINTF (ulong_string, v_ulong, "%lu");
DEFINE_SPRINTF (float_string, v_float, "%f");
DEFINE_SPRINTF (double_string, v_double, "%f");
/* special cases
*/
static void
value_transform_bool_string (const GValue *src_value,
GValue *dest_value)
{
dest_value->data[0].v_pointer = g_strdup_printf ("%s",
src_value->data[0].v_int ?
"TRUE" : "FALSE");
}
static void
value_transform_string_string (const GValue *src_value,
GValue *dest_value)
{
dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer);
}
static void
value_transform_enum_string (const GValue *src_value,
GValue *dest_value)
{
GEnumClass *class = g_type_class_ref (G_VALUE_TYPE (src_value));
GEnumValue *enum_value = g_enum_get_value (class, src_value->data[0].v_int);
if (enum_value)
dest_value->data[0].v_pointer = g_strdup (enum_value->value_name);
else
dest_value->data[0].v_pointer = g_strdup_printf ("%d", src_value->data[0].v_int);
g_type_class_unref (class);
}
static void
value_transform_flags_string (const GValue *src_value,
GValue *dest_value)
{
GFlagsClass *class = g_type_class_ref (G_VALUE_TYPE (src_value));
GFlagsValue *flags_value = g_flags_get_first_value (class, src_value->data[0].v_uint);
if (flags_value)
{
GString *gstring = g_string_new ("");
guint v_flags = src_value->data[0].v_uint;
do
{
v_flags &= ~flags_value->value;
if (gstring->str[0])
g_string_append (gstring, " | ");
g_string_append (gstring, flags_value->value_name);
flags_value = g_flags_get_first_value (class, v_flags);
}
while (flags_value);
if (v_flags)
dest_value->data[0].v_pointer = g_strdup_printf ("%s | %u",
gstring->str,
v_flags);
else
dest_value->data[0].v_pointer = g_strdup (gstring->str);
g_string_free (gstring, TRUE);
}
else
dest_value->data[0].v_pointer = g_strdup_printf ("%u", src_value->data[0].v_uint);
g_type_class_unref (class);
}
/* registration
*/
void
g_value_transforms_init (void) /* sync with gtype.c */
{
/* some transformations are a bit questionable,
* we currently skip those
*/
#define SKIP____register_transform_func(type1,type2,transform_func) /* skip questionable transforms */
/* numeric types (plus to string) */
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_CHAR, value_transform_int_int);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UCHAR, value_transform_int_u8);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_BOOLEAN, value_transform_int_bool);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_INT, value_transform_int_int);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UINT, value_transform_int_uint);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_LONG, value_transform_int_long);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_ULONG, value_transform_int_ulong);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_ENUM, value_transform_int_int);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_FLAGS, value_transform_int_uint);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_FLOAT, value_transform_int_float);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_DOUBLE, value_transform_int_double);
g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_STRING, value_transform_int_string);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_CHAR, value_transform_uint_s8);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UCHAR, value_transform_uint_uint);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_BOOLEAN, value_transform_uint_bool);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_INT, value_transform_uint_int);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UINT, value_transform_uint_uint);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_LONG, value_transform_uint_long);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_ULONG, value_transform_uint_ulong);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_ENUM, value_transform_uint_int);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_FLAGS, value_transform_uint_uint);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_FLOAT, value_transform_uint_float);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_DOUBLE, value_transform_uint_double);
g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_STRING, value_transform_uint_string);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_CHAR, value_transform_int_s8);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UCHAR, value_transform_int_u8);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, value_transform_int_int);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_INT, value_transform_int_int);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UINT, value_transform_int_uint);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_LONG, value_transform_int_long);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_ULONG, value_transform_int_ulong);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_ENUM, value_transform_int_int);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_FLAGS, value_transform_int_uint);
SKIP____register_transform_func (G_TYPE_BOOLEAN, G_TYPE_FLOAT, value_transform_int_float);
SKIP____register_transform_func (G_TYPE_BOOLEAN, G_TYPE_DOUBLE, value_transform_int_double);
g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_STRING, value_transform_bool_string);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_CHAR, value_transform_int_s8);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_UCHAR, value_transform_int_u8);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_BOOLEAN, value_transform_int_bool);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_INT, value_transform_int_int);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_UINT, value_transform_int_uint);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_LONG, value_transform_int_long);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_ULONG, value_transform_int_ulong);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_ENUM, value_transform_int_int);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_FLAGS, value_transform_int_uint);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_FLOAT, value_transform_int_float);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_DOUBLE, value_transform_int_double);
g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, value_transform_int_string);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_CHAR, value_transform_uint_s8);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UCHAR, value_transform_uint_u8);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_BOOLEAN, value_transform_uint_bool);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_INT, value_transform_uint_int);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UINT, value_transform_uint_uint);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_LONG, value_transform_uint_long);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_ULONG, value_transform_uint_ulong);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_ENUM, value_transform_uint_int);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_FLAGS, value_transform_uint_uint);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_FLOAT, value_transform_uint_float);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_DOUBLE, value_transform_uint_double);
g_value_register_transform_func (G_TYPE_UINT, G_TYPE_STRING, value_transform_uint_string);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_CHAR, value_transform_long_s8);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UCHAR, value_transform_long_u8);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_BOOLEAN, value_transform_long_bool);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_INT, value_transform_long_int);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UINT, value_transform_long_uint);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_LONG, value_transform_long_long);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_ULONG, value_transform_long_ulong);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_ENUM, value_transform_long_int);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_FLAGS, value_transform_long_uint);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_FLOAT, value_transform_long_float);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_DOUBLE, value_transform_long_double);
g_value_register_transform_func (G_TYPE_LONG, G_TYPE_STRING, value_transform_long_string);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_CHAR, value_transform_ulong_s8);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UCHAR, value_transform_ulong_u8);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_BOOLEAN, value_transform_ulong_bool);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_INT, value_transform_ulong_int);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UINT, value_transform_ulong_uint);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_LONG, value_transform_ulong_long);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_ULONG, value_transform_ulong_ulong);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_ENUM, value_transform_ulong_int);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_FLAGS, value_transform_ulong_uint);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_FLOAT, value_transform_ulong_float);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_DOUBLE, value_transform_ulong_double);
g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_STRING, value_transform_ulong_string);
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_CHAR, value_transform_int_s8);
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UCHAR, value_transform_int_u8);
SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_BOOLEAN, value_transform_int_bool);
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_INT, value_transform_int_int);
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UINT, value_transform_int_uint);
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_LONG, value_transform_int_long);
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_ULONG, value_transform_int_ulong);
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_ENUM, value_transform_int_int);
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_FLAGS, value_transform_int_uint);
SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_FLOAT, value_transform_int_float);
SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_DOUBLE, value_transform_int_double);
g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_STRING, value_transform_enum_string);
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_CHAR, value_transform_uint_s8);
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UCHAR, value_transform_uint_u8);
SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_BOOLEAN, value_transform_uint_bool);
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_INT, value_transform_uint_int);
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UINT, value_transform_uint_uint);
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_LONG, value_transform_uint_long);
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_ULONG, value_transform_uint_ulong);
SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_ENUM, value_transform_uint_int);
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_FLAGS, value_transform_uint_uint);
SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_FLOAT, value_transform_uint_float);
SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_DOUBLE, value_transform_uint_double);
g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_STRING, value_transform_flags_string);
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_CHAR, value_transform_float_s8);
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UCHAR, value_transform_float_u8);
SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_BOOLEAN, value_transform_float_bool);
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_INT, value_transform_float_int);
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UINT, value_transform_float_uint);
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_LONG, value_transform_float_long);
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_ULONG, value_transform_float_ulong);
SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_ENUM, value_transform_float_int);
SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_FLAGS, value_transform_float_uint);
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_FLOAT, value_transform_float_float);
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_DOUBLE, value_transform_float_double);
g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_STRING, value_transform_float_string);
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_CHAR, value_transform_double_s8);
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UCHAR, value_transform_double_u8);
SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_BOOLEAN, value_transform_double_bool);
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_INT, value_transform_double_int);
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UINT, value_transform_double_uint);
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_LONG, value_transform_double_long);
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_ULONG, value_transform_double_ulong);
SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_ENUM, value_transform_double_int);
SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_FLAGS, value_transform_double_uint);
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_FLOAT, value_transform_double_float);
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_DOUBLE, value_transform_double_double);
g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_STRING, value_transform_double_string);
/* string types */
g_value_register_transform_func (G_TYPE_STRING, G_TYPE_STRING, value_transform_string_string);
}