1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/glib/gobject/gvaluetransform.c Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,443 @@
1.4 +/* GObject - GLib Type, Object, Parameter and Signal Library
1.5 + * Copyright (C) 2001 Red Hat, Inc.
1.6 + *
1.7 + * This library is free software; you can redistribute it and/or
1.8 + * modify it under the terms of the GNU Lesser General Public
1.9 + * License as published by the Free Software Foundation; either
1.10 + * version 2 of the License, or (at your option) any later version.
1.11 + *
1.12 + * This library is distributed in the hope that it will be useful,
1.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1.15 + * Lesser General Public License for more details.
1.16 + *
1.17 + * You should have received a copy of the GNU Lesser General
1.18 + * Public License along with this library; if not, write to the
1.19 + * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
1.20 + * Boston, MA 02111-1307, USA.
1.21 + */
1.22 +
1.23 +#include "config.h"
1.24 +
1.25 +#include <string.h>
1.26 +
1.27 +#include "gvalue.h"
1.28 +#include "genums.h"
1.29 +#include "gobjectalias.h"
1.30 +
1.31 +
1.32 +/* same type transforms
1.33 + */
1.34 +static void
1.35 +value_transform_memcpy_data0 (const GValue *src_value,
1.36 + GValue *dest_value)
1.37 +{
1.38 + memcpy (&dest_value->data[0], &src_value->data[0], sizeof (src_value->data[0]));
1.39 +}
1.40 +#define value_transform_int_int value_transform_memcpy_data0
1.41 +#define value_transform_uint_uint value_transform_memcpy_data0
1.42 +#define value_transform_long_long value_transform_memcpy_data0
1.43 +#define value_transform_ulong_ulong value_transform_memcpy_data0
1.44 +#define value_transform_int64_int64 value_transform_memcpy_data0
1.45 +#define value_transform_uint64_uint64 value_transform_memcpy_data0
1.46 +#define value_transform_float_float value_transform_memcpy_data0
1.47 +#define value_transform_double_double value_transform_memcpy_data0
1.48 +
1.49 +
1.50 +/* numeric casts
1.51 + */
1.52 +#define DEFINE_CAST(func_name, from_member, ctype, to_member) \
1.53 +static void \
1.54 +value_transform_##func_name (const GValue *src_value, \
1.55 + GValue *dest_value) \
1.56 +{ \
1.57 + ctype c_value = src_value->data[0].from_member; \
1.58 + dest_value->data[0].to_member = c_value; \
1.59 +} extern void glib_dummy_decl (void)
1.60 +DEFINE_CAST (int_s8, v_int, gint8, v_int);
1.61 +DEFINE_CAST (int_u8, v_int, guint8, v_uint);
1.62 +DEFINE_CAST (int_uint, v_int, guint, v_uint);
1.63 +DEFINE_CAST (int_long, v_int, glong, v_long);
1.64 +DEFINE_CAST (int_ulong, v_int, gulong, v_ulong);
1.65 +DEFINE_CAST (int_int64, v_int, gint64, v_int64);
1.66 +DEFINE_CAST (int_uint64, v_int, guint64, v_uint64);
1.67 +DEFINE_CAST (int_float, v_int, gfloat, v_float);
1.68 +DEFINE_CAST (int_double, v_int, gdouble, v_double);
1.69 +DEFINE_CAST (uint_s8, v_uint, gint8, v_int);
1.70 +DEFINE_CAST (uint_u8, v_uint, guint8, v_uint);
1.71 +DEFINE_CAST (uint_int, v_uint, gint, v_int);
1.72 +DEFINE_CAST (uint_long, v_uint, glong, v_long);
1.73 +DEFINE_CAST (uint_ulong, v_uint, gulong, v_ulong);
1.74 +DEFINE_CAST (uint_int64, v_uint, gint64, v_int64);
1.75 +DEFINE_CAST (uint_uint64, v_uint, guint64, v_uint64);
1.76 +DEFINE_CAST (uint_float, v_uint, gfloat, v_float);
1.77 +DEFINE_CAST (uint_double, v_uint, gdouble, v_double);
1.78 +DEFINE_CAST (long_s8, v_long, gint8, v_int);
1.79 +DEFINE_CAST (long_u8, v_long, guint8, v_uint);
1.80 +DEFINE_CAST (long_int, v_long, gint, v_int);
1.81 +DEFINE_CAST (long_uint, v_long, guint, v_uint);
1.82 +DEFINE_CAST (long_ulong, v_long, gulong, v_ulong);
1.83 +DEFINE_CAST (long_int64, v_long, gint64, v_int64);
1.84 +DEFINE_CAST (long_uint64, v_long, guint64, v_uint64);
1.85 +DEFINE_CAST (long_float, v_long, gfloat, v_float);
1.86 +DEFINE_CAST (long_double, v_long, gdouble, v_double);
1.87 +DEFINE_CAST (ulong_s8, v_ulong, gint8, v_int);
1.88 +DEFINE_CAST (ulong_u8, v_ulong, guint8, v_uint);
1.89 +DEFINE_CAST (ulong_int, v_ulong, gint, v_int);
1.90 +DEFINE_CAST (ulong_uint, v_ulong, guint, v_uint);
1.91 +DEFINE_CAST (ulong_int64, v_ulong, gint64, v_int64);
1.92 +DEFINE_CAST (ulong_uint64, v_ulong, guint64, v_uint64);
1.93 +DEFINE_CAST (ulong_long, v_ulong, glong, v_long);
1.94 +DEFINE_CAST (ulong_float, v_ulong, gfloat, v_float);
1.95 +DEFINE_CAST (ulong_double, v_ulong, gdouble, v_double);
1.96 +DEFINE_CAST (int64_s8, v_int64, gint8, v_int);
1.97 +DEFINE_CAST (int64_u8, v_int64, guint8, v_uint);
1.98 +DEFINE_CAST (int64_int, v_int64, gint, v_int);
1.99 +DEFINE_CAST (int64_uint, v_int64, guint, v_uint);
1.100 +DEFINE_CAST (int64_long, v_int64, glong, v_long);
1.101 +DEFINE_CAST (int64_uint64, v_int64, guint64, v_uint64);
1.102 +DEFINE_CAST (int64_ulong, v_int64, gulong, v_ulong);
1.103 +DEFINE_CAST (int64_float, v_int64, gfloat, v_float);
1.104 +DEFINE_CAST (int64_double, v_int64, gdouble, v_double);
1.105 +DEFINE_CAST (uint64_s8, v_uint64, gint8, v_int);
1.106 +DEFINE_CAST (uint64_u8, v_uint64, guint8, v_uint);
1.107 +DEFINE_CAST (uint64_int, v_uint64, gint, v_int);
1.108 +DEFINE_CAST (uint64_uint, v_uint64, guint, v_uint);
1.109 +DEFINE_CAST (uint64_long, v_uint64, glong, v_long);
1.110 +DEFINE_CAST (uint64_ulong, v_uint64, gulong, v_ulong);
1.111 +DEFINE_CAST (uint64_int64, v_uint64, gint64, v_int64);
1.112 +#ifdef _MSC_VER
1.113 +/* work around error C2520: conversion from unsigned __int64 to double
1.114 + * not implemented, use signed __int64
1.115 + * If it is supported don't miss to g_value_register_transform_func() below
1.116 + */
1.117 +#pragma message ("Check if cast from uint64 to double is supported with msvc 6.0")
1.118 +#else
1.119 +DEFINE_CAST (uint64_float, v_uint64, gfloat, v_float);
1.120 +DEFINE_CAST (uint64_double, v_uint64, gdouble, v_double);
1.121 +#endif
1.122 +DEFINE_CAST (float_s8, v_float, gint8, v_int);
1.123 +DEFINE_CAST (float_u8, v_float, guint8, v_uint);
1.124 +DEFINE_CAST (float_int, v_float, gint, v_int);
1.125 +DEFINE_CAST (float_uint, v_float, guint, v_uint);
1.126 +DEFINE_CAST (float_long, v_float, glong, v_long);
1.127 +DEFINE_CAST (float_ulong, v_float, gulong, v_ulong);
1.128 +DEFINE_CAST (float_int64, v_float, gint64, v_int64);
1.129 +DEFINE_CAST (float_uint64, v_float, guint64, v_uint64);
1.130 +DEFINE_CAST (float_double, v_float, gdouble, v_double);
1.131 +DEFINE_CAST (double_s8, v_double, gint8, v_int);
1.132 +DEFINE_CAST (double_u8, v_double, guint8, v_uint);
1.133 +DEFINE_CAST (double_int, v_double, gint, v_int);
1.134 +DEFINE_CAST (double_uint, v_double, guint, v_uint);
1.135 +DEFINE_CAST (double_long, v_double, glong, v_long);
1.136 +DEFINE_CAST (double_ulong, v_double, gulong, v_ulong);
1.137 +DEFINE_CAST (double_int64, v_double, gint64, v_int64);
1.138 +DEFINE_CAST (double_uint64, v_double, guint64, v_uint64);
1.139 +DEFINE_CAST (double_float, v_double, gfloat, v_float);
1.140 +
1.141 +
1.142 +/* boolean assignments
1.143 + */
1.144 +#define DEFINE_BOOL_CHECK(func_name, from_member) \
1.145 +static void \
1.146 +value_transform_##func_name (const GValue *src_value, \
1.147 + GValue *dest_value) \
1.148 +{ \
1.149 + dest_value->data[0].v_int = src_value->data[0].from_member != 0; \
1.150 +} extern void glib_dummy_decl (void)
1.151 +DEFINE_BOOL_CHECK (int_bool, v_int);
1.152 +DEFINE_BOOL_CHECK (uint_bool, v_uint);
1.153 +DEFINE_BOOL_CHECK (long_bool, v_long);
1.154 +DEFINE_BOOL_CHECK (ulong_bool, v_uint);
1.155 +DEFINE_BOOL_CHECK (int64_bool, v_int64);
1.156 +DEFINE_BOOL_CHECK (uint64_bool, v_uint64);
1.157 +
1.158 +
1.159 +/* string printouts
1.160 + */
1.161 +#define DEFINE_SPRINTF(func_name, from_member, format) \
1.162 +static void \
1.163 +value_transform_##func_name (const GValue *src_value, \
1.164 + GValue *dest_value) \
1.165 +{ \
1.166 + dest_value->data[0].v_pointer = g_strdup_printf ((format), \
1.167 + src_value->data[0].from_member); \
1.168 +} extern void glib_dummy_decl (void)
1.169 +DEFINE_SPRINTF (int_string, v_int, "%d");
1.170 +DEFINE_SPRINTF (uint_string, v_uint, "%u");
1.171 +DEFINE_SPRINTF (long_string, v_long, "%ld");
1.172 +DEFINE_SPRINTF (ulong_string, v_ulong, "%lu");
1.173 +DEFINE_SPRINTF (int64_string, v_int64, "%" G_GINT64_FORMAT);
1.174 +DEFINE_SPRINTF (uint64_string, v_uint64, "%" G_GUINT64_FORMAT);
1.175 +DEFINE_SPRINTF (float_string, v_float, "%f");
1.176 +DEFINE_SPRINTF (double_string, v_double, "%f");
1.177 +
1.178 +
1.179 +/* special cases
1.180 + */
1.181 +static void
1.182 +value_transform_bool_string (const GValue *src_value,
1.183 + GValue *dest_value)
1.184 +{
1.185 + dest_value->data[0].v_pointer = g_strdup_printf ("%s",
1.186 + src_value->data[0].v_int ?
1.187 + "TRUE" : "FALSE");
1.188 +}
1.189 +static void
1.190 +value_transform_string_string (const GValue *src_value,
1.191 + GValue *dest_value)
1.192 +{
1.193 + dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer);
1.194 +}
1.195 +static void
1.196 +value_transform_enum_string (const GValue *src_value,
1.197 + GValue *dest_value)
1.198 +{
1.199 + GEnumClass *class = g_type_class_ref (G_VALUE_TYPE (src_value));
1.200 + GEnumValue *enum_value = g_enum_get_value (class, src_value->data[0].v_long);
1.201 +
1.202 + if (enum_value)
1.203 + dest_value->data[0].v_pointer = g_strdup (enum_value->value_name);
1.204 + else
1.205 + dest_value->data[0].v_pointer = g_strdup_printf ("%ld", src_value->data[0].v_long);
1.206 +
1.207 + g_type_class_unref (class);
1.208 +}
1.209 +static void
1.210 +value_transform_flags_string (const GValue *src_value,
1.211 + GValue *dest_value)
1.212 +{
1.213 + GFlagsClass *class = g_type_class_ref (G_VALUE_TYPE (src_value));
1.214 + GFlagsValue *flags_value = g_flags_get_first_value (class, src_value->data[0].v_ulong);
1.215 +
1.216 + if (flags_value)
1.217 + {
1.218 + GString *gstring = g_string_new (NULL);
1.219 + guint v_flags = src_value->data[0].v_ulong;
1.220 +
1.221 + do
1.222 + {
1.223 + v_flags &= ~flags_value->value;
1.224 +
1.225 + if (gstring->str[0])
1.226 + g_string_append (gstring, " | ");
1.227 + g_string_append (gstring, flags_value->value_name);
1.228 + flags_value = g_flags_get_first_value (class, v_flags);
1.229 + }
1.230 + while (flags_value);
1.231 +
1.232 + if (v_flags)
1.233 + dest_value->data[0].v_pointer = g_strdup_printf ("%s | %u",
1.234 + gstring->str,
1.235 + v_flags);
1.236 + else
1.237 + dest_value->data[0].v_pointer = g_strdup (gstring->str);
1.238 + g_string_free (gstring, TRUE);
1.239 + }
1.240 + else
1.241 + dest_value->data[0].v_pointer = g_strdup_printf ("%lu", src_value->data[0].v_ulong);
1.242 +
1.243 + g_type_class_unref (class);
1.244 +}
1.245 +
1.246 +
1.247 +/* registration
1.248 + */
1.249 +void
1.250 +g_value_transforms_init (void)
1.251 +{
1.252 + /* some transformations are a bit questionable,
1.253 + * we currently skip those
1.254 + */
1.255 +#define SKIP____register_transform_func(type1,type2,transform_func) /* skip questionable transforms */ \
1.256 + (void)0
1.257 +
1.258 + /* numeric types (plus to string) */
1.259 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_CHAR, value_transform_int_int);
1.260 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UCHAR, value_transform_int_u8);
1.261 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_BOOLEAN, value_transform_int_bool);
1.262 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_INT, value_transform_int_int);
1.263 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UINT, value_transform_int_uint);
1.264 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_LONG, value_transform_int_long);
1.265 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_ULONG, value_transform_int_ulong);
1.266 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_INT64, value_transform_int_int64);
1.267 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_UINT64, value_transform_int_uint64);
1.268 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_ENUM, value_transform_int_long);
1.269 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_FLAGS, value_transform_int_ulong);
1.270 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_FLOAT, value_transform_int_float);
1.271 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_DOUBLE, value_transform_int_double);
1.272 + g_value_register_transform_func (G_TYPE_CHAR, G_TYPE_STRING, value_transform_int_string);
1.273 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_CHAR, value_transform_uint_s8);
1.274 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UCHAR, value_transform_uint_uint);
1.275 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_BOOLEAN, value_transform_uint_bool);
1.276 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_INT, value_transform_uint_int);
1.277 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UINT, value_transform_uint_uint);
1.278 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_LONG, value_transform_uint_long);
1.279 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_ULONG, value_transform_uint_ulong);
1.280 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_INT64, value_transform_uint_int64);
1.281 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_UINT64, value_transform_uint_uint64);
1.282 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_ENUM, value_transform_uint_long);
1.283 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_FLAGS, value_transform_uint_ulong);
1.284 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_FLOAT, value_transform_uint_float);
1.285 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_DOUBLE, value_transform_uint_double);
1.286 + g_value_register_transform_func (G_TYPE_UCHAR, G_TYPE_STRING, value_transform_uint_string);
1.287 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_CHAR, value_transform_int_s8);
1.288 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UCHAR, value_transform_int_u8);
1.289 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, value_transform_int_int);
1.290 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_INT, value_transform_int_int);
1.291 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UINT, value_transform_int_uint);
1.292 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_LONG, value_transform_int_long);
1.293 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_ULONG, value_transform_int_ulong);
1.294 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_INT64, value_transform_int_int64);
1.295 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_UINT64, value_transform_int_uint64);
1.296 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_ENUM, value_transform_int_long);
1.297 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_FLAGS, value_transform_int_ulong);
1.298 + SKIP____register_transform_func (G_TYPE_BOOLEAN, G_TYPE_FLOAT, value_transform_int_float);
1.299 + SKIP____register_transform_func (G_TYPE_BOOLEAN, G_TYPE_DOUBLE, value_transform_int_double);
1.300 + g_value_register_transform_func (G_TYPE_BOOLEAN, G_TYPE_STRING, value_transform_bool_string);
1.301 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_CHAR, value_transform_int_s8);
1.302 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_UCHAR, value_transform_int_u8);
1.303 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_BOOLEAN, value_transform_int_bool);
1.304 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_INT, value_transform_int_int);
1.305 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_UINT, value_transform_int_uint);
1.306 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_LONG, value_transform_int_long);
1.307 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_ULONG, value_transform_int_ulong);
1.308 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_INT64, value_transform_int_int64);
1.309 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_UINT64, value_transform_int_uint64);
1.310 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_ENUM, value_transform_int_long);
1.311 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_FLAGS, value_transform_int_ulong);
1.312 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_FLOAT, value_transform_int_float);
1.313 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_DOUBLE, value_transform_int_double);
1.314 + g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, value_transform_int_string);
1.315 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_CHAR, value_transform_uint_s8);
1.316 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UCHAR, value_transform_uint_u8);
1.317 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_BOOLEAN, value_transform_uint_bool);
1.318 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_INT, value_transform_uint_int);
1.319 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UINT, value_transform_uint_uint);
1.320 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_LONG, value_transform_uint_long);
1.321 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_ULONG, value_transform_uint_ulong);
1.322 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_INT64, value_transform_uint_int64);
1.323 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_UINT64, value_transform_uint_uint64);
1.324 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_ENUM, value_transform_uint_long);
1.325 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_FLAGS, value_transform_uint_ulong);
1.326 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_FLOAT, value_transform_uint_float);
1.327 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_DOUBLE, value_transform_uint_double);
1.328 + g_value_register_transform_func (G_TYPE_UINT, G_TYPE_STRING, value_transform_uint_string);
1.329 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_CHAR, value_transform_long_s8);
1.330 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UCHAR, value_transform_long_u8);
1.331 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_BOOLEAN, value_transform_long_bool);
1.332 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_INT, value_transform_long_int);
1.333 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UINT, value_transform_long_uint);
1.334 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_LONG, value_transform_long_long);
1.335 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_ULONG, value_transform_long_ulong);
1.336 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_INT64, value_transform_long_int64);
1.337 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_UINT64, value_transform_long_uint64);
1.338 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_ENUM, value_transform_long_long);
1.339 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_FLAGS, value_transform_long_ulong);
1.340 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_FLOAT, value_transform_long_float);
1.341 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_DOUBLE, value_transform_long_double);
1.342 + g_value_register_transform_func (G_TYPE_LONG, G_TYPE_STRING, value_transform_long_string);
1.343 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_CHAR, value_transform_ulong_s8);
1.344 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UCHAR, value_transform_ulong_u8);
1.345 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_BOOLEAN, value_transform_ulong_bool);
1.346 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_INT, value_transform_ulong_int);
1.347 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UINT, value_transform_ulong_uint);
1.348 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_LONG, value_transform_ulong_long);
1.349 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_ULONG, value_transform_ulong_ulong);
1.350 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_INT64, value_transform_ulong_int64);
1.351 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_UINT64, value_transform_ulong_uint64);
1.352 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_ENUM, value_transform_ulong_long);
1.353 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_FLAGS, value_transform_ulong_ulong);
1.354 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_FLOAT, value_transform_ulong_float);
1.355 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_DOUBLE, value_transform_ulong_double);
1.356 + g_value_register_transform_func (G_TYPE_ULONG, G_TYPE_STRING, value_transform_ulong_string);
1.357 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_CHAR, value_transform_int64_s8);
1.358 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_UCHAR, value_transform_int64_u8);
1.359 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_BOOLEAN, value_transform_int64_bool);
1.360 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_INT, value_transform_int64_int);
1.361 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_UINT, value_transform_int64_uint);
1.362 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_LONG, value_transform_int64_long);
1.363 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_ULONG, value_transform_int64_ulong);
1.364 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_INT64, value_transform_int64_int64);
1.365 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_UINT64, value_transform_int64_uint64);
1.366 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_ENUM, value_transform_int64_long);
1.367 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_FLAGS, value_transform_int64_ulong);
1.368 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_FLOAT, value_transform_int64_float);
1.369 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_DOUBLE, value_transform_int64_double);
1.370 + g_value_register_transform_func (G_TYPE_INT64, G_TYPE_STRING, value_transform_int64_string);
1.371 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_CHAR, value_transform_uint64_s8);
1.372 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_UCHAR, value_transform_uint64_u8);
1.373 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_BOOLEAN, value_transform_uint64_bool);
1.374 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_INT, value_transform_uint64_int);
1.375 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_UINT, value_transform_uint64_uint);
1.376 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_LONG, value_transform_uint64_long);
1.377 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_ULONG, value_transform_uint64_ulong);
1.378 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_INT64, value_transform_uint64_int64);
1.379 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_UINT64, value_transform_uint64_uint64);
1.380 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_ENUM, value_transform_uint64_long);
1.381 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_FLAGS, value_transform_uint64_ulong);
1.382 +#ifndef _MSC_VER
1.383 + /* required casts unsupported with msvc 5.0 */
1.384 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_FLOAT, value_transform_uint64_float);
1.385 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_DOUBLE, value_transform_uint64_double);
1.386 +#endif
1.387 + g_value_register_transform_func (G_TYPE_UINT64, G_TYPE_STRING, value_transform_uint64_string);
1.388 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_CHAR, value_transform_long_s8);
1.389 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UCHAR, value_transform_long_u8);
1.390 + SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_BOOLEAN, value_transform_long_bool);
1.391 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_INT, value_transform_long_int);
1.392 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UINT, value_transform_long_uint);
1.393 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_LONG, value_transform_long_long);
1.394 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_ULONG, value_transform_long_ulong);
1.395 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_INT64, value_transform_long_int64);
1.396 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_UINT64, value_transform_long_uint64);
1.397 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_ENUM, value_transform_long_long);
1.398 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_FLAGS, value_transform_long_ulong);
1.399 + SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_FLOAT, value_transform_long_float);
1.400 + SKIP____register_transform_func (G_TYPE_ENUM, G_TYPE_DOUBLE, value_transform_long_double);
1.401 + g_value_register_transform_func (G_TYPE_ENUM, G_TYPE_STRING, value_transform_enum_string);
1.402 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_CHAR, value_transform_ulong_s8);
1.403 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UCHAR, value_transform_ulong_u8);
1.404 + SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_BOOLEAN, value_transform_ulong_bool);
1.405 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_INT, value_transform_ulong_int);
1.406 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UINT, value_transform_ulong_uint);
1.407 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_LONG, value_transform_ulong_long);
1.408 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_ULONG, value_transform_ulong_ulong);
1.409 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_INT64, value_transform_ulong_int64);
1.410 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_UINT64, value_transform_ulong_uint64);
1.411 + SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_ENUM, value_transform_ulong_long);
1.412 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_FLAGS, value_transform_ulong_ulong);
1.413 + SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_FLOAT, value_transform_ulong_float);
1.414 + SKIP____register_transform_func (G_TYPE_FLAGS, G_TYPE_DOUBLE, value_transform_ulong_double);
1.415 + g_value_register_transform_func (G_TYPE_FLAGS, G_TYPE_STRING, value_transform_flags_string);
1.416 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_CHAR, value_transform_float_s8);
1.417 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UCHAR, value_transform_float_u8);
1.418 + SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_BOOLEAN, value_transform_float_bool);
1.419 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_INT, value_transform_float_int);
1.420 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UINT, value_transform_float_uint);
1.421 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_LONG, value_transform_float_long);
1.422 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_ULONG, value_transform_float_ulong);
1.423 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_INT64, value_transform_float_int64);
1.424 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_UINT64, value_transform_float_uint64);
1.425 + SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_ENUM, value_transform_float_long);
1.426 + SKIP____register_transform_func (G_TYPE_FLOAT, G_TYPE_FLAGS, value_transform_float_ulong);
1.427 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_FLOAT, value_transform_float_float);
1.428 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_DOUBLE, value_transform_float_double);
1.429 + g_value_register_transform_func (G_TYPE_FLOAT, G_TYPE_STRING, value_transform_float_string);
1.430 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_CHAR, value_transform_double_s8);
1.431 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UCHAR, value_transform_double_u8);
1.432 + SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_BOOLEAN, value_transform_double_bool);
1.433 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_INT, value_transform_double_int);
1.434 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UINT, value_transform_double_uint);
1.435 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_LONG, value_transform_double_long);
1.436 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_ULONG, value_transform_double_ulong);
1.437 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_INT64, value_transform_double_int64);
1.438 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_UINT64, value_transform_double_uint64);
1.439 + SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_ENUM, value_transform_double_long);
1.440 + SKIP____register_transform_func (G_TYPE_DOUBLE, G_TYPE_FLAGS, value_transform_double_ulong);
1.441 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_FLOAT, value_transform_double_float);
1.442 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_DOUBLE, value_transform_double_double);
1.443 + g_value_register_transform_func (G_TYPE_DOUBLE, G_TYPE_STRING, value_transform_double_string);
1.444 + /* string types */
1.445 + g_value_register_transform_func (G_TYPE_STRING, G_TYPE_STRING, value_transform_string_string);
1.446 +}