mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-09 18:54:04 +02:00
Include <string.h> for memcpy.
Thu Mar 8 16:34:22 2001 Owen Taylor <otaylor@redhat.com> * gvaluetransform.c: Include <string.h> for memcpy. * gvaluetransform.c (DEFINE_SPRINTF): Remove unnecessary and ANSI-illegal ## token pasting.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
Thu Mar 8 16:34:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gvaluetransform.c: Include <string.h> for memcpy.
|
||||||
|
|
||||||
|
* gvaluetransform.c (DEFINE_SPRINTF): Remove unnecessary
|
||||||
|
and ANSI-illegal ## token pasting.
|
||||||
|
|
||||||
Thu Mar 8 18:11:52 2001 Tim Janik <timj@gtk.org>
|
Thu Mar 8 18:11:52 2001 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gsignal.c: eek, fixed old hook detail storage code.
|
* gsignal.c: eek, fixed old hook detail storage code.
|
||||||
|
@@ -16,6 +16,8 @@
|
|||||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "gvalue.h"
|
#include "gvalue.h"
|
||||||
#include "genums.h"
|
#include "genums.h"
|
||||||
|
|
||||||
@@ -43,8 +45,8 @@ value_transform_memcpy_data0 (const GValue *src_value,
|
|||||||
value_transform_##func_name (const GValue *src_value, \
|
value_transform_##func_name (const GValue *src_value, \
|
||||||
GValue *dest_value) \
|
GValue *dest_value) \
|
||||||
{ \
|
{ \
|
||||||
ctype c_value = src_value->data[0].##from_member; \
|
ctype c_value = src_value->data[0].from_member; \
|
||||||
dest_value->data[0].##to_member = c_value; \
|
dest_value->data[0].to_member = c_value; \
|
||||||
}
|
}
|
||||||
DEFINE_CAST (int_s8, v_int, gint8, v_int);
|
DEFINE_CAST (int_s8, v_int, gint8, v_int);
|
||||||
DEFINE_CAST (int_u8, v_int, guint8, v_uint);
|
DEFINE_CAST (int_u8, v_int, guint8, v_uint);
|
||||||
@@ -97,7 +99,7 @@ DEFINE_CAST (double_float, v_double, gfloat, v_float);
|
|||||||
value_transform_##func_name (const GValue *src_value, \
|
value_transform_##func_name (const GValue *src_value, \
|
||||||
GValue *dest_value) \
|
GValue *dest_value) \
|
||||||
{ \
|
{ \
|
||||||
dest_value->data[0].v_int = src_value->data[0].##from_member != 0; \
|
dest_value->data[0].v_int = src_value->data[0].from_member != 0; \
|
||||||
}
|
}
|
||||||
DEFINE_BOOL_CHECK (int_bool, v_int);
|
DEFINE_BOOL_CHECK (int_bool, v_int);
|
||||||
DEFINE_BOOL_CHECK (uint_bool, v_uint);
|
DEFINE_BOOL_CHECK (uint_bool, v_uint);
|
||||||
@@ -113,7 +115,7 @@ DEFINE_BOOL_CHECK (ulong_bool, v_uint);
|
|||||||
GValue *dest_value) \
|
GValue *dest_value) \
|
||||||
{ \
|
{ \
|
||||||
dest_value->data[0].v_pointer = \
|
dest_value->data[0].v_pointer = \
|
||||||
g_strdup_printf ((format), src_value->data[0].##from_member); \
|
g_strdup_printf ((format), src_value->data[0].from_member); \
|
||||||
}
|
}
|
||||||
DEFINE_SPRINTF (int_string, v_int, "%d");
|
DEFINE_SPRINTF (int_string, v_int, "%d");
|
||||||
DEFINE_SPRINTF (uint_string, v_uint, "%u");
|
DEFINE_SPRINTF (uint_string, v_uint, "%u");
|
||||||
|
Reference in New Issue
Block a user