mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-09 12:09:40 +02:00
girrepository: Use void* instead of gpointer
This commit is contained in:
parent
44e4555765
commit
eda4bfcf95
@ -64,7 +64,7 @@ value_base_info_copy_value (const GValue *src,
|
|||||||
dst->data[0].v_pointer = NULL;
|
dst->data[0].v_pointer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gpointer
|
static void *
|
||||||
value_base_info_peek_pointer (const GValue *value)
|
value_base_info_peek_pointer (const GValue *value)
|
||||||
{
|
{
|
||||||
return value->data[0].v_pointer;
|
return value->data[0].v_pointer;
|
||||||
|
@ -44,10 +44,8 @@ G_BEGIN_DECLS
|
|||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
gpointer data;
|
void *data;
|
||||||
gpointer data2;
|
void *_dummy[4];
|
||||||
gpointer data3;
|
|
||||||
gpointer data4;
|
|
||||||
} GIAttributeIter;
|
} GIAttributeIter;
|
||||||
|
|
||||||
#define GI_TYPE_BASE_INFO (gi_base_info_get_type ())
|
#define GI_TYPE_BASE_INFO (gi_base_info_get_type ())
|
||||||
|
@ -556,12 +556,12 @@ gi_type_tag_extract_ffi_return_value (GITypeTag return_tag,
|
|||||||
arg->v_int32 = (gint32) ffi_value->v_long;
|
arg->v_int32 = (gint32) ffi_value->v_long;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
arg->v_pointer = (gpointer) ffi_value->v_pointer;
|
arg->v_pointer = (void *) ffi_value->v_pointer;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
arg->v_pointer = (gpointer) ffi_value->v_pointer;
|
arg->v_pointer = (void *) ffi_value->v_pointer;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -629,7 +629,7 @@ gi_type_info_extract_ffi_return_value (GITypeInfo *return_info,
|
|||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gi_callable_info_invoke (GICallableInfo *info,
|
gi_callable_info_invoke (GICallableInfo *info,
|
||||||
gpointer function,
|
void *function,
|
||||||
const GIArgument *in_args,
|
const GIArgument *in_args,
|
||||||
gsize n_in_args,
|
gsize n_in_args,
|
||||||
GIArgument *out_args,
|
GIArgument *out_args,
|
||||||
@ -645,12 +645,12 @@ gi_callable_info_invoke (GICallableInfo *info,
|
|||||||
GITypeTag rtag;
|
GITypeTag rtag;
|
||||||
GIArgInfo *ainfo;
|
GIArgInfo *ainfo;
|
||||||
gsize n_args, n_invoke_args, in_pos, out_pos, i;
|
gsize n_args, n_invoke_args, in_pos, out_pos, i;
|
||||||
gpointer *args;
|
void **args;
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
GError *local_error = NULL;
|
GError *local_error = NULL;
|
||||||
gpointer error_address = &local_error;
|
void *error_address = &local_error;
|
||||||
GIFFIReturnValue ffi_return_value;
|
GIFFIReturnValue ffi_return_value;
|
||||||
gpointer return_value_p; /* Will point inside the union return_value */
|
void *return_value_p; /* Will point inside the union return_value */
|
||||||
gboolean is_method, throws;
|
gboolean is_method, throws;
|
||||||
|
|
||||||
rinfo = gi_callable_info_get_return_type ((GICallableInfo *)info);
|
rinfo = gi_callable_info_get_return_type ((GICallableInfo *)info);
|
||||||
@ -684,12 +684,12 @@ gi_callable_info_invoke (GICallableInfo *info,
|
|||||||
n_invoke_args ++;
|
n_invoke_args ++;
|
||||||
|
|
||||||
atypes = g_alloca (sizeof (ffi_type*) * n_invoke_args);
|
atypes = g_alloca (sizeof (ffi_type*) * n_invoke_args);
|
||||||
args = g_alloca (sizeof (gpointer) * n_invoke_args);
|
args = g_alloca (sizeof (void *) * n_invoke_args);
|
||||||
|
|
||||||
if (is_method)
|
if (is_method)
|
||||||
{
|
{
|
||||||
atypes[0] = &ffi_type_pointer;
|
atypes[0] = &ffi_type_pointer;
|
||||||
args[0] = (gpointer) &in_args[0];
|
args[0] = (void *) &in_args[0];
|
||||||
}
|
}
|
||||||
for (i = 0; i < n_args; i++)
|
for (i = 0; i < n_args; i++)
|
||||||
{
|
{
|
||||||
@ -712,7 +712,7 @@ gi_callable_info_invoke (GICallableInfo *info,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
args[i+offset] = (gpointer)&in_args[in_pos];
|
args[i+offset] = (void *)&in_args[in_pos];
|
||||||
in_pos++;
|
in_pos++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -729,7 +729,7 @@ gi_callable_info_invoke (GICallableInfo *info,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
args[i+offset] = (gpointer)&out_args[out_pos];
|
args[i+offset] = (void *)&out_args[out_pos];
|
||||||
out_pos++;
|
out_pos++;
|
||||||
break;
|
break;
|
||||||
case GI_DIRECTION_INOUT:
|
case GI_DIRECTION_INOUT:
|
||||||
@ -754,7 +754,7 @@ gi_callable_info_invoke (GICallableInfo *info,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
args[i+offset] = (gpointer)&in_args[in_pos];
|
args[i+offset] = (void *)&in_args[in_pos];
|
||||||
in_pos++;
|
in_pos++;
|
||||||
out_pos++;
|
out_pos++;
|
||||||
break;
|
break;
|
||||||
|
@ -93,7 +93,7 @@ void gi_callable_info_load_arg (GICallableInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_callable_info_invoke (GICallableInfo *info,
|
gboolean gi_callable_info_invoke (GICallableInfo *info,
|
||||||
gpointer function,
|
void *function,
|
||||||
const GIArgument *in_args,
|
const GIArgument *in_args,
|
||||||
gsize n_in_args,
|
gsize n_in_args,
|
||||||
GIArgument *out_args,
|
GIArgument *out_args,
|
||||||
|
@ -187,7 +187,7 @@ gi_field_info_get_type_info (GIFieldInfo *info)
|
|||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gi_field_info_get_field (GIFieldInfo *field_info,
|
gi_field_info_get_field (GIFieldInfo *field_info,
|
||||||
gpointer mem,
|
void *mem,
|
||||||
GIArgument *value)
|
GIArgument *value)
|
||||||
{
|
{
|
||||||
int offset;
|
int offset;
|
||||||
@ -205,7 +205,7 @@ gi_field_info_get_field (GIFieldInfo *field_info,
|
|||||||
|
|
||||||
if (gi_type_info_is_pointer (type_info))
|
if (gi_type_info_is_pointer (type_info))
|
||||||
{
|
{
|
||||||
value->v_pointer = G_STRUCT_MEMBER (gpointer, mem, offset);
|
value->v_pointer = G_STRUCT_MEMBER (void *, mem, offset);
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -383,7 +383,7 @@ gi_field_info_get_field (GIFieldInfo *field_info,
|
|||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gi_field_info_set_field (GIFieldInfo *field_info,
|
gi_field_info_set_field (GIFieldInfo *field_info,
|
||||||
gpointer mem,
|
void *mem,
|
||||||
const GIArgument *value)
|
const GIArgument *value)
|
||||||
{
|
{
|
||||||
int offset;
|
int offset;
|
||||||
@ -548,7 +548,7 @@ gi_field_info_set_field (GIFieldInfo *field_info,
|
|||||||
{
|
{
|
||||||
case GI_INFO_TYPE_OBJECT:
|
case GI_INFO_TYPE_OBJECT:
|
||||||
case GI_INFO_TYPE_INTERFACE:
|
case GI_INFO_TYPE_INTERFACE:
|
||||||
G_STRUCT_MEMBER (gpointer, mem, offset) = (gpointer)value->v_pointer;
|
G_STRUCT_MEMBER (void *, mem, offset) = (void *)value->v_pointer;
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -58,12 +58,12 @@ GITypeInfo * gi_field_info_get_type_info (GIFieldInfo *info);
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_field_info_get_field (GIFieldInfo *field_info,
|
gboolean gi_field_info_get_field (GIFieldInfo *field_info,
|
||||||
gpointer mem,
|
void *mem,
|
||||||
GIArgument *value);
|
GIArgument *value);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_field_info_set_field (GIFieldInfo *field_info,
|
gboolean gi_field_info_set_field (GIFieldInfo *field_info,
|
||||||
gpointer mem,
|
void *mem,
|
||||||
const GIArgument *value);
|
const GIArgument *value);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -273,7 +273,7 @@ gi_function_info_invoke (GIFunctionInfo *info,
|
|||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *symbol;
|
const gchar *symbol;
|
||||||
gpointer func;
|
void *func;
|
||||||
|
|
||||||
symbol = gi_function_info_get_symbol (info);
|
symbol = gi_function_info_get_symbol (info);
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
static ffi_type *
|
static ffi_type *
|
||||||
value_to_ffi_type (const GValue *gvalue, gpointer *value)
|
value_to_ffi_type (const GValue *gvalue, void **value)
|
||||||
{
|
{
|
||||||
ffi_type *rettype = NULL;
|
ffi_type *rettype = NULL;
|
||||||
GType type = g_type_fundamental (G_VALUE_TYPE (gvalue));
|
GType type = g_type_fundamental (G_VALUE_TYPE (gvalue));
|
||||||
@ -56,12 +56,12 @@ value_to_ffi_type (const GValue *gvalue, gpointer *value)
|
|||||||
case G_TYPE_CHAR:
|
case G_TYPE_CHAR:
|
||||||
case G_TYPE_INT:
|
case G_TYPE_INT:
|
||||||
rettype = &ffi_type_sint;
|
rettype = &ffi_type_sint;
|
||||||
*value = (gpointer)&(gvalue->data[0].v_int);
|
*value = (void *) &(gvalue->data[0].v_int);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_UCHAR:
|
case G_TYPE_UCHAR:
|
||||||
case G_TYPE_UINT:
|
case G_TYPE_UINT:
|
||||||
rettype = &ffi_type_uint;
|
rettype = &ffi_type_uint;
|
||||||
*value = (gpointer)&(gvalue->data[0].v_uint);
|
*value = (void *) &(gvalue->data[0].v_uint);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_STRING:
|
case G_TYPE_STRING:
|
||||||
case G_TYPE_OBJECT:
|
case G_TYPE_OBJECT:
|
||||||
@ -69,31 +69,31 @@ value_to_ffi_type (const GValue *gvalue, gpointer *value)
|
|||||||
case G_TYPE_POINTER:
|
case G_TYPE_POINTER:
|
||||||
case G_TYPE_PARAM:
|
case G_TYPE_PARAM:
|
||||||
rettype = &ffi_type_pointer;
|
rettype = &ffi_type_pointer;
|
||||||
*value = (gpointer)&(gvalue->data[0].v_pointer);
|
*value = (void *) &(gvalue->data[0].v_pointer);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_FLOAT:
|
case G_TYPE_FLOAT:
|
||||||
rettype = &ffi_type_float;
|
rettype = &ffi_type_float;
|
||||||
*value = (gpointer)&(gvalue->data[0].v_float);
|
*value = (void *) &(gvalue->data[0].v_float);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_DOUBLE:
|
case G_TYPE_DOUBLE:
|
||||||
rettype = &ffi_type_double;
|
rettype = &ffi_type_double;
|
||||||
*value = (gpointer)&(gvalue->data[0].v_double);
|
*value = (void *) &(gvalue->data[0].v_double);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_LONG:
|
case G_TYPE_LONG:
|
||||||
rettype = &ffi_type_slong;
|
rettype = &ffi_type_slong;
|
||||||
*value = (gpointer)&(gvalue->data[0].v_long);
|
*value = (void *) &(gvalue->data[0].v_long);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_ULONG:
|
case G_TYPE_ULONG:
|
||||||
rettype = &ffi_type_ulong;
|
rettype = &ffi_type_ulong;
|
||||||
*value = (gpointer)&(gvalue->data[0].v_ulong);
|
*value = (void *) &(gvalue->data[0].v_ulong);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_INT64:
|
case G_TYPE_INT64:
|
||||||
rettype = &ffi_type_sint64;
|
rettype = &ffi_type_sint64;
|
||||||
*value = (gpointer)&(gvalue->data[0].v_int64);
|
*value = (void *) &(gvalue->data[0].v_int64);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_UINT64:
|
case G_TYPE_UINT64:
|
||||||
rettype = &ffi_type_uint64;
|
rettype = &ffi_type_uint64;
|
||||||
*value = (gpointer)&(gvalue->data[0].v_uint64);
|
*value = (void *) &(gvalue->data[0].v_uint64);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rettype = &ffi_type_pointer;
|
rettype = &ffi_type_pointer;
|
||||||
@ -122,13 +122,13 @@ value_to_ffi_type (const GValue *gvalue, gpointer *value)
|
|||||||
static ffi_type *
|
static ffi_type *
|
||||||
g_value_to_ffi_return_type (const GValue *gvalue,
|
g_value_to_ffi_return_type (const GValue *gvalue,
|
||||||
const GIArgument *ffi_value,
|
const GIArgument *ffi_value,
|
||||||
gpointer *value)
|
void **value)
|
||||||
{
|
{
|
||||||
ffi_type *rettype = NULL;
|
ffi_type *rettype = NULL;
|
||||||
GType type = g_type_fundamental (G_VALUE_TYPE (gvalue));
|
GType type = g_type_fundamental (G_VALUE_TYPE (gvalue));
|
||||||
g_assert (type != G_TYPE_INVALID);
|
g_assert (type != G_TYPE_INVALID);
|
||||||
|
|
||||||
*value = (gpointer)&(ffi_value->v_long);
|
*value = (void *) &(ffi_value->v_long);
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case G_TYPE_CHAR:
|
case G_TYPE_CHAR:
|
||||||
@ -153,11 +153,11 @@ g_value_to_ffi_return_type (const GValue *gvalue,
|
|||||||
break;
|
break;
|
||||||
case G_TYPE_FLOAT:
|
case G_TYPE_FLOAT:
|
||||||
rettype = &ffi_type_float;
|
rettype = &ffi_type_float;
|
||||||
*value = (gpointer)&(ffi_value->v_float);
|
*value = (void *) &(ffi_value->v_float);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_DOUBLE:
|
case G_TYPE_DOUBLE:
|
||||||
rettype = &ffi_type_double;
|
rettype = &ffi_type_double;
|
||||||
*value = (gpointer)&(ffi_value->v_double);
|
*value = (void *) &(ffi_value->v_double);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_LONG:
|
case G_TYPE_LONG:
|
||||||
rettype = &ffi_type_slong;
|
rettype = &ffi_type_slong;
|
||||||
@ -167,11 +167,11 @@ g_value_to_ffi_return_type (const GValue *gvalue,
|
|||||||
break;
|
break;
|
||||||
case G_TYPE_INT64:
|
case G_TYPE_INT64:
|
||||||
rettype = &ffi_type_sint64;
|
rettype = &ffi_type_sint64;
|
||||||
*value = (gpointer)&(ffi_value->v_int64);
|
*value = (void *) &(ffi_value->v_int64);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_UINT64:
|
case G_TYPE_UINT64:
|
||||||
rettype = &ffi_type_uint64;
|
rettype = &ffi_type_uint64;
|
||||||
*value = (gpointer)&(ffi_value->v_uint64);
|
*value = (void *) &(ffi_value->v_uint64);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rettype = &ffi_type_pointer;
|
rettype = &ffi_type_pointer;
|
||||||
@ -272,8 +272,8 @@ gi_cclosure_marshal_generic (GClosure *closure,
|
|||||||
GValue *return_gvalue,
|
GValue *return_gvalue,
|
||||||
guint n_param_values,
|
guint n_param_values,
|
||||||
const GValue *param_values,
|
const GValue *param_values,
|
||||||
gpointer invocation_hint,
|
void *invocation_hint,
|
||||||
gpointer marshal_data)
|
void *marshal_data)
|
||||||
{
|
{
|
||||||
GIArgument return_ffi_value = { 0, };
|
GIArgument return_ffi_value = { 0, };
|
||||||
ffi_type *rtype;
|
ffi_type *rtype;
|
||||||
@ -298,7 +298,7 @@ gi_cclosure_marshal_generic (GClosure *closure,
|
|||||||
|
|
||||||
n_args = n_param_values + 1;
|
n_args = n_param_values + 1;
|
||||||
atypes = g_alloca (sizeof (ffi_type *) * n_args);
|
atypes = g_alloca (sizeof (ffi_type *) * n_args);
|
||||||
args = g_alloca (sizeof (gpointer) * n_args);
|
args = g_alloca (sizeof (void *) * n_args);
|
||||||
|
|
||||||
if (n_param_values > 0)
|
if (n_param_values > 0)
|
||||||
{
|
{
|
||||||
|
@ -925,7 +925,7 @@ _get_func(GIObjectInfo *info,
|
|||||||
const char* symbol;
|
const char* symbol;
|
||||||
GSList *parents = NULL, *l;
|
GSList *parents = NULL, *l;
|
||||||
GIObjectInfo *parent_info;
|
GIObjectInfo *parent_info;
|
||||||
gpointer func = NULL;
|
void *func = NULL;
|
||||||
|
|
||||||
parent_info = (GIObjectInfo *) gi_base_info_ref ((GIBaseInfo *) info);
|
parent_info = (GIObjectInfo *) gi_base_info_ref ((GIBaseInfo *) info);
|
||||||
while (parent_info != NULL)
|
while (parent_info != NULL)
|
||||||
|
@ -1083,7 +1083,7 @@ gi_repository_get_object_gtype_interfaces (GIRepository *repository,
|
|||||||
repository = get_repository (repository);
|
repository = get_repository (repository);
|
||||||
|
|
||||||
cache = g_hash_table_lookup (repository->priv->interfaces_for_gtype,
|
cache = g_hash_table_lookup (repository->priv->interfaces_for_gtype,
|
||||||
(gpointer) gtype);
|
(void *) gtype);
|
||||||
if (cache == NULL)
|
if (cache == NULL)
|
||||||
{
|
{
|
||||||
GType *interfaces;
|
GType *interfaces;
|
||||||
|
@ -251,7 +251,7 @@ void gi_cclosure_marshal_generic (GClosure *closure,
|
|||||||
GValue *return_gvalue,
|
GValue *return_gvalue,
|
||||||
guint n_param_values,
|
guint n_param_values,
|
||||||
const GValue *param_values,
|
const GValue *param_values,
|
||||||
gpointer invocation_hint,
|
void *invocation_hint,
|
||||||
gpointer marshal_data);
|
void *marshal_data);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -276,7 +276,7 @@ gi_function_info_prep_invoker (GIFunctionInfo *info,
|
|||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const char *symbol;
|
const char *symbol;
|
||||||
gpointer addr;
|
void *addr;
|
||||||
|
|
||||||
g_return_val_if_fail (info != NULL, FALSE);
|
g_return_val_if_fail (info != NULL, FALSE);
|
||||||
g_return_val_if_fail (invoker != NULL, FALSE);
|
g_return_val_if_fail (invoker != NULL, FALSE);
|
||||||
@ -316,7 +316,7 @@ gi_function_info_prep_invoker (GIFunctionInfo *info,
|
|||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gi_function_invoker_new_for_address (gpointer addr,
|
gi_function_invoker_new_for_address (void *addr,
|
||||||
GICallableInfo *info,
|
GICallableInfo *info,
|
||||||
GIFunctionInvoker *invoker,
|
GIFunctionInvoker *invoker,
|
||||||
GError **error)
|
GError **error)
|
||||||
@ -355,8 +355,8 @@ gi_function_invoker_destroy (GIFunctionInvoker *invoker)
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ffi_closure ffi_closure;
|
ffi_closure ffi_closure;
|
||||||
gpointer writable_self;
|
void *writable_self;
|
||||||
gpointer native_address;
|
void *native_address;
|
||||||
} GIClosureWrapper;
|
} GIClosureWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -377,9 +377,9 @@ ffi_closure *
|
|||||||
gi_callable_info_create_closure (GICallableInfo *callable_info,
|
gi_callable_info_create_closure (GICallableInfo *callable_info,
|
||||||
ffi_cif *cif,
|
ffi_cif *cif,
|
||||||
GIFFIClosureCallback callback,
|
GIFFIClosureCallback callback,
|
||||||
gpointer user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
gpointer exec_ptr;
|
void *exec_ptr;
|
||||||
size_t n_args;
|
size_t n_args;
|
||||||
ffi_type **atypes;
|
ffi_type **atypes;
|
||||||
GIClosureWrapper *closure;
|
GIClosureWrapper *closure;
|
||||||
@ -432,7 +432,7 @@ gi_callable_info_create_closure (GICallableInfo *callable_info,
|
|||||||
* Returns: (transfer none): native address
|
* Returns: (transfer none): native address
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gpointer *
|
void **
|
||||||
gi_callable_info_get_closure_native_address (GICallableInfo *callable_info,
|
gi_callable_info_get_closure_native_address (GICallableInfo *callable_info,
|
||||||
ffi_closure *closure)
|
ffi_closure *closure)
|
||||||
{
|
{
|
||||||
|
@ -65,9 +65,9 @@ typedef void (*GIFFIClosureCallback) (ffi_cif *cif,
|
|||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ffi_cif cif;
|
ffi_cif cif;
|
||||||
gpointer native_address;
|
void *native_address;
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
gpointer padding[3];
|
void *padding[3];
|
||||||
} GIFunctionInvoker;
|
} GIFunctionInvoker;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -102,7 +102,7 @@ gboolean gi_function_info_prep_invoker (GIFunctionInfo *info,
|
|||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_function_invoker_new_for_address (gpointer addr,
|
gboolean gi_function_invoker_new_for_address (void *addr,
|
||||||
GICallableInfo *info,
|
GICallableInfo *info,
|
||||||
GIFunctionInvoker *invoker,
|
GIFunctionInvoker *invoker,
|
||||||
GError **error);
|
GError **error);
|
||||||
@ -115,10 +115,10 @@ GI_AVAILABLE_IN_ALL
|
|||||||
ffi_closure * gi_callable_info_create_closure (GICallableInfo *callable_info,
|
ffi_closure * gi_callable_info_create_closure (GICallableInfo *callable_info,
|
||||||
ffi_cif *cif,
|
ffi_cif *cif,
|
||||||
GIFFIClosureCallback callback,
|
GIFFIClosureCallback callback,
|
||||||
gpointer user_data);
|
void *user_data);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gpointer * gi_callable_info_get_closure_native_address (GICallableInfo *callable_info,
|
void ** gi_callable_info_get_closure_native_address (GICallableInfo *callable_info,
|
||||||
ffi_closure *closure);
|
ffi_closure *closure);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
|
@ -235,9 +235,9 @@ write_attributes (GIIrModule *module,
|
|||||||
return wdata.count;
|
return wdata.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static int
|
||||||
node_cmp_offset_func (gconstpointer a,
|
node_cmp_offset_func (const void *a,
|
||||||
gconstpointer b)
|
const void *b)
|
||||||
{
|
{
|
||||||
const GIIrNode *na = a;
|
const GIIrNode *na = a;
|
||||||
const GIIrNode *nb = b;
|
const GIIrNode *nb = b;
|
||||||
|
@ -2417,8 +2417,8 @@ gi_ir_write_string (const gchar *str,
|
|||||||
guchar *data,
|
guchar *data,
|
||||||
guint32 *offset)
|
guint32 *offset)
|
||||||
{
|
{
|
||||||
gpointer value;
|
|
||||||
guint32 start;
|
guint32 start;
|
||||||
|
void *value;
|
||||||
|
|
||||||
string_count += 1;
|
string_count += 1;
|
||||||
string_size += strlen (str);
|
string_size += strlen (str);
|
||||||
@ -2431,7 +2431,7 @@ gi_ir_write_string (const gchar *str,
|
|||||||
unique_string_count += 1;
|
unique_string_count += 1;
|
||||||
unique_string_size += strlen (str);
|
unique_string_size += strlen (str);
|
||||||
|
|
||||||
g_hash_table_insert (strings, (gpointer)str, GUINT_TO_POINTER (*offset));
|
g_hash_table_insert (strings, (void *)str, GUINT_TO_POINTER (*offset));
|
||||||
|
|
||||||
start = *offset;
|
start = *offset;
|
||||||
*offset = ALIGN_VALUE (start + strlen (str) + 1, 4);
|
*offset = ALIGN_VALUE (start + strlen (str) + 1, 4);
|
||||||
|
@ -136,20 +136,20 @@ static void start_element_handler (GMarkupParseContext *context,
|
|||||||
const gchar *element_name,
|
const gchar *element_name,
|
||||||
const gchar **attribute_names,
|
const gchar **attribute_names,
|
||||||
const gchar **attribute_values,
|
const gchar **attribute_values,
|
||||||
gpointer user_data,
|
void *user_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
static void end_element_handler (GMarkupParseContext *context,
|
static void end_element_handler (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const gchar *element_name,
|
||||||
gpointer user_data,
|
void *user_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
static void text_handler (GMarkupParseContext *context,
|
static void text_handler (GMarkupParseContext *context,
|
||||||
const gchar *text,
|
const gchar *text,
|
||||||
gsize text_len,
|
gsize text_len,
|
||||||
gpointer user_data,
|
void *user_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
static void cleanup (GMarkupParseContext *context,
|
static void cleanup (GMarkupParseContext *context,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data);
|
void *user_data);
|
||||||
static void state_switch (ParseContext *ctx, ParseState newstate);
|
static void state_switch (ParseContext *ctx, ParseState newstate);
|
||||||
|
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ firstpass_start_element_handler (GMarkupParseContext *context,
|
|||||||
const gchar *element_name,
|
const gchar *element_name,
|
||||||
const gchar **attribute_names,
|
const gchar **attribute_names,
|
||||||
const gchar **attribute_values,
|
const gchar **attribute_values,
|
||||||
gpointer user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
ParseContext *ctx = user_data;
|
ParseContext *ctx = user_data;
|
||||||
@ -267,7 +267,7 @@ firstpass_start_element_handler (GMarkupParseContext *context,
|
|||||||
static void
|
static void
|
||||||
firstpass_end_element_handler (GMarkupParseContext *context,
|
firstpass_end_element_handler (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const gchar *element_name,
|
||||||
gpointer user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
ParseContext *ctx = user_data;
|
ParseContext *ctx = user_data;
|
||||||
@ -678,8 +678,8 @@ parse_type_internal (GIIrModule *module,
|
|||||||
static const char *
|
static const char *
|
||||||
resolve_aliases (ParseContext *ctx, const gchar *type)
|
resolve_aliases (ParseContext *ctx, const gchar *type)
|
||||||
{
|
{
|
||||||
gpointer orig;
|
void *orig;
|
||||||
gpointer value;
|
void *value;
|
||||||
GSList *seen_values = NULL;
|
GSList *seen_values = NULL;
|
||||||
const gchar *lookup;
|
const gchar *lookup;
|
||||||
gchar *prefixed;
|
gchar *prefixed;
|
||||||
@ -2885,7 +2885,7 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
const gchar *element_name,
|
const gchar *element_name,
|
||||||
const gchar **attribute_names,
|
const gchar **attribute_names,
|
||||||
const gchar **attribute_values,
|
const gchar **attribute_values,
|
||||||
gpointer user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
ParseContext *ctx = user_data;
|
ParseContext *ctx = user_data;
|
||||||
@ -3346,7 +3346,7 @@ require_end_element (GMarkupParseContext *context,
|
|||||||
static void
|
static void
|
||||||
end_element_handler (GMarkupParseContext *context,
|
end_element_handler (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const gchar *element_name,
|
||||||
gpointer user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
ParseContext *ctx = user_data;
|
ParseContext *ctx = user_data;
|
||||||
@ -3648,7 +3648,7 @@ static void
|
|||||||
text_handler (GMarkupParseContext *context,
|
text_handler (GMarkupParseContext *context,
|
||||||
const gchar *text,
|
const gchar *text,
|
||||||
gsize text_len,
|
gsize text_len,
|
||||||
gpointer user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
/* FIXME warn about non-whitespace text */
|
/* FIXME warn about non-whitespace text */
|
||||||
@ -3657,7 +3657,7 @@ text_handler (GMarkupParseContext *context,
|
|||||||
static void
|
static void
|
||||||
cleanup (GMarkupParseContext *context,
|
cleanup (GMarkupParseContext *context,
|
||||||
GError *error,
|
GError *error,
|
||||||
gpointer user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
ParseContext *ctx = user_data;
|
ParseContext *ctx = user_data;
|
||||||
GList *m;
|
GList *m;
|
||||||
|
@ -426,7 +426,7 @@ gi_type_info_get_storage_type (GITypeInfo *info)
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gi_type_tag_argument_from_hash_pointer (GITypeTag storage_type,
|
gi_type_tag_argument_from_hash_pointer (GITypeTag storage_type,
|
||||||
gpointer hash_pointer,
|
void *hash_pointer,
|
||||||
GIArgument *arg)
|
GIArgument *arg)
|
||||||
{
|
{
|
||||||
switch (storage_type)
|
switch (storage_type)
|
||||||
@ -503,7 +503,7 @@ gi_type_tag_argument_from_hash_pointer (GITypeTag storage_type,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gi_type_info_argument_from_hash_pointer (GITypeInfo *info,
|
gi_type_info_argument_from_hash_pointer (GITypeInfo *info,
|
||||||
gpointer hash_pointer,
|
void *hash_pointer,
|
||||||
GIArgument *arg)
|
GIArgument *arg)
|
||||||
{
|
{
|
||||||
GITypeTag storage_type = gi_type_info_get_storage_type (info);
|
GITypeTag storage_type = gi_type_info_get_storage_type (info);
|
||||||
@ -537,7 +537,7 @@ gi_type_info_argument_from_hash_pointer (GITypeInfo *info,
|
|||||||
* for example
|
* for example
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gpointer
|
void *
|
||||||
gi_type_tag_hash_pointer_from_argument (GITypeTag storage_type,
|
gi_type_tag_hash_pointer_from_argument (GITypeTag storage_type,
|
||||||
GIArgument *arg)
|
GIArgument *arg)
|
||||||
{
|
{
|
||||||
@ -605,7 +605,7 @@ gi_type_tag_hash_pointer_from_argument (GITypeTag storage_type,
|
|||||||
* for example
|
* for example
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gpointer
|
void *
|
||||||
gi_type_info_hash_pointer_from_argument (GITypeInfo *info,
|
gi_type_info_hash_pointer_from_argument (GITypeInfo *info,
|
||||||
GIArgument *arg)
|
GIArgument *arg)
|
||||||
{
|
{
|
||||||
|
@ -112,20 +112,20 @@ GITypeTag gi_type_info_get_storage_type (GITypeInfo *info);
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
void gi_type_info_argument_from_hash_pointer (GITypeInfo *info,
|
void gi_type_info_argument_from_hash_pointer (GITypeInfo *info,
|
||||||
gpointer hash_pointer,
|
void *hash_pointer,
|
||||||
GIArgument *arg);
|
GIArgument *arg);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gpointer gi_type_info_hash_pointer_from_argument (GITypeInfo *info,
|
void * gi_type_info_hash_pointer_from_argument (GITypeInfo *info,
|
||||||
GIArgument *arg);
|
GIArgument *arg);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
void gi_type_tag_argument_from_hash_pointer (GITypeTag storage_type,
|
void gi_type_tag_argument_from_hash_pointer (GITypeTag storage_type,
|
||||||
gpointer hash_pointer,
|
void *hash_pointer,
|
||||||
GIArgument *arg);
|
GIArgument *arg);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gpointer gi_type_tag_hash_pointer_from_argument (GITypeTag storage_type,
|
void * gi_type_tag_hash_pointer_from_argument (GITypeTag storage_type,
|
||||||
GIArgument *arg);
|
GIArgument *arg);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -2541,7 +2541,7 @@ gi_typelib_get_namespace (GITypelib *typelib)
|
|||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gi_typelib_symbol (GITypelib *typelib, const char *symbol_name, gpointer *symbol)
|
gi_typelib_symbol (GITypelib *typelib, const char *symbol_name, void **symbol)
|
||||||
{
|
{
|
||||||
GList *l;
|
GList *l;
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ void gi_typelib_free (GITypelib *typelib);
|
|||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_typelib_symbol (GITypelib *typelib,
|
gboolean gi_typelib_symbol (GITypelib *typelib,
|
||||||
const gchar *symbol_name,
|
const gchar *symbol_name,
|
||||||
gpointer *symbol);
|
void **symbol);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_typelib_get_namespace (GITypelib *typelib);
|
const gchar * gi_typelib_get_namespace (GITypelib *typelib);
|
||||||
|
@ -133,7 +133,7 @@ union _GIArgument
|
|||||||
gssize v_ssize;
|
gssize v_ssize;
|
||||||
gsize v_size;
|
gsize v_size;
|
||||||
gchar * v_string;
|
gchar * v_string;
|
||||||
gpointer v_pointer;
|
void *v_pointer;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -217,7 +217,7 @@ gi_vfunc_info_get_invoker (GIVFuncInfo *info)
|
|||||||
* Returns: address to a function
|
* Returns: address to a function
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gpointer
|
void *
|
||||||
gi_vfunc_info_get_address (GIVFuncInfo *vfunc_info,
|
gi_vfunc_info_get_address (GIVFuncInfo *vfunc_info,
|
||||||
GType implementor_gtype,
|
GType implementor_gtype,
|
||||||
GError **error)
|
GError **error)
|
||||||
@ -228,8 +228,8 @@ gi_vfunc_info_get_address (GIVFuncInfo *vfunc_info,
|
|||||||
GIStructInfo *struct_info;
|
GIStructInfo *struct_info;
|
||||||
GIFieldInfo *field_info = NULL;
|
GIFieldInfo *field_info = NULL;
|
||||||
int length, i, offset;
|
int length, i, offset;
|
||||||
gpointer implementor_class, implementor_vtable;
|
void *implementor_class, *implementor_vtable;
|
||||||
gpointer func = NULL;
|
void *func = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (vfunc_info != NULL, NULL);
|
g_return_val_if_fail (vfunc_info != NULL, NULL);
|
||||||
g_return_val_if_fail (GI_IS_VFUNC_INFO (vfunc_info), NULL);
|
g_return_val_if_fail (GI_IS_VFUNC_INFO (vfunc_info), NULL);
|
||||||
@ -288,7 +288,7 @@ gi_vfunc_info_get_address (GIVFuncInfo *vfunc_info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
offset = gi_field_info_get_offset (field_info);
|
offset = gi_field_info_get_offset (field_info);
|
||||||
func = *(gpointer*) G_STRUCT_MEMBER_P (implementor_vtable, offset);
|
func = *(void**) G_STRUCT_MEMBER_P (implementor_vtable, offset);
|
||||||
g_type_class_unref (implementor_class);
|
g_type_class_unref (implementor_class);
|
||||||
gi_base_info_unref ((GIBaseInfo *) field_info);
|
gi_base_info_unref ((GIBaseInfo *) field_info);
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ gi_vfunc_info_invoke (GIVFuncInfo *info,
|
|||||||
GIArgument *return_value,
|
GIArgument *return_value,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
gpointer func;
|
void *func;
|
||||||
GError *local_error = NULL;
|
GError *local_error = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (info != NULL, FALSE);
|
g_return_val_if_fail (info != NULL, FALSE);
|
||||||
|
@ -56,7 +56,7 @@ GI_AVAILABLE_IN_ALL
|
|||||||
GIFunctionInfo * gi_vfunc_info_get_invoker (GIVFuncInfo *info);
|
GIFunctionInfo * gi_vfunc_info_get_invoker (GIVFuncInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gpointer gi_vfunc_info_get_address (GIVFuncInfo *info,
|
void * gi_vfunc_info_get_address (GIVFuncInfo *info,
|
||||||
GType implementor_gtype,
|
GType implementor_gtype,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ gi_typelib_hash_builder_prepare (GITypelibHashBuilder *builder)
|
|||||||
{
|
{
|
||||||
char **strs;
|
char **strs;
|
||||||
GHashTableIter hashiter;
|
GHashTableIter hashiter;
|
||||||
gpointer key, value;
|
void *key, *value;
|
||||||
cmph_io_adapter_t *io;
|
cmph_io_adapter_t *io;
|
||||||
cmph_config_t *config;
|
cmph_config_t *config;
|
||||||
guint32 num_elts;
|
guint32 num_elts;
|
||||||
@ -152,7 +152,7 @@ gi_typelib_hash_builder_pack (GITypelibHashBuilder *builder, guint8* mem, guint3
|
|||||||
{
|
{
|
||||||
guint16 *table;
|
guint16 *table;
|
||||||
GHashTableIter hashiter;
|
GHashTableIter hashiter;
|
||||||
gpointer key, value;
|
void *key, *value;
|
||||||
#ifndef G_DISABLE_ASSERT
|
#ifndef G_DISABLE_ASSERT
|
||||||
guint32 num_elts;
|
guint32 num_elts;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user