Commit 6379b8a4 authored by Johan Dahlin's avatar Johan Dahlin

[GIRepository] Rename GArgument to GIArgument

Keep a typedef for backwards compatibility, until
the major bindings has moved over.
parent 8ebf8991
......@@ -5,8 +5,8 @@ int main(void)
GIRepository *repository;
GError *error = NULL;
GIBaseInfo *base_info;
GArgument in_args[5];
GArgument retval;
GIArgument in_args[5];
GIArgument retval;
g_type_init();
......@@ -30,7 +30,7 @@ int main(void)
in_args[4].v_pointer = "hello world";
if (!g_function_info_invoke ((GIFunctionInfo *)base_info,
(const GArgument*)&in_args,
(const GIArgument*)&in_args,
5,
NULL,
0,
......
......@@ -77,7 +77,7 @@ g_constant_info_get_type (GIConstantInfo *info)
*/
gint
g_constant_info_get_value (GIConstantInfo *info,
GArgument *value)
GIArgument *value)
{
GIRealInfo *rinfo = (GIRealInfo *)info;
ConstantBlob *blob;
......
......@@ -35,7 +35,7 @@ G_BEGIN_DECLS
GITypeInfo * g_constant_info_get_type (GIConstantInfo *info);
gint g_constant_info_get_value(GIConstantInfo *info,
GArgument *value);
GIArgument *value);
G_END_DECLS
......
......@@ -164,7 +164,7 @@ g_field_info_get_type (GIFieldInfo *info)
* g_field_info_get_field:
* @field_info: a #GIFieldInfo
* @mem: pointer to a block of memory representing a C structure or union
* @value: a #GArgument into which to store the value retrieved
* @value: a #GIArgument into which to store the value retrieved
*
* Reads a field identified by a #GFieldInfo from a C structure or
* union. This only handles fields of simple C types. It will fail
......@@ -176,7 +176,7 @@ g_field_info_get_type (GIFieldInfo *info)
gboolean
g_field_info_get_field (GIFieldInfo *field_info,
gpointer mem,
GArgument *value)
GIArgument *value)
{
int offset;
GITypeInfo *type_info;
......@@ -346,7 +346,7 @@ g_field_info_get_field (GIFieldInfo *field_info,
* g_field_info_set_field:
* @field_info: a #GIFieldInfo
* @mem: pointer to a block of memory representing a C structure or union
* @value: a #GArgument holding the value to store
* @value: a #GIArgument holding the value to store
*
* Writes a field identified by a #GFieldInfo to a C structure or
* union. This only handles fields of simple C types. It will fail
......@@ -360,7 +360,7 @@ g_field_info_get_field (GIFieldInfo *field_info,
gboolean
g_field_info_set_field (GIFieldInfo *field_info,
gpointer mem,
const GArgument *value)
const GIArgument *value)
{
int offset;
GITypeInfo *type_info;
......
......@@ -39,10 +39,10 @@ gint g_field_info_get_offset (GIFieldInfo *info);
GITypeInfo * g_field_info_get_type (GIFieldInfo *info);
gboolean g_field_info_get_field (GIFieldInfo *field_info,
gpointer mem,
GArgument *value);
GIArgument *value);
gboolean g_field_info_set_field (GIFieldInfo *field_info,
gpointer mem,
const GArgument *value);
const GIArgument *value);
G_END_DECLS
......
......@@ -217,11 +217,11 @@ g_invoke_error_quark (void)
/**
* g_function_info_invoke:
* @info: a #GIFunctionInfo describing the function to invoke
* @in_args: an array of #GArgument<!-- -->s, one for each in
* @in_args: an array of #GIArgument<!-- -->s, one for each in
* parameter of @info. If there are no in parameter, @in_args
* can be %NULL
* @n_in_args: the length of the @in_args array
* @out_args: an array of #GArgument<!-- -->s, one for each out
* @out_args: an array of #GIArgument<!-- -->s, one for each out
* parameter of @info. If there are no out parameters, @out_args
* may be %NULL
* @n_out_args: the length of the @out_args array
......@@ -242,11 +242,11 @@ g_invoke_error_quark (void)
*/
gboolean
g_function_info_invoke (GIFunctionInfo *info,
const GArgument *in_args,
const GIArgument *in_args,
int n_in_args,
const GArgument *out_args,
const GIArgument *out_args,
int n_out_args,
GArgument *return_value,
GIArgument *return_value,
GError **error)
{
ffi_cif cif;
......
......@@ -61,11 +61,11 @@ typedef enum
} GInvokeError;
gboolean g_function_info_invoke (GIFunctionInfo *info,
const GArgument *in_args,
const GIArgument *in_args,
int n_in_args,
const GArgument *out_args,
const GIArgument *out_args,
int n_out_args,
GArgument *return_value,
GIArgument *return_value,
GError **error);
......
......@@ -389,7 +389,7 @@ write_return_value_attributes (Xml *file,
static void
write_constant_value (const gchar *namespace,
GITypeInfo *info,
GArgument *argument,
GIArgument *argument,
Xml *file);
static void
......@@ -409,7 +409,7 @@ write_field_info (const gchar *namespace,
gint offset;
GITypeInfo *type;
GIBaseInfo *interface;
GArgument value;
GIArgument value;
name = g_base_info_get_name ((GIBaseInfo *)info);
flags = g_field_info_get_flags (info);
......@@ -725,7 +725,7 @@ write_value_info (const gchar *namespace,
static void
write_constant_value (const gchar *namespace,
GITypeInfo *type,
GArgument *value,
GIArgument *value,
Xml *file)
{
switch (g_type_info_get_tag (type))
......@@ -780,7 +780,7 @@ write_constant_info (const gchar *namespace,
GITypeInfo *type;
const gchar *name;
gboolean deprecated;
GArgument value;
GIArgument value;
name = g_base_info_get_name ((GIBaseInfo *)info);
deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
......
......@@ -187,7 +187,7 @@ typedef union
gsize v_size;
gchar * v_string;
gpointer v_pointer;
} GArgument;
} GIArgument;
/**
* GIInfoType:
......@@ -438,6 +438,11 @@ typedef enum
GI_FUNCTION_THROWS = 1 << 5
} GIFunctionInfoFlags;
#ifndef __GI_SCANNER__
/* backwards compatibility */
typedef union GIArgument GArgument;
#endif
G_END_DECLS
#endif /* __GITYPES_H__ */
......
......@@ -12,8 +12,8 @@ main(int argc, char **argv)
GTypelib *ret;
GIBaseInfo *info;
char *girdir;
GArgument in_arg[1];
GArgument ret_arg;
GIArgument in_arg[1];
GIArgument ret_arg;
GError *error;
gboolean invoke_return;
......
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