#include "girepository.h"
#include "girffi.h"
+#include "config.h"
/**
* g_field_info_get_field:
result = TRUE;
break;
case GI_TYPE_TAG_TIME_T:
- value->v_long = G_STRUCT_MEMBER(time_t, mem, offset);
+#if SIZEOF_TIME_T == 4
+ value->v_int32 = G_STRUCT_MEMBER(time_t, mem, offset);
+#elif SIZEOF_TIME_T == 8
+ value->v_int64 = G_STRUCT_MEMBER(time_t, mem, offset);
+#else
+# error "Unexpected size for time_t: not 4 or 8"
+#endif
result = TRUE;
break;
case GI_TYPE_TAG_UTF8:
result = TRUE;
break;
case GI_TYPE_TAG_TIME_T:
- G_STRUCT_MEMBER(time_t, mem, offset) = value->v_long;
+#if SIZEOF_TIME_T == 4
+ G_STRUCT_MEMBER(time_t, mem, offset) = value->v_int32;
+#elif SIZEOF_TIME_T == 8
+ G_STRUCT_MEMBER(time_t, mem, offset) = value->v_int64;
+#else
+# error "Unexpected size for time_t: not 4 or 8"
+#endif
result = TRUE;
break;
case GI_TYPE_TAG_UTF8:
g_args[i].v_uint32 = *(guint32 *) args[i];
break;
case GI_TYPE_TAG_LONG:
+ g_args[i].v_long = *(glong *) args[i];
+ break;
case GI_TYPE_TAG_INT64:
- g_args[i].v_int64 = *(glong *) args[i];
+ g_args[i].v_int64 = *(gint64 *) args[i];
break;
case GI_TYPE_TAG_ULONG:
+ g_args[i].v_ulong = *(gulong *) args[i];
+ break;
case GI_TYPE_TAG_UINT64:
- g_args[i].v_uint64 = *(glong *) args[i];
+ g_args[i].v_uint64 = *(guint64 *) args[i];
break;
case GI_TYPE_TAG_INT:
+ g_args[i].v_int = *(gint *) args[i];
+ break;
case GI_TYPE_TAG_SSIZE:
+ g_args[i].v_ssize = *(gssize *) args[i];
+ break;
case GI_TYPE_TAG_SIZE:
- g_args[i].v_int32 = *(gint *) args[i];
+ g_args[i].v_size = *(gsize *) args[i];
break;
case GI_TYPE_TAG_UINT:
- g_args[i].v_uint32 = *(guint *) args[i];
+ g_args[i].v_uint = *(guint *) args[i];
break;
case GI_TYPE_TAG_FLOAT:
g_args[i].v_float = *(gfloat *) args[i];