Commit aa6dc30a authored by Dan Hor谩k's avatar Dan Hor谩k Committed by Christoph Reiter

revert closure typecasts from commit 25a5b066 See #247

parent 708160a7
Pipeline #30628 passed with stages
in 5 minutes and 39 seconds
......@@ -52,31 +52,31 @@ _pygi_closure_assign_pyobj_to_retval (gpointer retval,
switch (arg_cache->type_tag) {
case GI_TYPE_TAG_BOOLEAN:
*((gboolean *) retval) = arg->v_boolean;
*((ffi_sarg *) retval) = arg->v_boolean;
break;
case GI_TYPE_TAG_INT8:
*((gint8 *) retval) = arg->v_int8;
*((ffi_sarg *) retval) = arg->v_int8;
break;
case GI_TYPE_TAG_UINT8:
*((guint8 *) retval) = arg->v_uint8;
*((ffi_arg *) retval) = arg->v_uint8;
break;
case GI_TYPE_TAG_INT16:
*((gint16 *) retval) = arg->v_int16;
*((ffi_sarg *) retval) = arg->v_int16;
break;
case GI_TYPE_TAG_UINT16:
*((guint16 *) retval) = arg->v_uint16;
*((ffi_arg *) retval) = arg->v_uint16;
break;
case GI_TYPE_TAG_INT32:
*((gint32 *) retval) = arg->v_int32;
*((ffi_sarg *) retval) = arg->v_int32;
break;
case GI_TYPE_TAG_UINT32:
*((guint32 *) retval) = arg->v_uint32;
*((ffi_arg *) retval) = arg->v_uint32;
break;
case GI_TYPE_TAG_INT64:
*((gint64 *) retval) = arg->v_int64;
*((ffi_sarg *) retval) = arg->v_int64;
break;
case GI_TYPE_TAG_UINT64:
*((guint64 *) retval) = arg->v_uint64;
*((ffi_arg *) retval) = arg->v_uint64;
break;
case GI_TYPE_TAG_FLOAT:
*((gfloat *) retval) = arg->v_float;
......@@ -85,10 +85,10 @@ _pygi_closure_assign_pyobj_to_retval (gpointer retval,
*((gdouble *) retval) = arg->v_double;
break;
case GI_TYPE_TAG_GTYPE:
*((gsize *) retval) = arg->v_size;
*((ffi_arg *) retval) = arg->v_size;
break;
case GI_TYPE_TAG_UNICHAR:
*((guint32 *) retval) = arg->v_uint32;
*((ffi_arg *) retval) = arg->v_uint32;
break;
case GI_TYPE_TAG_INTERFACE:
{
......@@ -98,20 +98,20 @@ _pygi_closure_assign_pyobj_to_retval (gpointer retval,
switch (g_base_info_get_type (interface_info)) {
case GI_INFO_TYPE_ENUM:
*(gint *) retval = arg->v_int;
*(ffi_sarg *) retval = arg->v_int;
break;
case GI_INFO_TYPE_FLAGS:
*(guint *) retval = arg->v_uint;
*(ffi_arg *) retval = arg->v_uint;
break;
default:
*(gpointer *) retval = arg->v_pointer;
*(ffi_arg *) retval = arg->v_pointer;
break;
}
break;
}
default:
*(gpointer *) retval = arg->v_pointer;
*(ffi_arg *) retval = arg->v_pointer;
break;
}
}
......
......@@ -90,7 +90,6 @@ main_c_args = [
'-Wundef',
'-Wunused-but-set-variable',
'-Wwrite-strings',
'-Wconversion',
]
main_c_args += [
......@@ -100,6 +99,7 @@ main_c_args += [
'-Wno-discarded-qualifiers',
'-Wno-sign-conversion',
'-Wno-cast-function-type',
'-Wno-int-conversion',
]
main_c_args += [
......
......@@ -914,7 +914,6 @@ def add_ext_compiler_flags(ext, compiler, _cache={}):
"-Wundef",
"-Wunused-but-set-variable",
"-Wwrite-strings",
"-Wconversion",
]
if sys.version_info[:2] != (3, 4):
......@@ -929,6 +928,7 @@ def add_ext_compiler_flags(ext, compiler, _cache={}):
"-Wno-discarded-qualifiers",
"-Wno-sign-conversion",
"-Wno-cast-function-type",
"-Wno-int-conversion",
]
# silence clang for unused gcc CFLAGS added by Debian
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment