mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 07:26:15 +01:00
girepository: Use char instead of glib-specific gchar
This commit is contained in:
parent
eda4bfcf95
commit
8891429a5b
@ -96,7 +96,7 @@ value_base_info_collect_value (GValue *value,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static char *
|
||||||
value_base_info_lcopy_value (const GValue *value,
|
value_base_info_lcopy_value (const GValue *value,
|
||||||
guint n_collect_values,
|
guint n_collect_values,
|
||||||
GTypeCValue *collect_values,
|
GTypeCValue *collect_values,
|
||||||
@ -410,8 +410,8 @@ gi_info_from_entry (GIRepository *repository,
|
|||||||
result = gi_info_new_full (entry->blob_type, repository, NULL, typelib, entry->offset);
|
result = gi_info_new_full (entry->blob_type, repository, NULL, typelib, entry->offset);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const gchar *namespace = gi_typelib_get_string (typelib, entry->offset);
|
const char *namespace = gi_typelib_get_string (typelib, entry->offset);
|
||||||
const gchar *name = gi_typelib_get_string (typelib, entry->name);
|
const char *name = gi_typelib_get_string (typelib, entry->name);
|
||||||
|
|
||||||
result = gi_repository_find_by_name (repository, namespace, name);
|
result = gi_repository_find_by_name (repository, namespace, name);
|
||||||
if (result == NULL)
|
if (result == NULL)
|
||||||
@ -564,7 +564,7 @@ gi_base_info_get_info_type (GIBaseInfo *info)
|
|||||||
* Returns: (nullable): the name of @info or `NULL` if it lacks a name.
|
* Returns: (nullable): the name of @info or `NULL` if it lacks a name.
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_base_info_get_name (GIBaseInfo *info)
|
gi_base_info_get_name (GIBaseInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo*)info;
|
GIRealInfo *rinfo = (GIRealInfo*)info;
|
||||||
@ -661,7 +661,7 @@ gi_base_info_get_name (GIBaseInfo *info)
|
|||||||
* Returns: the namespace
|
* Returns: the namespace
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_base_info_get_namespace (GIBaseInfo *info)
|
gi_base_info_get_namespace (GIBaseInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo*) info;
|
GIRealInfo *rinfo = (GIRealInfo*) info;
|
||||||
@ -757,16 +757,16 @@ gi_base_info_is_deprecated (GIBaseInfo *info)
|
|||||||
* attribute exists
|
* attribute exists
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_base_info_get_attribute (GIBaseInfo *info,
|
gi_base_info_get_attribute (GIBaseInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
GIAttributeIter iter = { 0, };
|
GIAttributeIter iter = { 0, };
|
||||||
const char *curname, *curvalue;
|
const char *curname, *curvalue;
|
||||||
while (gi_base_info_iterate_attributes (info, &iter, &curname, &curvalue))
|
while (gi_base_info_iterate_attributes (info, &iter, &curname, &curvalue))
|
||||||
{
|
{
|
||||||
if (strcmp (name, curname) == 0)
|
if (strcmp (name, curname) == 0)
|
||||||
return (const gchar*) curvalue;
|
return (const char *) curvalue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -865,8 +865,8 @@ _attribute_blob_find_first (GIBaseInfo *info,
|
|||||||
gboolean
|
gboolean
|
||||||
gi_base_info_iterate_attributes (GIBaseInfo *info,
|
gi_base_info_iterate_attributes (GIBaseInfo *info,
|
||||||
GIAttributeIter *iterator,
|
GIAttributeIter *iterator,
|
||||||
const gchar **name,
|
const char **name,
|
||||||
const gchar **value)
|
const char **value)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
Header *header = (Header *)rinfo->typelib->data;
|
Header *header = (Header *)rinfo->typelib->data;
|
||||||
|
@ -64,17 +64,17 @@ GI_AVAILABLE_IN_ALL
|
|||||||
GIInfoType gi_base_info_get_info_type (GIBaseInfo *info);
|
GIInfoType gi_base_info_get_info_type (GIBaseInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_base_info_get_name (GIBaseInfo *info);
|
const char * gi_base_info_get_name (GIBaseInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_base_info_get_namespace (GIBaseInfo *info);
|
const char * gi_base_info_get_namespace (GIBaseInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_base_info_is_deprecated (GIBaseInfo *info);
|
gboolean gi_base_info_is_deprecated (GIBaseInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_base_info_get_attribute (GIBaseInfo *info,
|
const char * gi_base_info_get_attribute (GIBaseInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_base_info_iterate_attributes (GIBaseInfo *info,
|
gboolean gi_base_info_iterate_attributes (GIBaseInfo *info,
|
||||||
|
@ -420,16 +420,16 @@ gi_callable_info_load_arg (GICallableInfo *info,
|
|||||||
* attribute exists
|
* attribute exists
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_callable_info_get_return_attribute (GICallableInfo *info,
|
gi_callable_info_get_return_attribute (GICallableInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
GIAttributeIter iter = { 0, };
|
GIAttributeIter iter = { 0, };
|
||||||
const char *curname, *curvalue;
|
const char *curname, *curvalue;
|
||||||
while (gi_callable_info_iterate_return_attributes (info, &iter, &curname, &curvalue))
|
while (gi_callable_info_iterate_return_attributes (info, &iter, &curname, &curvalue))
|
||||||
{
|
{
|
||||||
if (g_strcmp0 (name, curname) == 0)
|
if (g_strcmp0 (name, curname) == 0)
|
||||||
return (const gchar*) curvalue;
|
return (const char*) curvalue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -61,8 +61,8 @@ void gi_callable_info_load_return_type (GICallableInfo *info,
|
|||||||
GITypeInfo *type);
|
GITypeInfo *type);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_callable_info_get_return_attribute (GICallableInfo *info,
|
const char * gi_callable_info_get_return_attribute (GICallableInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_callable_info_iterate_return_attributes (GICallableInfo *info,
|
gboolean gi_callable_info_iterate_return_attributes (GICallableInfo *info,
|
||||||
|
@ -80,7 +80,7 @@ gi_enum_info_get_n_values (GIEnumInfo *info)
|
|||||||
* associated with this enum, or `NULL`.
|
* associated with this enum, or `NULL`.
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_enum_info_get_error_domain (GIEnumInfo *info)
|
gi_enum_info_get_error_domain (GIEnumInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
|
@ -74,7 +74,7 @@ GI_AVAILABLE_IN_ALL
|
|||||||
GITypeTag gi_enum_info_get_storage_type (GIEnumInfo *info);
|
GITypeTag gi_enum_info_get_storage_type (GIEnumInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_enum_info_get_error_domain (GIEnumInfo *info);
|
const char * gi_enum_info_get_error_domain (GIEnumInfo *info);
|
||||||
|
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
|
@ -52,7 +52,7 @@ GIFunctionInfo *
|
|||||||
gi_base_info_find_method (GIBaseInfo *base,
|
gi_base_info_find_method (GIBaseInfo *base,
|
||||||
guint32 offset,
|
guint32 offset,
|
||||||
guint n_methods,
|
guint n_methods,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
/* FIXME hash */
|
/* FIXME hash */
|
||||||
GIRealInfo *rinfo = (GIRealInfo*)base;
|
GIRealInfo *rinfo = (GIRealInfo*)base;
|
||||||
@ -61,7 +61,7 @@ gi_base_info_find_method (GIBaseInfo *base,
|
|||||||
for (guint i = 0; i < n_methods; i++)
|
for (guint i = 0; i < n_methods; i++)
|
||||||
{
|
{
|
||||||
FunctionBlob *fblob = (FunctionBlob *)&rinfo->typelib->data[offset];
|
FunctionBlob *fblob = (FunctionBlob *)&rinfo->typelib->data[offset];
|
||||||
const gchar *fname = (const gchar *)&rinfo->typelib->data[fblob->name];
|
const char *fname = (const char *)&rinfo->typelib->data[fblob->name];
|
||||||
|
|
||||||
if (strcmp (name, fname) == 0)
|
if (strcmp (name, fname) == 0)
|
||||||
return (GIFunctionInfo *) gi_info_new (GI_INFO_TYPE_FUNCTION, base,
|
return (GIFunctionInfo *) gi_info_new (GI_INFO_TYPE_FUNCTION, base,
|
||||||
@ -85,7 +85,7 @@ gi_base_info_find_method (GIBaseInfo *base,
|
|||||||
* Returns: the symbol
|
* Returns: the symbol
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_function_info_get_symbol (GIFunctionInfo *info)
|
gi_function_info_get_symbol (GIFunctionInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo;
|
GIRealInfo *rinfo;
|
||||||
@ -272,7 +272,7 @@ gi_function_info_invoke (GIFunctionInfo *info,
|
|||||||
GIArgument *return_value,
|
GIArgument *return_value,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *symbol;
|
const char *symbol;
|
||||||
void *func;
|
void *func;
|
||||||
|
|
||||||
symbol = gi_function_info_get_symbol (info);
|
symbol = gi_function_info_get_symbol (info);
|
||||||
|
@ -45,7 +45,7 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_function_info_get_symbol (GIFunctionInfo *info);
|
const char * gi_function_info_get_symbol (GIFunctionInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIFunctionInfoFlags gi_function_info_get_flags (GIFunctionInfo *info);
|
GIFunctionInfoFlags gi_function_info_get_flags (GIFunctionInfo *info);
|
||||||
|
@ -228,7 +228,7 @@ gi_interface_info_get_method (GIInterfaceInfo *info,
|
|||||||
*/
|
*/
|
||||||
GIFunctionInfo *
|
GIFunctionInfo *
|
||||||
gi_interface_info_find_method (GIInterfaceInfo *info,
|
gi_interface_info_find_method (GIInterfaceInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
gint offset;
|
gint offset;
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@ -317,7 +317,7 @@ gi_interface_info_get_signal (GIInterfaceInfo *info,
|
|||||||
*/
|
*/
|
||||||
GISignalInfo *
|
GISignalInfo *
|
||||||
gi_interface_info_find_signal (GIInterfaceInfo *info,
|
gi_interface_info_find_signal (GIInterfaceInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
guint n_signals;
|
guint n_signals;
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ gi_interface_info_get_vfunc (GIInterfaceInfo *info,
|
|||||||
*/
|
*/
|
||||||
GIVFuncInfo *
|
GIVFuncInfo *
|
||||||
gi_interface_info_find_vfunc (GIInterfaceInfo *info,
|
gi_interface_info_find_vfunc (GIInterfaceInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
gint offset;
|
gint offset;
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
|
@ -67,7 +67,7 @@ GIFunctionInfo * gi_interface_info_get_method (GIInterfaceInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIFunctionInfo * gi_interface_info_find_method (GIInterfaceInfo *info,
|
GIFunctionInfo * gi_interface_info_find_method (GIInterfaceInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
guint gi_interface_info_get_n_signals (GIInterfaceInfo *info);
|
guint gi_interface_info_get_n_signals (GIInterfaceInfo *info);
|
||||||
@ -78,7 +78,7 @@ GISignalInfo * gi_interface_info_get_signal (GIInterfaceInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GISignalInfo * gi_interface_info_find_signal (GIInterfaceInfo *info,
|
GISignalInfo * gi_interface_info_find_signal (GIInterfaceInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
guint gi_interface_info_get_n_vfuncs (GIInterfaceInfo *info);
|
guint gi_interface_info_get_n_vfuncs (GIInterfaceInfo *info);
|
||||||
@ -89,7 +89,7 @@ GIVFuncInfo * gi_interface_info_get_vfunc (GIInterfaceInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIVFuncInfo * gi_interface_info_find_vfunc (GIInterfaceInfo *info,
|
GIVFuncInfo * gi_interface_info_find_vfunc (GIInterfaceInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
guint gi_interface_info_get_n_constants (GIInterfaceInfo *info);
|
guint gi_interface_info_get_n_constants (GIInterfaceInfo *info);
|
||||||
|
@ -212,10 +212,10 @@ g_value_from_ffi_value (GValue *gvalue,
|
|||||||
g_value_set_boolean (gvalue, (gboolean)value->v_long);
|
g_value_set_boolean (gvalue, (gboolean)value->v_long);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_STRING:
|
case G_TYPE_STRING:
|
||||||
g_value_set_string (gvalue, (gchar*)value->v_pointer);
|
g_value_set_string (gvalue, (char*)value->v_pointer);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_CHAR:
|
case G_TYPE_CHAR:
|
||||||
g_value_set_schar (gvalue, (gchar)value->v_long);
|
g_value_set_schar (gvalue, (char)value->v_long);
|
||||||
break;
|
break;
|
||||||
case G_TYPE_UCHAR:
|
case G_TYPE_UCHAR:
|
||||||
g_value_set_uchar (gvalue, (guchar)value->v_ulong);
|
g_value_set_uchar (gvalue, (guchar)value->v_ulong);
|
||||||
|
@ -194,7 +194,7 @@ gi_object_info_get_fundamental (GIObjectInfo *info)
|
|||||||
* Returns: name of the object’s type
|
* Returns: name of the object’s type
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_object_info_get_type_name (GIObjectInfo *info)
|
gi_object_info_get_type_name (GIObjectInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@ -218,7 +218,7 @@ gi_object_info_get_type_name (GIObjectInfo *info)
|
|||||||
* Returns: the type init function name
|
* Returns: the type init function name
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_object_info_get_type_init_function_name (GIObjectInfo *info)
|
gi_object_info_get_type_init_function_name (GIObjectInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@ -466,7 +466,7 @@ gi_object_info_get_method (GIObjectInfo *info,
|
|||||||
*/
|
*/
|
||||||
GIFunctionInfo *
|
GIFunctionInfo *
|
||||||
gi_object_info_find_method (GIObjectInfo *info,
|
gi_object_info_find_method (GIObjectInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
gint offset;
|
gint offset;
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@ -511,7 +511,7 @@ gi_object_info_find_method (GIObjectInfo *info,
|
|||||||
*/
|
*/
|
||||||
GIFunctionInfo *
|
GIFunctionInfo *
|
||||||
gi_object_info_find_method_using_interfaces (GIObjectInfo *info,
|
gi_object_info_find_method_using_interfaces (GIObjectInfo *info,
|
||||||
const gchar *name,
|
const char *name,
|
||||||
GIObjectInfo **implementor)
|
GIObjectInfo **implementor)
|
||||||
{
|
{
|
||||||
GIFunctionInfo *result = NULL;
|
GIFunctionInfo *result = NULL;
|
||||||
@ -627,7 +627,7 @@ gi_object_info_get_signal (GIObjectInfo *info,
|
|||||||
*/
|
*/
|
||||||
GISignalInfo *
|
GISignalInfo *
|
||||||
gi_object_info_find_signal (GIObjectInfo *info,
|
gi_object_info_find_signal (GIObjectInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
guint n_signals;
|
guint n_signals;
|
||||||
|
|
||||||
@ -732,7 +732,7 @@ gi_object_info_get_vfunc (GIObjectInfo *info,
|
|||||||
*/
|
*/
|
||||||
GIVFuncInfo *
|
GIVFuncInfo *
|
||||||
gi_object_info_find_vfunc (GIObjectInfo *info,
|
gi_object_info_find_vfunc (GIObjectInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
gint offset;
|
gint offset;
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@ -784,7 +784,7 @@ gi_object_info_find_vfunc (GIObjectInfo *info,
|
|||||||
*/
|
*/
|
||||||
GIVFuncInfo *
|
GIVFuncInfo *
|
||||||
gi_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
|
gi_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
|
||||||
const gchar *name,
|
const char *name,
|
||||||
GIObjectInfo **implementor)
|
GIObjectInfo **implementor)
|
||||||
{
|
{
|
||||||
GIVFuncInfo *result = NULL;
|
GIVFuncInfo *result = NULL;
|
||||||
|
@ -88,10 +88,10 @@ typedef void * (*GIObjectInfoGetValueFunction) (const GValue *value);
|
|||||||
|
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_object_info_get_type_name (GIObjectInfo *info);
|
const char * gi_object_info_get_type_name (GIObjectInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_object_info_get_type_init_function_name (GIObjectInfo *info);
|
const char * gi_object_info_get_type_init_function_name (GIObjectInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_object_info_get_abstract (GIObjectInfo *info);
|
gboolean gi_object_info_get_abstract (GIObjectInfo *info);
|
||||||
@ -135,12 +135,12 @@ GIFunctionInfo * gi_object_info_get_method (GIObjectInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIFunctionInfo * gi_object_info_find_method (GIObjectInfo *info,
|
GIFunctionInfo * gi_object_info_find_method (GIObjectInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIFunctionInfo * gi_object_info_find_method_using_interfaces (GIObjectInfo *info,
|
GIFunctionInfo * gi_object_info_find_method_using_interfaces (GIObjectInfo *info,
|
||||||
const gchar *name,
|
const char *name,
|
||||||
GIObjectInfo **implementor);
|
GIObjectInfo **implementor);
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ GISignalInfo * gi_object_info_get_signal (GIObjectInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GISignalInfo * gi_object_info_find_signal (GIObjectInfo *info,
|
GISignalInfo * gi_object_info_find_signal (GIObjectInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
@ -166,11 +166,11 @@ GIVFuncInfo * gi_object_info_get_vfunc (GIObjectInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIVFuncInfo * gi_object_info_find_vfunc (GIObjectInfo *info,
|
GIVFuncInfo * gi_object_info_find_vfunc (GIObjectInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIVFuncInfo * gi_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
|
GIVFuncInfo * gi_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
|
||||||
const gchar *name,
|
const char *name,
|
||||||
GIObjectInfo **implementor);
|
GIObjectInfo **implementor);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
* Returns: (nullable): the type name, or `NULL` if unknown
|
* Returns: (nullable): the type name, or `NULL` if unknown
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_registered_type_info_get_type_name (GIRegisteredTypeInfo *info)
|
gi_registered_type_info_get_type_name (GIRegisteredTypeInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@ -97,7 +97,7 @@ gi_registered_type_info_get_type_name (GIRegisteredTypeInfo *info)
|
|||||||
* passing into [method@GModule.Module.symbol], or `NULL` if unknown
|
* passing into [method@GModule.Module.symbol], or `NULL` if unknown
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_registered_type_info_get_type_init_function_name (GIRegisteredTypeInfo *info)
|
gi_registered_type_info_get_type_init_function_name (GIRegisteredTypeInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
|
@ -53,10 +53,10 @@ G_BEGIN_DECLS
|
|||||||
(gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_BOXED))
|
(gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_BOXED))
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_registered_type_info_get_type_name (GIRegisteredTypeInfo *info);
|
const char * gi_registered_type_info_get_type_name (GIRegisteredTypeInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_registered_type_info_get_type_init_function_name (GIRegisteredTypeInfo *info);
|
const char * gi_registered_type_info_get_type_init_function_name (GIRegisteredTypeInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GType gi_registered_type_info_get_g_type (GIRegisteredTypeInfo *info);
|
GType gi_registered_type_info_get_g_type (GIRegisteredTypeInfo *info);
|
||||||
|
@ -203,8 +203,8 @@ struct _GIUnresolvedInfo
|
|||||||
{
|
{
|
||||||
GIBaseInfo parent;
|
GIBaseInfo parent;
|
||||||
|
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *namespace;
|
const char *namespace;
|
||||||
};
|
};
|
||||||
|
|
||||||
void gi_unresolved_info_class_init (gpointer g_class,
|
void gi_unresolved_info_class_init (gpointer g_class,
|
||||||
@ -239,9 +239,9 @@ void gi_type_info_init (GIBaseInfo *info,
|
|||||||
GIFunctionInfo * gi_base_info_find_method (GIBaseInfo *base,
|
GIFunctionInfo * gi_base_info_find_method (GIBaseInfo *base,
|
||||||
guint32 offset,
|
guint32 offset,
|
||||||
guint n_methods,
|
guint n_methods,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GIVFuncInfo * gi_base_info_find_vfunc (GIRealInfo *rinfo,
|
GIVFuncInfo * gi_base_info_find_vfunc (GIRealInfo *rinfo,
|
||||||
guint32 offset,
|
guint32 offset,
|
||||||
guint n_vfuncs,
|
guint n_vfuncs,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
@ -203,7 +203,7 @@ init_globals (void)
|
|||||||
{
|
{
|
||||||
const char *libdir;
|
const char *libdir;
|
||||||
char *typelib_dir;
|
char *typelib_dir;
|
||||||
const gchar *type_lib_path_env;
|
const char *type_lib_path_env;
|
||||||
|
|
||||||
/* This variable is intended to take precedence over both:
|
/* This variable is intended to take precedence over both:
|
||||||
* - the default search path;
|
* - the default search path;
|
||||||
@ -213,7 +213,7 @@ init_globals (void)
|
|||||||
|
|
||||||
if (type_lib_path_env)
|
if (type_lib_path_env)
|
||||||
{
|
{
|
||||||
gchar **custom_dirs;
|
char **custom_dirs;
|
||||||
|
|
||||||
custom_dirs = g_strsplit (type_lib_path_env, G_SEARCHPATH_SEPARATOR_S, 0);
|
custom_dirs = g_strsplit (type_lib_path_env, G_SEARCHPATH_SEPARATOR_S, 0);
|
||||||
typelib_search_path =
|
typelib_search_path =
|
||||||
@ -324,8 +324,8 @@ get_repository (GIRepository *repository)
|
|||||||
|
|
||||||
static GITypelib *
|
static GITypelib *
|
||||||
check_version_conflict (GITypelib *typelib,
|
check_version_conflict (GITypelib *typelib,
|
||||||
const gchar *namespace,
|
const char *namespace,
|
||||||
const gchar *expected_version,
|
const char *expected_version,
|
||||||
char **version_conflict)
|
char **version_conflict)
|
||||||
{
|
{
|
||||||
Header *header;
|
Header *header;
|
||||||
@ -432,7 +432,7 @@ register_internal (GIRepository *repository,
|
|||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
Header *header;
|
Header *header;
|
||||||
const gchar *namespace;
|
const char *namespace;
|
||||||
|
|
||||||
g_return_val_if_fail (typelib != NULL, FALSE);
|
g_return_val_if_fail (typelib != NULL, FALSE);
|
||||||
|
|
||||||
@ -502,7 +502,7 @@ gi_repository_get_immediate_dependencies (GIRepository *repository,
|
|||||||
const char *namespace)
|
const char *namespace)
|
||||||
{
|
{
|
||||||
GITypelib *typelib;
|
GITypelib *typelib;
|
||||||
gchar **deps;
|
char **deps;
|
||||||
|
|
||||||
g_return_val_if_fail (namespace != NULL, NULL);
|
g_return_val_if_fail (namespace != NULL, NULL);
|
||||||
|
|
||||||
@ -528,16 +528,16 @@ get_typelib_dependencies_transitive (GIRepository *repository,
|
|||||||
GITypelib *typelib,
|
GITypelib *typelib,
|
||||||
GHashTable *transitive_dependencies)
|
GHashTable *transitive_dependencies)
|
||||||
{
|
{
|
||||||
gchar **immediate_dependencies;
|
|
||||||
guint i;
|
guint i;
|
||||||
|
char **immediate_dependencies;
|
||||||
|
|
||||||
immediate_dependencies = get_typelib_dependencies (typelib);
|
immediate_dependencies = get_typelib_dependencies (typelib);
|
||||||
|
|
||||||
for (i = 0; immediate_dependencies != NULL && immediate_dependencies[i]; i++)
|
for (i = 0; immediate_dependencies != NULL && immediate_dependencies[i]; i++)
|
||||||
{
|
{
|
||||||
gchar *dependency;
|
char *dependency;
|
||||||
const gchar *last_dash;
|
const char *last_dash;
|
||||||
gchar *dependency_namespace;
|
char *dependency_namespace;
|
||||||
|
|
||||||
dependency = immediate_dependencies[i];
|
dependency = immediate_dependencies[i];
|
||||||
|
|
||||||
@ -589,7 +589,7 @@ gi_repository_get_dependencies (GIRepository *repository,
|
|||||||
GITypelib *typelib;
|
GITypelib *typelib;
|
||||||
GHashTable *transitive_dependencies; /* set of owned utf8 */
|
GHashTable *transitive_dependencies; /* set of owned utf8 */
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
gchar *dependency;
|
char *dependency;
|
||||||
GPtrArray *out; /* owned utf8 elements */
|
GPtrArray *out; /* owned utf8 elements */
|
||||||
|
|
||||||
g_return_val_if_fail (namespace != NULL, NULL);
|
g_return_val_if_fail (namespace != NULL, NULL);
|
||||||
@ -618,7 +618,7 @@ gi_repository_get_dependencies (GIRepository *repository,
|
|||||||
|
|
||||||
g_hash_table_unref (transitive_dependencies);
|
g_hash_table_unref (transitive_dependencies);
|
||||||
|
|
||||||
return (gchar **) g_ptr_array_free (out, FALSE);
|
return (char **) g_ptr_array_free (out, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -691,8 +691,8 @@ gi_repository_load_typelib (GIRepository *repository,
|
|||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gi_repository_is_registered (GIRepository *repository,
|
gi_repository_is_registered (GIRepository *repository,
|
||||||
const gchar *namespace,
|
const char *namespace,
|
||||||
const gchar *version)
|
const char *version)
|
||||||
{
|
{
|
||||||
repository = get_repository (repository);
|
repository = get_repository (repository);
|
||||||
return get_registered (repository, namespace, version) != NULL;
|
return get_registered (repository, namespace, version) != NULL;
|
||||||
@ -755,7 +755,7 @@ gi_repository_new (void)
|
|||||||
*/
|
*/
|
||||||
guint
|
guint
|
||||||
gi_repository_get_n_infos (GIRepository *repository,
|
gi_repository_get_n_infos (GIRepository *repository,
|
||||||
const gchar *namespace)
|
const char *namespace)
|
||||||
{
|
{
|
||||||
GITypelib *typelib;
|
GITypelib *typelib;
|
||||||
guint n_interfaces = 0;
|
guint n_interfaces = 0;
|
||||||
@ -793,7 +793,7 @@ gi_repository_get_n_infos (GIRepository *repository,
|
|||||||
*/
|
*/
|
||||||
GIBaseInfo *
|
GIBaseInfo *
|
||||||
gi_repository_get_info (GIRepository *repository,
|
gi_repository_get_info (GIRepository *repository,
|
||||||
const gchar *namespace,
|
const char *namespace,
|
||||||
guint idx)
|
guint idx)
|
||||||
{
|
{
|
||||||
GITypelib *typelib;
|
GITypelib *typelib;
|
||||||
@ -816,7 +816,7 @@ gi_repository_get_info (GIRepository *repository,
|
|||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const gchar *gtype_name;
|
const char *gtype_name;
|
||||||
GITypelib *result_typelib;
|
GITypelib *result_typelib;
|
||||||
} FindByGTypeData;
|
} FindByGTypeData;
|
||||||
|
|
||||||
@ -948,8 +948,8 @@ gi_repository_find_by_gtype (GIRepository *repository,
|
|||||||
*/
|
*/
|
||||||
GIBaseInfo *
|
GIBaseInfo *
|
||||||
gi_repository_find_by_name (GIRepository *repository,
|
gi_repository_find_by_name (GIRepository *repository,
|
||||||
const gchar *namespace,
|
const char *namespace,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
GITypelib *typelib;
|
GITypelib *typelib;
|
||||||
DirEntry *entry;
|
DirEntry *entry;
|
||||||
@ -1149,11 +1149,11 @@ collect_namespaces (gpointer key,
|
|||||||
* list of namespaces
|
* list of namespaces
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gchar **
|
char **
|
||||||
gi_repository_get_loaded_namespaces (GIRepository *repository)
|
gi_repository_get_loaded_namespaces (GIRepository *repository)
|
||||||
{
|
{
|
||||||
GList *l, *list = NULL;
|
GList *l, *list = NULL;
|
||||||
gchar **names;
|
char **names;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
repository = get_repository (repository);
|
repository = get_repository (repository);
|
||||||
@ -1161,7 +1161,7 @@ gi_repository_get_loaded_namespaces (GIRepository *repository)
|
|||||||
g_hash_table_foreach (repository->priv->typelibs, collect_namespaces, &list);
|
g_hash_table_foreach (repository->priv->typelibs, collect_namespaces, &list);
|
||||||
g_hash_table_foreach (repository->priv->lazy_typelibs, collect_namespaces, &list);
|
g_hash_table_foreach (repository->priv->lazy_typelibs, collect_namespaces, &list);
|
||||||
|
|
||||||
names = g_malloc0 (sizeof (gchar *) * (g_list_length (list) + 1));
|
names = g_malloc0 (sizeof (char *) * (g_list_length (list) + 1));
|
||||||
i = 0;
|
i = 0;
|
||||||
for (l = list; l; l = l->next)
|
for (l = list; l; l = l->next)
|
||||||
names[i++] = g_strdup (l->data);
|
names[i++] = g_strdup (l->data);
|
||||||
@ -1186,9 +1186,9 @@ gi_repository_get_loaded_namespaces (GIRepository *repository)
|
|||||||
* Returns: Loaded version
|
* Returns: Loaded version
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_repository_get_version (GIRepository *repository,
|
gi_repository_get_version (GIRepository *repository,
|
||||||
const gchar *namespace)
|
const char *namespace)
|
||||||
{
|
{
|
||||||
GITypelib *typelib;
|
GITypelib *typelib;
|
||||||
Header *header;
|
Header *header;
|
||||||
@ -1232,7 +1232,7 @@ gi_repository_get_version (GIRepository *repository,
|
|||||||
*/
|
*/
|
||||||
const char * const *
|
const char * const *
|
||||||
gi_repository_get_shared_libraries (GIRepository *repository,
|
gi_repository_get_shared_libraries (GIRepository *repository,
|
||||||
const gchar *namespace,
|
const char *namespace,
|
||||||
size_t *out_n_elements)
|
size_t *out_n_elements)
|
||||||
{
|
{
|
||||||
GITypelib *typelib;
|
GITypelib *typelib;
|
||||||
@ -1291,9 +1291,9 @@ gi_repository_get_shared_libraries (GIRepository *repository,
|
|||||||
* Returns: (nullable): C namespace prefix, or `NULL` if none associated
|
* Returns: (nullable): C namespace prefix, or `NULL` if none associated
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_repository_get_c_prefix (GIRepository *repository,
|
gi_repository_get_c_prefix (GIRepository *repository,
|
||||||
const gchar *namespace_)
|
const char *namespace_)
|
||||||
{
|
{
|
||||||
GITypelib *typelib;
|
GITypelib *typelib;
|
||||||
Header *header;
|
Header *header;
|
||||||
@ -1329,9 +1329,9 @@ gi_repository_get_c_prefix (GIRepository *repository,
|
|||||||
* successful, `NULL` if namespace is not loaded
|
* successful, `NULL` if namespace is not loaded
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_repository_get_typelib_path (GIRepository *repository,
|
gi_repository_get_typelib_path (GIRepository *repository,
|
||||||
const gchar *namespace)
|
const char *namespace)
|
||||||
{
|
{
|
||||||
gpointer orig_key, value;
|
gpointer orig_key, value;
|
||||||
|
|
||||||
@ -1629,12 +1629,12 @@ find_namespace_latest (const char *namespace,
|
|||||||
*/
|
*/
|
||||||
char **
|
char **
|
||||||
gi_repository_enumerate_versions (GIRepository *repository,
|
gi_repository_enumerate_versions (GIRepository *repository,
|
||||||
const gchar *namespace_,
|
const char *namespace_,
|
||||||
size_t *n_versions_out)
|
size_t *n_versions_out)
|
||||||
{
|
{
|
||||||
GPtrArray *versions;
|
GPtrArray *versions;
|
||||||
GSList *candidates, *link;
|
GSList *candidates, *link;
|
||||||
const gchar *loaded_version;
|
const char *loaded_version;
|
||||||
char **ret;
|
char **ret;
|
||||||
|
|
||||||
init_globals ();
|
init_globals ();
|
||||||
@ -1689,7 +1689,7 @@ require_internal (GIRepository *repository,
|
|||||||
GITypelib *ret = NULL;
|
GITypelib *ret = NULL;
|
||||||
Header *header;
|
Header *header;
|
||||||
GITypelib *typelib = NULL;
|
GITypelib *typelib = NULL;
|
||||||
const gchar *typelib_namespace, *typelib_version;
|
const char *typelib_namespace, *typelib_version;
|
||||||
gboolean allow_lazy = (flags & GI_REPOSITORY_LOAD_FLAG_LAZY) > 0;
|
gboolean allow_lazy = (flags & GI_REPOSITORY_LOAD_FLAG_LAZY) > 0;
|
||||||
gboolean is_lazy;
|
gboolean is_lazy;
|
||||||
char *version_conflict = NULL;
|
char *version_conflict = NULL;
|
||||||
@ -1814,8 +1814,8 @@ require_internal (GIRepository *repository,
|
|||||||
*/
|
*/
|
||||||
GITypelib *
|
GITypelib *
|
||||||
gi_repository_require (GIRepository *repository,
|
gi_repository_require (GIRepository *repository,
|
||||||
const gchar *namespace,
|
const char *namespace,
|
||||||
const gchar *version,
|
const char *version,
|
||||||
GIRepositoryLoadFlags flags,
|
GIRepositoryLoadFlags flags,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -1853,9 +1853,9 @@ gi_repository_require (GIRepository *repository,
|
|||||||
*/
|
*/
|
||||||
GITypelib *
|
GITypelib *
|
||||||
gi_repository_require_private (GIRepository *repository,
|
gi_repository_require_private (GIRepository *repository,
|
||||||
const gchar *typelib_dir,
|
const char *typelib_dir,
|
||||||
const gchar *namespace,
|
const char *namespace,
|
||||||
const gchar *version,
|
const char *version,
|
||||||
GIRepositoryLoadFlags flags,
|
GIRepositoryLoadFlags flags,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -1931,7 +1931,7 @@ gi_repository_error_quark (void)
|
|||||||
* Returns: the string
|
* Returns: the string
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar*
|
const char *
|
||||||
gi_type_tag_to_string (GITypeTag type)
|
gi_type_tag_to_string (GITypeTag type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -1994,7 +1994,7 @@ gi_type_tag_to_string (GITypeTag type)
|
|||||||
* Returns: the string
|
* Returns: the string
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar*
|
const char *
|
||||||
gi_info_type_to_string (GIInfoType type)
|
gi_info_type_to_string (GIInfoType type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@ -119,44 +119,44 @@ const char * gi_repository_load_typelib (GIRepository *repository,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_repository_is_registered (GIRepository *repository,
|
gboolean gi_repository_is_registered (GIRepository *repository,
|
||||||
const gchar *namespace_,
|
const char *namespace_,
|
||||||
const gchar *version);
|
const char *version);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIBaseInfo * gi_repository_find_by_name (GIRepository *repository,
|
GIBaseInfo * gi_repository_find_by_name (GIRepository *repository,
|
||||||
const gchar *namespace_,
|
const char *namespace_,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
char ** gi_repository_enumerate_versions (GIRepository *repository,
|
char ** gi_repository_enumerate_versions (GIRepository *repository,
|
||||||
const gchar *namespace_,
|
const char *namespace_,
|
||||||
size_t *n_versions_out);
|
size_t *n_versions_out);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GITypelib * gi_repository_require (GIRepository *repository,
|
GITypelib * gi_repository_require (GIRepository *repository,
|
||||||
const gchar *namespace_,
|
const char *namespace_,
|
||||||
const gchar *version,
|
const char *version,
|
||||||
GIRepositoryLoadFlags flags,
|
GIRepositoryLoadFlags flags,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GITypelib * gi_repository_require_private (GIRepository *repository,
|
GITypelib * gi_repository_require_private (GIRepository *repository,
|
||||||
const gchar *typelib_dir,
|
const char *typelib_dir,
|
||||||
const gchar *namespace_,
|
const char *namespace_,
|
||||||
const gchar *version,
|
const char *version,
|
||||||
GIRepositoryLoadFlags flags,
|
GIRepositoryLoadFlags flags,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gchar ** gi_repository_get_immediate_dependencies (GIRepository *repository,
|
char ** gi_repository_get_immediate_dependencies (GIRepository *repository,
|
||||||
const gchar *namespace_);
|
const char *namespace_);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gchar ** gi_repository_get_dependencies (GIRepository *repository,
|
char ** gi_repository_get_dependencies (GIRepository *repository,
|
||||||
const gchar *namespace_);
|
const char *namespace_);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gchar ** gi_repository_get_loaded_namespaces (GIRepository *repository);
|
char ** gi_repository_get_loaded_namespaces (GIRepository *repository);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIBaseInfo * gi_repository_find_by_gtype (GIRepository *repository,
|
GIBaseInfo * gi_repository_find_by_gtype (GIRepository *repository,
|
||||||
@ -170,11 +170,11 @@ void gi_repository_get_object_gtype_interfaces (GIRepository *repo
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
guint gi_repository_get_n_infos (GIRepository *repository,
|
guint gi_repository_get_n_infos (GIRepository *repository,
|
||||||
const gchar *namespace_);
|
const char *namespace_);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIBaseInfo * gi_repository_get_info (GIRepository *repository,
|
GIBaseInfo * gi_repository_get_info (GIRepository *repository,
|
||||||
const gchar *namespace_,
|
const char *namespace_,
|
||||||
guint idx);
|
guint idx);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
@ -182,18 +182,18 @@ GIEnumInfo * gi_repository_find_by_error_domain (GIRepository *repository,
|
|||||||
GQuark domain);
|
GQuark domain);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_repository_get_typelib_path (GIRepository *repository,
|
const char * gi_repository_get_typelib_path (GIRepository *repository,
|
||||||
const gchar *namespace_);
|
const char *namespace_);
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * const *gi_repository_get_shared_libraries (GIRepository *repository,
|
const char * const *gi_repository_get_shared_libraries (GIRepository *repository,
|
||||||
const gchar *namespace_,
|
const char *namespace_,
|
||||||
size_t *out_n_elements);
|
size_t *out_n_elements);
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_repository_get_c_prefix (GIRepository *repository,
|
const char * gi_repository_get_c_prefix (GIRepository *repository,
|
||||||
const gchar *namespace_);
|
const char *namespace_);
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_repository_get_version (GIRepository *repository,
|
const char * gi_repository_get_version (GIRepository *repository,
|
||||||
const gchar *namespace_);
|
const char *namespace_);
|
||||||
|
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
|
@ -43,10 +43,10 @@ struct _GIIrTypelibBuild {
|
|||||||
|
|
||||||
struct _GIIrModule
|
struct _GIIrModule
|
||||||
{
|
{
|
||||||
gchar *name;
|
char *name;
|
||||||
gchar *version;
|
char *version;
|
||||||
gchar *shared_library;
|
char *shared_library;
|
||||||
gchar *c_prefix;
|
char *c_prefix;
|
||||||
GList *dependencies;
|
GList *dependencies;
|
||||||
GList *entries;
|
GList *entries;
|
||||||
|
|
||||||
@ -66,10 +66,10 @@ struct _GIIrModule
|
|||||||
GHashTable *disguised_structures;
|
GHashTable *disguised_structures;
|
||||||
};
|
};
|
||||||
|
|
||||||
GIIrModule *gi_ir_module_new (const gchar *name,
|
GIIrModule *gi_ir_module_new (const char *name,
|
||||||
const gchar *nsversion,
|
const char *nsversion,
|
||||||
const gchar *module_filename,
|
const char *module_filename,
|
||||||
const gchar *c_prefix);
|
const char *c_prefix);
|
||||||
void gi_ir_module_free (GIIrModule *module);
|
void gi_ir_module_free (GIIrModule *module);
|
||||||
|
|
||||||
void gi_ir_module_add_include_module (GIIrModule *module,
|
void gi_ir_module_add_include_module (GIIrModule *module,
|
||||||
|
@ -38,10 +38,10 @@
|
|||||||
#define NUM_SECTIONS 2
|
#define NUM_SECTIONS 2
|
||||||
|
|
||||||
GIIrModule *
|
GIIrModule *
|
||||||
gi_ir_module_new (const gchar *name,
|
gi_ir_module_new (const char *name,
|
||||||
const gchar *version,
|
const char *version,
|
||||||
const gchar *shared_library,
|
const char *shared_library,
|
||||||
const gchar *c_prefix)
|
const char *c_prefix)
|
||||||
{
|
{
|
||||||
GIIrModule *module;
|
GIIrModule *module;
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ typedef enum
|
|||||||
struct _GIIrNode
|
struct _GIIrNode
|
||||||
{
|
{
|
||||||
GIIrNodeTypeId type;
|
GIIrNodeTypeId type;
|
||||||
gchar *name;
|
char *name;
|
||||||
GIIrModule *module;
|
GIIrModule *module;
|
||||||
|
|
||||||
guint32 offset; /* Assigned as we build the typelib */
|
guint32 offset; /* Assigned as we build the typelib */
|
||||||
@ -85,7 +85,7 @@ struct _GIIrNodeXRef
|
|||||||
{
|
{
|
||||||
GIIrNode node;
|
GIIrNode node;
|
||||||
|
|
||||||
gchar *namespace;
|
char *namespace;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GIIrNodeFunction
|
struct _GIIrNodeFunction
|
||||||
@ -103,7 +103,7 @@ struct _GIIrNodeFunction
|
|||||||
gboolean throws;
|
gboolean throws;
|
||||||
gboolean instance_transfer_full;
|
gboolean instance_transfer_full;
|
||||||
|
|
||||||
gchar *symbol;
|
char *symbol;
|
||||||
char *property;
|
char *property;
|
||||||
|
|
||||||
GIIrNodeParam *result;
|
GIIrNodeParam *result;
|
||||||
@ -124,7 +124,7 @@ struct _GIIrNodeType
|
|||||||
gboolean is_error;
|
gboolean is_error;
|
||||||
gint tag;
|
gint tag;
|
||||||
|
|
||||||
gchar *unparsed;
|
char *unparsed;
|
||||||
|
|
||||||
gboolean zero_terminated;
|
gboolean zero_terminated;
|
||||||
gboolean has_length;
|
gboolean has_length;
|
||||||
@ -136,8 +136,8 @@ struct _GIIrNodeType
|
|||||||
GIIrNodeType *parameter_type1;
|
GIIrNodeType *parameter_type1;
|
||||||
GIIrNodeType *parameter_type2;
|
GIIrNodeType *parameter_type2;
|
||||||
|
|
||||||
gchar *giinterface;
|
char *giinterface;
|
||||||
gchar **errors;
|
char **errors;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GIIrNodeParam
|
struct _GIIrNodeParam
|
||||||
@ -167,7 +167,7 @@ struct _GIIrNodeProperty
|
|||||||
|
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
|
|
||||||
gchar *name;
|
char *name;
|
||||||
gboolean readable;
|
gboolean readable;
|
||||||
gboolean writable;
|
gboolean writable;
|
||||||
gboolean construct;
|
gboolean construct;
|
||||||
@ -247,16 +247,16 @@ struct _GIIrNodeInterface
|
|||||||
gboolean fundamental;
|
gboolean fundamental;
|
||||||
gboolean final_;
|
gboolean final_;
|
||||||
|
|
||||||
gchar *gtype_name;
|
char *gtype_name;
|
||||||
gchar *gtype_init;
|
char *gtype_init;
|
||||||
|
|
||||||
gchar *ref_func;
|
char *ref_func;
|
||||||
gchar *unref_func;
|
char *unref_func;
|
||||||
gchar *set_value_func;
|
char *set_value_func;
|
||||||
gchar *get_value_func;
|
char *get_value_func;
|
||||||
|
|
||||||
gchar *parent;
|
char *parent;
|
||||||
gchar *glib_type_struct;
|
char *glib_type_struct;
|
||||||
|
|
||||||
GList *interfaces;
|
GList *interfaces;
|
||||||
GList *prerequisites;
|
GList *prerequisites;
|
||||||
@ -284,7 +284,7 @@ struct _GIIrNodeConstant
|
|||||||
|
|
||||||
GIIrNodeType *type;
|
GIIrNodeType *type;
|
||||||
|
|
||||||
gchar *value;
|
char *value;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GIIrNodeEnum
|
struct _GIIrNodeEnum
|
||||||
@ -294,9 +294,9 @@ struct _GIIrNodeEnum
|
|||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
gint storage_type;
|
gint storage_type;
|
||||||
|
|
||||||
gchar *gtype_name;
|
char *gtype_name;
|
||||||
gchar *gtype_init;
|
char *gtype_init;
|
||||||
gchar *error_domain;
|
char *error_domain;
|
||||||
|
|
||||||
GList *values;
|
GList *values;
|
||||||
GList *methods;
|
GList *methods;
|
||||||
@ -308,8 +308,8 @@ struct _GIIrNodeBoxed
|
|||||||
|
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
|
|
||||||
gchar *gtype_name;
|
char *gtype_name;
|
||||||
gchar *gtype_init;
|
char *gtype_init;
|
||||||
|
|
||||||
gint alignment;
|
gint alignment;
|
||||||
gint size;
|
gint size;
|
||||||
@ -328,11 +328,11 @@ struct _GIIrNodeStruct
|
|||||||
gboolean is_gtype_struct;
|
gboolean is_gtype_struct;
|
||||||
gboolean foreign;
|
gboolean foreign;
|
||||||
|
|
||||||
gchar *gtype_name;
|
char *gtype_name;
|
||||||
gchar *gtype_init;
|
char *gtype_init;
|
||||||
|
|
||||||
gchar *copy_func;
|
char *copy_func;
|
||||||
gchar *free_func;
|
char *free_func;
|
||||||
|
|
||||||
gint alignment;
|
gint alignment;
|
||||||
gint size;
|
gint size;
|
||||||
@ -349,11 +349,11 @@ struct _GIIrNodeUnion
|
|||||||
GList *members;
|
GList *members;
|
||||||
GList *discriminators;
|
GList *discriminators;
|
||||||
|
|
||||||
gchar *gtype_name;
|
char *gtype_name;
|
||||||
gchar *gtype_init;
|
char *gtype_init;
|
||||||
|
|
||||||
gchar *copy_func;
|
char *copy_func;
|
||||||
gchar *free_func;
|
char *free_func;
|
||||||
|
|
||||||
gint alignment;
|
gint alignment;
|
||||||
gint size;
|
gint size;
|
||||||
@ -379,13 +379,13 @@ int gi_ir_node_cmp (GIIrNode *node,
|
|||||||
gboolean gi_ir_node_can_have_member (GIIrNode *node);
|
gboolean gi_ir_node_can_have_member (GIIrNode *node);
|
||||||
void gi_ir_node_add_member (GIIrNode *node,
|
void gi_ir_node_add_member (GIIrNode *node,
|
||||||
GIIrNodeFunction *member);
|
GIIrNodeFunction *member);
|
||||||
guint32 gi_ir_write_string (const gchar *str,
|
guint32 gi_ir_write_string (const char *str,
|
||||||
GHashTable *strings,
|
GHashTable *strings,
|
||||||
guchar *data,
|
guchar *data,
|
||||||
guint32 *offset);
|
guint32 *offset);
|
||||||
|
|
||||||
const gchar * gi_ir_node_param_direction_string (GIIrNodeParam * node);
|
const char * gi_ir_node_param_direction_string (GIIrNodeParam * node);
|
||||||
const gchar * gi_ir_node_type_to_string (GIIrNodeTypeId type);
|
const char * gi_ir_node_type_to_string (GIIrNodeTypeId type);
|
||||||
|
|
||||||
GIIrNode *gi_ir_find_node (GIIrTypelibBuild *build,
|
GIIrNode *gi_ir_find_node (GIIrTypelibBuild *build,
|
||||||
GIIrModule *module,
|
GIIrModule *module,
|
||||||
|
@ -74,7 +74,7 @@ do { \
|
|||||||
(( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
|
(( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
|
||||||
|
|
||||||
|
|
||||||
const gchar *
|
const char *
|
||||||
gi_ir_node_type_to_string (GIIrNodeTypeId type)
|
gi_ir_node_type_to_string (GIIrNodeTypeId type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -573,8 +573,8 @@ gi_ir_node_get_size (GIIrNode *node)
|
|||||||
static void
|
static void
|
||||||
add_attribute_size (gpointer key, gpointer value, gpointer data)
|
add_attribute_size (gpointer key, gpointer value, gpointer data)
|
||||||
{
|
{
|
||||||
const gchar *key_str = key;
|
const char *key_str = key;
|
||||||
const gchar *value_str = value;
|
const char *value_str = value;
|
||||||
gint *size_p = data;
|
gint *size_p = data;
|
||||||
|
|
||||||
*size_p += sizeof (AttributeBlob);
|
*size_p += sizeof (AttributeBlob);
|
||||||
@ -996,7 +996,7 @@ gi_ir_node_add_member (GIIrNode *node,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const gchar *
|
const char *
|
||||||
gi_ir_node_param_direction_string (GIIrNodeParam * node)
|
gi_ir_node_param_direction_string (GIIrNodeParam * node)
|
||||||
{
|
{
|
||||||
if (node->out)
|
if (node->out)
|
||||||
@ -1010,25 +1010,25 @@ gi_ir_node_param_direction_string (GIIrNodeParam * node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gint64
|
static gint64
|
||||||
parse_int_value (const gchar *str)
|
parse_int_value (const char *str)
|
||||||
{
|
{
|
||||||
return g_ascii_strtoll (str, NULL, 0);
|
return g_ascii_strtoll (str, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint64
|
static guint64
|
||||||
parse_uint_value (const gchar *str)
|
parse_uint_value (const char *str)
|
||||||
{
|
{
|
||||||
return g_ascii_strtoull (str, NULL, 0);
|
return g_ascii_strtoull (str, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gdouble
|
static gdouble
|
||||||
parse_float_value (const gchar *str)
|
parse_float_value (const char *str)
|
||||||
{
|
{
|
||||||
return g_ascii_strtod (str, NULL);
|
return g_ascii_strtod (str, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
parse_boolean_value (const gchar *str)
|
parse_boolean_value (const char *str)
|
||||||
{
|
{
|
||||||
if (g_ascii_strcasecmp (str, "TRUE") == 0)
|
if (g_ascii_strcasecmp (str, "TRUE") == 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1041,15 +1041,15 @@ parse_boolean_value (const gchar *str)
|
|||||||
|
|
||||||
static GIIrNode *
|
static GIIrNode *
|
||||||
find_entry_node (GIIrTypelibBuild *build,
|
find_entry_node (GIIrTypelibBuild *build,
|
||||||
const gchar *name,
|
const char *name,
|
||||||
guint16 *idx)
|
guint16 *idx)
|
||||||
|
|
||||||
{
|
{
|
||||||
GIIrModule *module = build->module;
|
GIIrModule *module = build->module;
|
||||||
GList *l;
|
GList *l;
|
||||||
gint i;
|
gint i;
|
||||||
gchar **names;
|
|
||||||
gint n_names;
|
gint n_names;
|
||||||
|
char **names;
|
||||||
GIIrNode *result = NULL;
|
GIIrNode *result = NULL;
|
||||||
|
|
||||||
g_assert (name != NULL);
|
g_assert (name != NULL);
|
||||||
@ -1114,7 +1114,7 @@ find_entry_node (GIIrTypelibBuild *build,
|
|||||||
|
|
||||||
static guint16
|
static guint16
|
||||||
find_entry (GIIrTypelibBuild *build,
|
find_entry (GIIrTypelibBuild *build,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
guint16 idx = 0;
|
guint16 idx = 0;
|
||||||
|
|
||||||
@ -1271,7 +1271,7 @@ serialize_type (GIIrTypelibBuild *build,
|
|||||||
else if (node->tag == GI_TYPE_TAG_INTERFACE)
|
else if (node->tag == GI_TYPE_TAG_INTERFACE)
|
||||||
{
|
{
|
||||||
GIIrNode *iface;
|
GIIrNode *iface;
|
||||||
gchar *name;
|
char *name;
|
||||||
|
|
||||||
iface = find_entry_node (build, node->giinterface, NULL);
|
iface = find_entry_node (build, node->giinterface, NULL);
|
||||||
if (iface)
|
if (iface)
|
||||||
@ -1455,7 +1455,7 @@ gi_ir_node_build_typelib (GIIrNode *node,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
GString *str;
|
GString *str;
|
||||||
gchar *s;
|
char *s;
|
||||||
gpointer value;
|
gpointer value;
|
||||||
|
|
||||||
str = g_string_new (0);
|
str = g_string_new (0);
|
||||||
@ -2204,7 +2204,7 @@ gi_ir_node_build_typelib (GIIrNode *node,
|
|||||||
for (l = object->interfaces; l; l = l->next)
|
for (l = object->interfaces; l; l = l->next)
|
||||||
{
|
{
|
||||||
blob->n_interfaces++;
|
blob->n_interfaces++;
|
||||||
*(guint16*)&data[*offset] = find_entry (build, (gchar *)l->data);
|
*(guint16*)&data[*offset] = find_entry (build, (char *)l->data);
|
||||||
*offset += 2;
|
*offset += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2267,7 +2267,7 @@ gi_ir_node_build_typelib (GIIrNode *node,
|
|||||||
for (l = iface->prerequisites; l; l = l->next)
|
for (l = iface->prerequisites; l; l = l->next)
|
||||||
{
|
{
|
||||||
blob->n_prerequisites++;
|
blob->n_prerequisites++;
|
||||||
*(guint16*)&data[*offset] = find_entry (build, (gchar *)l->data);
|
*(guint16*)&data[*offset] = find_entry (build, (char *)l->data);
|
||||||
*offset += 2;
|
*offset += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2412,7 +2412,7 @@ gi_ir_node_build_typelib (GIIrNode *node,
|
|||||||
* typelib is not large enough to hold the string, reallocate it.
|
* typelib is not large enough to hold the string, reallocate it.
|
||||||
*/
|
*/
|
||||||
guint32
|
guint32
|
||||||
gi_ir_write_string (const gchar *str,
|
gi_ir_write_string (const char *str,
|
||||||
GHashTable *strings,
|
GHashTable *strings,
|
||||||
guchar *data,
|
guchar *data,
|
||||||
guint32 *offset)
|
guint32 *offset)
|
||||||
@ -2436,7 +2436,7 @@ gi_ir_write_string (const gchar *str,
|
|||||||
start = *offset;
|
start = *offset;
|
||||||
*offset = ALIGN_VALUE (start + strlen (str) + 1, 4);
|
*offset = ALIGN_VALUE (start + strlen (str) + 1, 4);
|
||||||
|
|
||||||
strcpy ((gchar*)&data[start], str);
|
strcpy ((char *)&data[start], str);
|
||||||
|
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ get_field_size_alignment (GIIrTypelibBuild *build,
|
|||||||
gint *alignment)
|
gint *alignment)
|
||||||
{
|
{
|
||||||
GIIrModule *module = build->module;
|
GIIrModule *module = build->module;
|
||||||
gchar *who;
|
char *who;
|
||||||
gboolean success;
|
gboolean success;
|
||||||
|
|
||||||
who = g_strdup_printf ("field %s.%s.%s", module->name, parent_node->name, ((GIIrNode *)field)->name);
|
who = g_strdup_printf ("field %s.%s.%s", module->name, parent_node->name, ((GIIrNode *)field)->name);
|
||||||
|
@ -34,16 +34,16 @@ typedef struct _GIIrParser GIIrParser;
|
|||||||
GIIrParser *gi_ir_parser_new (void);
|
GIIrParser *gi_ir_parser_new (void);
|
||||||
void gi_ir_parser_free (GIIrParser *parser);
|
void gi_ir_parser_free (GIIrParser *parser);
|
||||||
void gi_ir_parser_set_includes (GIIrParser *parser,
|
void gi_ir_parser_set_includes (GIIrParser *parser,
|
||||||
const gchar *const *includes);
|
const char *const *includes);
|
||||||
|
|
||||||
GIIrModule *gi_ir_parser_parse_string (GIIrParser *parser,
|
GIIrModule *gi_ir_parser_parse_string (GIIrParser *parser,
|
||||||
const gchar *namespace,
|
const char *namespace,
|
||||||
const gchar *filename,
|
const char *filename,
|
||||||
const gchar *buffer,
|
const char *buffer,
|
||||||
gssize length,
|
gssize length,
|
||||||
GError **error);
|
GError **error);
|
||||||
GIIrModule *gi_ir_parser_parse_file (GIIrParser *parser,
|
GIIrModule *gi_ir_parser_parse_file (GIIrParser *parser,
|
||||||
const gchar *filename,
|
const char *filename,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -58,8 +58,8 @@
|
|||||||
|
|
||||||
struct _GIIrParser
|
struct _GIIrParser
|
||||||
{
|
{
|
||||||
gchar **includes;
|
char **includes;
|
||||||
gchar **gi_gir_path;
|
char **gi_gir_path;
|
||||||
GList *parsed_modules; /* All previously parsed modules */
|
GList *parsed_modules; /* All previously parsed modules */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -133,17 +133,17 @@ struct _ParseContext
|
|||||||
#define CURRENT_NODE(ctx) ((GIIrNode *)((ctx)->node_stack->data))
|
#define CURRENT_NODE(ctx) ((GIIrNode *)((ctx)->node_stack->data))
|
||||||
|
|
||||||
static void start_element_handler (GMarkupParseContext *context,
|
static void start_element_handler (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
void *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 char *element_name,
|
||||||
void *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 char *text,
|
||||||
gsize text_len,
|
gsize text_len,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
@ -164,22 +164,22 @@ static GMarkupParser markup_parser =
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_alias (GMarkupParseContext *context,
|
start_alias (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error);
|
GError **error);
|
||||||
static gboolean
|
static gboolean
|
||||||
start_type (GMarkupParseContext *context,
|
start_type (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
static const gchar *find_attribute (const gchar *name,
|
static const char *find_attribute (const char *name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values);
|
const char **attribute_values);
|
||||||
|
|
||||||
|
|
||||||
GIIrParser *
|
GIIrParser *
|
||||||
@ -210,7 +210,7 @@ gi_ir_parser_free (GIIrParser *parser)
|
|||||||
|
|
||||||
void
|
void
|
||||||
gi_ir_parser_set_includes (GIIrParser *parser,
|
gi_ir_parser_set_includes (GIIrParser *parser,
|
||||||
const gchar *const *includes)
|
const char *const *includes)
|
||||||
{
|
{
|
||||||
g_strfreev (parser->includes);
|
g_strfreev (parser->includes);
|
||||||
|
|
||||||
@ -219,9 +219,9 @@ gi_ir_parser_set_includes (GIIrParser *parser,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
firstpass_start_element_handler (GMarkupParseContext *context,
|
firstpass_start_element_handler (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -239,9 +239,9 @@ firstpass_start_element_handler (GMarkupParseContext *context,
|
|||||||
}
|
}
|
||||||
else if (strcmp (element_name, "record") == 0)
|
else if (strcmp (element_name, "record") == 0)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *disguised;
|
const char *disguised;
|
||||||
const gchar *pointer;
|
const char *pointer;
|
||||||
|
|
||||||
name = find_attribute ("name", attribute_names, attribute_values);
|
name = find_attribute ("name", attribute_names, attribute_values);
|
||||||
disguised = find_attribute ("disguised", attribute_names, attribute_values);
|
disguised = find_attribute ("disguised", attribute_names, attribute_values);
|
||||||
@ -266,7 +266,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 char *element_name,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -294,8 +294,8 @@ static char *
|
|||||||
locate_gir (GIIrParser *parser,
|
locate_gir (GIIrParser *parser,
|
||||||
const char *girname)
|
const char *girname)
|
||||||
{
|
{
|
||||||
const gchar *const *datadirs;
|
const char *const *datadirs;
|
||||||
const gchar *const *dir;
|
const char *const *dir;
|
||||||
char *path = NULL;
|
char *path = NULL;
|
||||||
|
|
||||||
g_debug ("Looking for %s", girname);
|
g_debug ("Looking for %s", girname);
|
||||||
@ -303,7 +303,7 @@ locate_gir (GIIrParser *parser,
|
|||||||
|
|
||||||
if (parser->includes != NULL)
|
if (parser->includes != NULL)
|
||||||
{
|
{
|
||||||
for (dir = (const gchar *const *)parser->includes; *dir; dir++)
|
for (dir = (const char *const *)parser->includes; *dir; dir++)
|
||||||
{
|
{
|
||||||
path = g_build_filename (*dir, girname, NULL);
|
path = g_build_filename (*dir, girname, NULL);
|
||||||
g_debug ("Trying %s from includes", path);
|
g_debug ("Trying %s from includes", path);
|
||||||
@ -315,7 +315,7 @@ locate_gir (GIIrParser *parser,
|
|||||||
|
|
||||||
if (parser->gi_gir_path != NULL)
|
if (parser->gi_gir_path != NULL)
|
||||||
{
|
{
|
||||||
for (dir = (const gchar *const *) parser->gi_gir_path; *dir; dir++)
|
for (dir = (const char *const *) parser->gi_gir_path; *dir; dir++)
|
||||||
{
|
{
|
||||||
if (**dir == '\0')
|
if (**dir == '\0')
|
||||||
continue;
|
continue;
|
||||||
@ -378,10 +378,10 @@ locate_gir (GIIrParser *parser,
|
|||||||
line_number, char_number, attribute, element); \
|
line_number, char_number, attribute, element); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static const gchar *
|
static const char *
|
||||||
find_attribute (const gchar *name,
|
find_attribute (const char *name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values)
|
const char **attribute_values)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
@ -428,11 +428,13 @@ push_node (ParseContext *ctx, GIIrNode *node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GIIrNodeType * parse_type_internal (GIIrModule *module,
|
static GIIrNodeType * parse_type_internal (GIIrModule *module,
|
||||||
const gchar *str, gchar **next, gboolean in_glib,
|
const char *str,
|
||||||
|
char **next,
|
||||||
|
gboolean in_glib,
|
||||||
gboolean in_gobject);
|
gboolean in_gobject);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const gchar *str;
|
const char *str;
|
||||||
guint size;
|
guint size;
|
||||||
guint is_signed : 1;
|
guint is_signed : 1;
|
||||||
} IntegerAliasInfo;
|
} IntegerAliasInfo;
|
||||||
@ -453,7 +455,7 @@ static IntegerAliasInfo integer_aliases[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const gchar *str;
|
const char *str;
|
||||||
gint tag;
|
gint tag;
|
||||||
gboolean pointer;
|
gboolean pointer;
|
||||||
} BasicTypeInfo;
|
} BasicTypeInfo;
|
||||||
@ -532,7 +534,7 @@ parse_basic (const char *str)
|
|||||||
|
|
||||||
static GIIrNodeType *
|
static GIIrNodeType *
|
||||||
parse_type_internal (GIIrModule *module,
|
parse_type_internal (GIIrModule *module,
|
||||||
const gchar *str,
|
const char *str,
|
||||||
char **next,
|
char **next,
|
||||||
gboolean in_glib,
|
gboolean in_glib,
|
||||||
gboolean in_gobject)
|
gboolean in_gobject)
|
||||||
@ -676,13 +678,13 @@ parse_type_internal (GIIrModule *module,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
resolve_aliases (ParseContext *ctx, const gchar *type)
|
resolve_aliases (ParseContext *ctx, const char *type)
|
||||||
{
|
{
|
||||||
void *orig;
|
void *orig;
|
||||||
void *value;
|
void *value;
|
||||||
GSList *seen_values = NULL;
|
GSList *seen_values = NULL;
|
||||||
const gchar *lookup;
|
const char *lookup;
|
||||||
gchar *prefixed;
|
char *prefixed;
|
||||||
|
|
||||||
if (strchr (type, '.') == NULL)
|
if (strchr (type, '.') == NULL)
|
||||||
{
|
{
|
||||||
@ -717,12 +719,12 @@ resolve_aliases (ParseContext *ctx, const gchar *type)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
is_pointer_or_disguised_structure (ParseContext *ctx,
|
is_pointer_or_disguised_structure (ParseContext *ctx,
|
||||||
const gchar *type,
|
const char *type,
|
||||||
gboolean *is_pointer,
|
gboolean *is_pointer,
|
||||||
gboolean *is_disguised)
|
gboolean *is_disguised)
|
||||||
{
|
{
|
||||||
const gchar *lookup;
|
const char *lookup;
|
||||||
gchar *prefixed;
|
char *prefixed;
|
||||||
|
|
||||||
if (strchr (type, '.') == NULL)
|
if (strchr (type, '.') == NULL)
|
||||||
{
|
{
|
||||||
@ -744,7 +746,7 @@ is_pointer_or_disguised_structure (ParseContext *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GIIrNodeType *
|
static GIIrNodeType *
|
||||||
parse_type (ParseContext *ctx, const gchar *type)
|
parse_type (ParseContext *ctx, const char *type)
|
||||||
{
|
{
|
||||||
GIIrNodeType *node;
|
GIIrNodeType *node;
|
||||||
const BasicTypeInfo *basic;
|
const BasicTypeInfo *basic;
|
||||||
@ -769,13 +771,13 @@ parse_type (ParseContext *ctx, const gchar *type)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
introspectable_prelude (GMarkupParseContext *context,
|
introspectable_prelude (GMarkupParseContext *context,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
ParseState new_state)
|
ParseState new_state)
|
||||||
{
|
{
|
||||||
const gchar *introspectable_arg;
|
const char *introspectable_arg;
|
||||||
const gchar *shadowed_by;
|
const char *shadowed_by;
|
||||||
gboolean introspectable;
|
gboolean introspectable;
|
||||||
|
|
||||||
g_assert (ctx->state != STATE_PASSTHROUGH);
|
g_assert (ctx->state != STATE_PASSTHROUGH);
|
||||||
@ -795,16 +797,16 @@ introspectable_prelude (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_glib_boxed (GMarkupParseContext *context,
|
start_glib_boxed (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *typename;
|
const char *typename;
|
||||||
const gchar *typeinit;
|
const char *typeinit;
|
||||||
const gchar *deprecated;
|
const char *deprecated;
|
||||||
GIIrNodeBoxed *boxed;
|
GIIrNodeBoxed *boxed;
|
||||||
|
|
||||||
if (!(strcmp (element_name, "glib:boxed") == 0 &&
|
if (!(strcmp (element_name, "glib:boxed") == 0 &&
|
||||||
@ -855,19 +857,19 @@ start_glib_boxed (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_function (GMarkupParseContext *context,
|
start_function (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *shadows;
|
const char *shadows;
|
||||||
const gchar *symbol;
|
const char *symbol;
|
||||||
const gchar *deprecated;
|
const char *deprecated;
|
||||||
const gchar *throws;
|
const char *throws;
|
||||||
const gchar *set_property;
|
const char *set_property;
|
||||||
const gchar *get_property;
|
const char *get_property;
|
||||||
GIIrNodeFunction *function;
|
GIIrNodeFunction *function;
|
||||||
gboolean found = FALSE;
|
gboolean found = FALSE;
|
||||||
ParseState in_embedded_state = STATE_NONE;
|
ParseState in_embedded_state = STATE_NONE;
|
||||||
@ -1055,7 +1057,7 @@ start_function (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
parse_property_transfer (GIIrNodeProperty *property,
|
parse_property_transfer (GIIrNodeProperty *property,
|
||||||
const gchar *transfer,
|
const char *transfer,
|
||||||
ParseContext *ctx)
|
ParseContext *ctx)
|
||||||
{
|
{
|
||||||
if (transfer == NULL)
|
if (transfer == NULL)
|
||||||
@ -1095,7 +1097,7 @@ parse_property_transfer (GIIrNodeProperty *property,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
parse_param_transfer (GIIrNodeParam *param, const gchar *transfer, const gchar *name,
|
parse_param_transfer (GIIrNodeParam *param, const char *transfer, const char *name,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
if (transfer == NULL)
|
if (transfer == NULL)
|
||||||
@ -1132,13 +1134,13 @@ parse_param_transfer (GIIrNodeParam *param, const gchar *transfer, const gchar *
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_instance_parameter (GMarkupParseContext *context,
|
start_instance_parameter (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *transfer;
|
const char *transfer;
|
||||||
gboolean transfer_full;
|
gboolean transfer_full;
|
||||||
|
|
||||||
if (!(strcmp (element_name, "instance-parameter") == 0 &&
|
if (!(strcmp (element_name, "instance-parameter") == 0 &&
|
||||||
@ -1197,24 +1199,24 @@ start_instance_parameter (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_parameter (GMarkupParseContext *context,
|
start_parameter (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *direction;
|
const char *direction;
|
||||||
const gchar *retval;
|
const char *retval;
|
||||||
const gchar *optional;
|
const char *optional;
|
||||||
const gchar *caller_allocates;
|
const char *caller_allocates;
|
||||||
const gchar *allow_none;
|
const char *allow_none;
|
||||||
const gchar *transfer;
|
const char *transfer;
|
||||||
const gchar *scope;
|
const char *scope;
|
||||||
const gchar *closure;
|
const char *closure;
|
||||||
const gchar *destroy;
|
const char *destroy;
|
||||||
const gchar *skip;
|
const char *skip;
|
||||||
const gchar *nullable;
|
const char *nullable;
|
||||||
GIIrNodeParam *param;
|
GIIrNodeParam *param;
|
||||||
|
|
||||||
if (!(strcmp (element_name, "parameter") == 0 &&
|
if (!(strcmp (element_name, "parameter") == 0 &&
|
||||||
@ -1350,17 +1352,17 @@ start_parameter (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_field (GMarkupParseContext *context,
|
start_field (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *readable;
|
const char *readable;
|
||||||
const gchar *writable;
|
const char *writable;
|
||||||
const gchar *bits;
|
const char *bits;
|
||||||
const gchar *branch;
|
const char *branch;
|
||||||
GIIrNodeField *field;
|
GIIrNodeField *field;
|
||||||
ParseState target_state;
|
ParseState target_state;
|
||||||
gboolean introspectable;
|
gboolean introspectable;
|
||||||
@ -1495,13 +1497,13 @@ start_field (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_alias (GMarkupParseContext *context,
|
start_alias (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
|
|
||||||
name = find_attribute ("name", attribute_names, attribute_values);
|
name = find_attribute ("name", attribute_names, attribute_values);
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
@ -1518,17 +1520,17 @@ start_alias (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_enum (GMarkupParseContext *context,
|
start_enum (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *typename;
|
const char *typename;
|
||||||
const gchar *typeinit;
|
const char *typeinit;
|
||||||
const gchar *deprecated;
|
const char *deprecated;
|
||||||
const gchar *error_domain;
|
const char *error_domain;
|
||||||
GIIrNodeEnum *enum_;
|
GIIrNodeEnum *enum_;
|
||||||
|
|
||||||
if (!((strcmp (element_name, "enumeration") == 0 && ctx->state == STATE_NAMESPACE) ||
|
if (!((strcmp (element_name, "enumeration") == 0 && ctx->state == STATE_NAMESPACE) ||
|
||||||
@ -1575,21 +1577,21 @@ start_enum (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_property (GMarkupParseContext *context,
|
start_property (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
ParseState target_state;
|
ParseState target_state;
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *readable;
|
const char *readable;
|
||||||
const gchar *writable;
|
const char *writable;
|
||||||
const gchar *construct;
|
const char *construct;
|
||||||
const gchar *construct_only;
|
const char *construct_only;
|
||||||
const gchar *transfer;
|
const char *transfer;
|
||||||
const gchar *setter;
|
const char *setter;
|
||||||
const gchar *getter;
|
const char *getter;
|
||||||
GIIrNodeProperty *property;
|
GIIrNodeProperty *property;
|
||||||
GIIrNodeInterface *iface;
|
GIIrNodeInterface *iface;
|
||||||
|
|
||||||
@ -1660,9 +1662,9 @@ start_property (GMarkupParseContext *context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gint64
|
static gint64
|
||||||
parse_value (const gchar *str)
|
parse_value (const char *str)
|
||||||
{
|
{
|
||||||
gchar *shift_op;
|
char *shift_op;
|
||||||
|
|
||||||
/* FIXME just a quick hack */
|
/* FIXME just a quick hack */
|
||||||
shift_op = strstr (str, "<<");
|
shift_op = strstr (str, "<<");
|
||||||
@ -1684,16 +1686,16 @@ parse_value (const gchar *str)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_member (GMarkupParseContext *context,
|
start_member (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *value;
|
const char *value;
|
||||||
const gchar *deprecated;
|
const char *deprecated;
|
||||||
const gchar *c_identifier;
|
const char *c_identifier;
|
||||||
GIIrNodeEnum *enum_;
|
GIIrNodeEnum *enum_;
|
||||||
GIIrNodeValue *value_;
|
GIIrNodeValue *value_;
|
||||||
|
|
||||||
@ -1736,17 +1738,17 @@ start_member (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_constant (GMarkupParseContext *context,
|
start_constant (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
ParseState prev_state;
|
ParseState prev_state;
|
||||||
ParseState target_state;
|
ParseState target_state;
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *value;
|
const char *value;
|
||||||
const gchar *deprecated;
|
const char *deprecated;
|
||||||
GIIrNodeConstant *constant;
|
GIIrNodeConstant *constant;
|
||||||
|
|
||||||
if (!(strcmp (element_name, "constant") == 0 &&
|
if (!(strcmp (element_name, "constant") == 0 &&
|
||||||
@ -1822,17 +1824,17 @@ start_constant (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_interface (GMarkupParseContext *context,
|
start_interface (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *typename;
|
const char *typename;
|
||||||
const gchar *typeinit;
|
const char *typeinit;
|
||||||
const gchar *deprecated;
|
const char *deprecated;
|
||||||
const gchar *glib_type_struct;
|
const char *glib_type_struct;
|
||||||
GIIrNodeInterface *iface;
|
GIIrNodeInterface *iface;
|
||||||
|
|
||||||
if (!(strcmp (element_name, "interface") == 0 &&
|
if (!(strcmp (element_name, "interface") == 0 &&
|
||||||
@ -1884,25 +1886,25 @@ start_interface (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_class (GMarkupParseContext *context,
|
start_class (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *parent;
|
const char *parent;
|
||||||
const gchar *glib_type_struct;
|
const char *glib_type_struct;
|
||||||
const gchar *typename;
|
const char *typename;
|
||||||
const gchar *typeinit;
|
const char *typeinit;
|
||||||
const gchar *deprecated;
|
const char *deprecated;
|
||||||
const gchar *abstract;
|
const char *abstract;
|
||||||
const gchar *fundamental;
|
const char *fundamental;
|
||||||
const gchar *final;
|
const char *final;
|
||||||
const gchar *ref_func;
|
const char *ref_func;
|
||||||
const gchar *unref_func;
|
const char *unref_func;
|
||||||
const gchar *set_value_func;
|
const char *set_value_func;
|
||||||
const gchar *get_value_func;
|
const char *get_value_func;
|
||||||
GIIrNodeInterface *iface;
|
GIIrNodeInterface *iface;
|
||||||
|
|
||||||
if (!(strcmp (element_name, "class") == 0 &&
|
if (!(strcmp (element_name, "class") == 0 &&
|
||||||
@ -1977,14 +1979,14 @@ start_class (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_type (GMarkupParseContext *context,
|
start_type (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *ctype;
|
const char *ctype;
|
||||||
gboolean in_alias = FALSE;
|
gboolean in_alias = FALSE;
|
||||||
gboolean is_array;
|
gboolean is_array;
|
||||||
gboolean is_varargs;
|
gboolean is_varargs;
|
||||||
@ -2299,14 +2301,14 @@ end_type (ParseContext *ctx)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_attribute (GMarkupParseContext *context,
|
start_attribute (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *value;
|
const char *value;
|
||||||
GIIrNode *curnode;
|
GIIrNode *curnode;
|
||||||
|
|
||||||
if (strcmp (element_name, "attribute") != 0 || ctx->node_stack == NULL)
|
if (strcmp (element_name, "attribute") != 0 || ctx->node_stack == NULL)
|
||||||
@ -2344,16 +2346,16 @@ start_attribute (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_return_value (GMarkupParseContext *context,
|
start_return_value (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GIIrNodeParam *param;
|
GIIrNodeParam *param;
|
||||||
const gchar *transfer;
|
const char *transfer;
|
||||||
const gchar *skip;
|
const char *skip;
|
||||||
const gchar *nullable;
|
const char *nullable;
|
||||||
|
|
||||||
if (!(strcmp (element_name, "return-value") == 0 &&
|
if (!(strcmp (element_name, "return-value") == 0 &&
|
||||||
ctx->state == STATE_FUNCTION))
|
ctx->state == STATE_FUNCTION))
|
||||||
@ -2413,9 +2415,9 @@ start_return_value (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_implements (GMarkupParseContext *context,
|
start_implements (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -2443,19 +2445,19 @@ start_implements (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_glib_signal (GMarkupParseContext *context,
|
start_glib_signal (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *when;
|
const char *when;
|
||||||
const gchar *no_recurse;
|
const char *no_recurse;
|
||||||
const gchar *detailed;
|
const char *detailed;
|
||||||
const gchar *action;
|
const char *action;
|
||||||
const gchar *no_hooks;
|
const char *no_hooks;
|
||||||
const gchar *has_class_closure;
|
const char *has_class_closure;
|
||||||
GIIrNodeInterface *iface;
|
GIIrNodeInterface *iface;
|
||||||
GIIrNodeSignal *signal;
|
GIIrNodeSignal *signal;
|
||||||
|
|
||||||
@ -2526,19 +2528,19 @@ start_glib_signal (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_vfunc (GMarkupParseContext *context,
|
start_vfunc (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *must_chain_up;
|
const char *must_chain_up;
|
||||||
const gchar *override;
|
const char *override;
|
||||||
const gchar *is_class_closure;
|
const char *is_class_closure;
|
||||||
const gchar *offset;
|
const char *offset;
|
||||||
const gchar *invoker;
|
const char *invoker;
|
||||||
const gchar *throws;
|
const char *throws;
|
||||||
GIIrNodeInterface *iface;
|
GIIrNodeInterface *iface;
|
||||||
GIIrNodeVFunc *vfunc;
|
GIIrNodeVFunc *vfunc;
|
||||||
|
|
||||||
@ -2617,23 +2619,23 @@ start_vfunc (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_struct (GMarkupParseContext *context,
|
start_struct (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *deprecated;
|
const char *deprecated;
|
||||||
const gchar *disguised;
|
const char *disguised;
|
||||||
const gchar *opaque;
|
const char *opaque;
|
||||||
const gchar *pointer;
|
const char *pointer;
|
||||||
const gchar *gtype_name;
|
const char *gtype_name;
|
||||||
const gchar *gtype_init;
|
const char *gtype_init;
|
||||||
const gchar *gtype_struct;
|
const char *gtype_struct;
|
||||||
const gchar *foreign;
|
const char *foreign;
|
||||||
const gchar *copy_func;
|
const char *copy_func;
|
||||||
const gchar *free_func;
|
const char *free_func;
|
||||||
GIIrNodeStruct *struct_;
|
GIIrNodeStruct *struct_;
|
||||||
|
|
||||||
if (!(strcmp (element_name, "record") == 0 &&
|
if (!(strcmp (element_name, "record") == 0 &&
|
||||||
@ -2711,18 +2713,18 @@ start_struct (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_union (GMarkupParseContext *context,
|
start_union (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *deprecated;
|
const char *deprecated;
|
||||||
const gchar *typename;
|
const char *typename;
|
||||||
const gchar *typeinit;
|
const char *typeinit;
|
||||||
const gchar *copy_func;
|
const char *copy_func;
|
||||||
const gchar *free_func;
|
const char *free_func;
|
||||||
GIIrNodeUnion *union_;
|
GIIrNodeUnion *union_;
|
||||||
|
|
||||||
if (!(strcmp (element_name, "union") == 0 &&
|
if (!(strcmp (element_name, "union") == 0 &&
|
||||||
@ -2770,14 +2772,14 @@ start_union (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
start_discriminator (GMarkupParseContext *context,
|
start_discriminator (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const gchar *type;
|
const char *type;
|
||||||
const gchar *offset;
|
const char *offset;
|
||||||
if (!(strcmp (element_name, "discriminator") == 0 &&
|
if (!(strcmp (element_name, "discriminator") == 0 &&
|
||||||
ctx->state == STATE_UNION))
|
ctx->state == STATE_UNION))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -2810,9 +2812,9 @@ parse_include (GMarkupParseContext *context,
|
|||||||
const char *version)
|
const char *version)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
gchar *buffer;
|
char *buffer;
|
||||||
gsize length;
|
gsize length;
|
||||||
gchar *girpath, *girname;
|
char *girpath, *girname;
|
||||||
GIIrModule *module;
|
GIIrModule *module;
|
||||||
GList *l;
|
GList *l;
|
||||||
|
|
||||||
@ -2882,9 +2884,9 @@ extern GLogLevelFlags logged_levels;
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
start_element_handler (GMarkupParseContext *context,
|
start_element_handler (GMarkupParseContext *context,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
const gchar **attribute_names,
|
const char **attribute_names,
|
||||||
const gchar **attribute_values,
|
const char **attribute_values,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -3004,8 +3006,8 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
if (strcmp (element_name, "include") == 0 &&
|
if (strcmp (element_name, "include") == 0 &&
|
||||||
ctx->state == STATE_REPOSITORY)
|
ctx->state == STATE_REPOSITORY)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *version;
|
const char *version;
|
||||||
|
|
||||||
name = find_attribute ("name", attribute_names, attribute_values);
|
name = find_attribute ("name", attribute_names, attribute_values);
|
||||||
version = find_attribute ("version", attribute_names, attribute_values);
|
version = find_attribute ("version", attribute_names, attribute_values);
|
||||||
@ -3072,7 +3074,7 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
case 'n':
|
case 'n':
|
||||||
if (strcmp (element_name, "namespace") == 0 && ctx->state == STATE_REPOSITORY)
|
if (strcmp (element_name, "namespace") == 0 && ctx->state == STATE_REPOSITORY)
|
||||||
{
|
{
|
||||||
const gchar *name, *version, *shared_library, *cprefix;
|
const char *name, *version, *shared_library, *cprefix;
|
||||||
|
|
||||||
if (ctx->current_module != NULL)
|
if (ctx->current_module != NULL)
|
||||||
{
|
{
|
||||||
@ -3149,7 +3151,7 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
else if (strcmp (element_name, "prerequisite") == 0 &&
|
else if (strcmp (element_name, "prerequisite") == 0 &&
|
||||||
ctx->state == STATE_INTERFACE)
|
ctx->state == STATE_INTERFACE)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
|
|
||||||
name = find_attribute ("name", attribute_names, attribute_values);
|
name = find_attribute ("name", attribute_names, attribute_values);
|
||||||
|
|
||||||
@ -3177,7 +3179,7 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
case 'r':
|
case 'r':
|
||||||
if (strcmp (element_name, "repository") == 0 && ctx->state == STATE_START)
|
if (strcmp (element_name, "repository") == 0 && ctx->state == STATE_START)
|
||||||
{
|
{
|
||||||
const gchar *version;
|
const char *version;
|
||||||
|
|
||||||
version = find_attribute ("version", attribute_names, attribute_values);
|
version = find_attribute ("version", attribute_names, attribute_values);
|
||||||
|
|
||||||
@ -3301,7 +3303,7 @@ require_one_of_end_elements (GMarkupParseContext *context,
|
|||||||
static gboolean
|
static gboolean
|
||||||
state_switch_end_struct_or_union (GMarkupParseContext *context,
|
state_switch_end_struct_or_union (GMarkupParseContext *context,
|
||||||
ParseContext *ctx,
|
ParseContext *ctx,
|
||||||
const gchar *element_name,
|
const char *element_name,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
pop_node (ctx);
|
pop_node (ctx);
|
||||||
@ -3345,7 +3347,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 char *element_name,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -3646,7 +3648,7 @@ end_element_handler (GMarkupParseContext *context,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
text_handler (GMarkupParseContext *context,
|
text_handler (GMarkupParseContext *context,
|
||||||
const gchar *text,
|
const char *text,
|
||||||
gsize text_len,
|
gsize text_len,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
GError **error)
|
GError **error)
|
||||||
@ -3688,9 +3690,9 @@ cleanup (GMarkupParseContext *context,
|
|||||||
*/
|
*/
|
||||||
GIIrModule *
|
GIIrModule *
|
||||||
gi_ir_parser_parse_string (GIIrParser *parser,
|
gi_ir_parser_parse_string (GIIrParser *parser,
|
||||||
const gchar *namespace,
|
const char *namespace,
|
||||||
const gchar *filename,
|
const char *filename,
|
||||||
const gchar *buffer,
|
const char *buffer,
|
||||||
gssize length,
|
gssize length,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -3773,10 +3775,10 @@ gi_ir_parser_parse_string (GIIrParser *parser,
|
|||||||
*/
|
*/
|
||||||
GIIrModule *
|
GIIrModule *
|
||||||
gi_ir_parser_parse_file (GIIrParser *parser,
|
gi_ir_parser_parse_file (GIIrParser *parser,
|
||||||
const gchar *filename,
|
const char *filename,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
gchar *buffer;
|
char *buffer;
|
||||||
gsize length;
|
gsize length;
|
||||||
GIIrModule *module;
|
GIIrModule *module;
|
||||||
char *dash;
|
char *dash;
|
||||||
|
@ -173,7 +173,7 @@ check_unresolved (GIBaseInfo *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_type_name (const gchar *ns,
|
write_type_name (const char *ns,
|
||||||
GIBaseInfo *info,
|
GIBaseInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
@ -184,7 +184,7 @@ write_type_name (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_type_name_attribute (const gchar *ns,
|
write_type_name_attribute (const char *ns,
|
||||||
GIBaseInfo *info,
|
GIBaseInfo *info,
|
||||||
const char *attr_name,
|
const char *attr_name,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
@ -215,7 +215,7 @@ write_ownership_transfer (GITransfer transfer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_type_info (const gchar *ns,
|
write_type_info (const char *ns,
|
||||||
GITypeInfo *info,
|
GITypeInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
@ -379,23 +379,23 @@ write_return_value_attributes (Xml *file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_constant_value (const gchar *ns,
|
write_constant_value (const char *ns,
|
||||||
GITypeInfo *info,
|
GITypeInfo *info,
|
||||||
GIArgument *argument,
|
GIArgument *argument,
|
||||||
Xml *file);
|
Xml *file);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_callback_info (const gchar *ns,
|
write_callback_info (const char *ns,
|
||||||
GICallbackInfo *info,
|
GICallbackInfo *info,
|
||||||
Xml *file);
|
Xml *file);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_field_info (const gchar *ns,
|
write_field_info (const char *ns,
|
||||||
GIFieldInfo *info,
|
GIFieldInfo *info,
|
||||||
GIConstantInfo *branch,
|
GIConstantInfo *branch,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
GIFieldInfoFlags flags;
|
GIFieldInfoFlags flags;
|
||||||
gint size;
|
gint size;
|
||||||
gint offset;
|
gint offset;
|
||||||
@ -457,7 +457,7 @@ write_field_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_callable_info (const gchar *ns,
|
write_callable_info (const char *ns,
|
||||||
GICallableInfo *info,
|
GICallableInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
@ -568,14 +568,14 @@ write_callable_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_function_info (const gchar *ns,
|
write_function_info (const char *ns,
|
||||||
GIFunctionInfo *info,
|
GIFunctionInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
GIFunctionInfoFlags flags;
|
GIFunctionInfoFlags flags;
|
||||||
const gchar *tag;
|
const char *tag;
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *symbol;
|
const char *symbol;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
|
|
||||||
flags = gi_function_info_get_flags (info);
|
flags = gi_function_info_get_flags (info);
|
||||||
@ -619,11 +619,11 @@ write_function_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_callback_info (const gchar *ns,
|
write_callback_info (const char *ns,
|
||||||
GICallbackInfo *info,
|
GICallbackInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
|
|
||||||
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
||||||
@ -640,14 +640,14 @@ write_callback_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_struct_info (const gchar *ns,
|
write_struct_info (const char *ns,
|
||||||
GIStructInfo *info,
|
GIStructInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *type_name;
|
const char *type_name;
|
||||||
const gchar *type_init;
|
const char *type_init;
|
||||||
const gchar *func;
|
const char *func;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
gboolean is_gtype_struct;
|
gboolean is_gtype_struct;
|
||||||
gboolean foreign;
|
gboolean foreign;
|
||||||
@ -722,13 +722,13 @@ write_struct_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_value_info (const gchar *ns,
|
write_value_info (const char *ns,
|
||||||
GIValueInfo *info,
|
GIValueInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
gint64 value;
|
gint64 value;
|
||||||
gchar *value_str;
|
char *value_str;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
|
|
||||||
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
||||||
@ -749,7 +749,7 @@ write_value_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_constant_value (const gchar *ns,
|
write_constant_value (const char *ns,
|
||||||
GITypeInfo *type,
|
GITypeInfo *type,
|
||||||
GIArgument *value,
|
GIArgument *value,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
@ -799,12 +799,12 @@ write_constant_value (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_constant_info (const gchar *ns,
|
write_constant_info (const char *ns,
|
||||||
GIConstantInfo *info,
|
GIConstantInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
GITypeInfo *type;
|
GITypeInfo *type;
|
||||||
const gchar *name;
|
const char *name;
|
||||||
GIArgument value;
|
GIArgument value;
|
||||||
|
|
||||||
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
||||||
@ -830,14 +830,14 @@ write_constant_info (const gchar *ns,
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_enum_info (const gchar *ns,
|
write_enum_info (const char *ns,
|
||||||
GIEnumInfo *info,
|
GIEnumInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *type_name;
|
const char *type_name;
|
||||||
const gchar *type_init;
|
const char *type_init;
|
||||||
const gchar *error_domain;
|
const char *error_domain;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
|
|
||||||
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
||||||
@ -874,12 +874,12 @@ write_enum_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_signal_info (const gchar *ns,
|
write_signal_info (const char *ns,
|
||||||
GISignalInfo *info,
|
GISignalInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
GSignalFlags flags;
|
GSignalFlags flags;
|
||||||
const gchar *name;
|
const char *name;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
|
|
||||||
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
||||||
@ -917,12 +917,12 @@ write_signal_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_vfunc_info (const gchar *ns,
|
write_vfunc_info (const char *ns,
|
||||||
GIVFuncInfo *info,
|
GIVFuncInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
GIVFuncInfoFlags flags;
|
GIVFuncInfoFlags flags;
|
||||||
const gchar *name;
|
const char *name;
|
||||||
GIFunctionInfo *invoker;
|
GIFunctionInfo *invoker;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
gint offset;
|
gint offset;
|
||||||
@ -961,12 +961,12 @@ write_vfunc_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_property_info (const gchar *ns,
|
write_property_info (const char *ns,
|
||||||
GIPropertyInfo *info,
|
GIPropertyInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
GParamFlags flags;
|
GParamFlags flags;
|
||||||
const gchar *name;
|
const char *name;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
GITypeInfo *type;
|
GITypeInfo *type;
|
||||||
|
|
||||||
@ -1026,14 +1026,14 @@ write_property_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_object_info (const gchar *ns,
|
write_object_info (const char *ns,
|
||||||
GIObjectInfo *info,
|
GIObjectInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *type_name;
|
const char *type_name;
|
||||||
const gchar *type_init;
|
const char *type_init;
|
||||||
const gchar *func;
|
const char *func;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
gboolean is_abstract;
|
gboolean is_abstract;
|
||||||
gboolean is_fundamental;
|
gboolean is_fundamental;
|
||||||
@ -1156,13 +1156,13 @@ write_object_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_interface_info (const gchar *ns,
|
write_interface_info (const char *ns,
|
||||||
GIInterfaceInfo *info,
|
GIInterfaceInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *type_name;
|
const char *type_name;
|
||||||
const gchar *type_init;
|
const char *type_init;
|
||||||
GIStructInfo *class_struct;
|
GIStructInfo *class_struct;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
|
|
||||||
@ -1240,14 +1240,14 @@ write_interface_info (const gchar *ns,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_union_info (const gchar *ns,
|
write_union_info (const char *ns,
|
||||||
GIUnionInfo *info,
|
GIUnionInfo *info,
|
||||||
Xml *file)
|
Xml *file)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *type_name;
|
const char *type_name;
|
||||||
const gchar *type_init;
|
const char *type_init;
|
||||||
const gchar *func;
|
const char *func;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
gsize size;
|
gsize size;
|
||||||
|
|
||||||
@ -1346,7 +1346,7 @@ gi_ir_writer_write (const char *filename,
|
|||||||
ofile = stdout;
|
ofile = stdout;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gchar *full_filename;
|
char *full_filename;
|
||||||
|
|
||||||
if (needs_prefix)
|
if (needs_prefix)
|
||||||
full_filename = g_strdup_printf ("%s-%s", ns, filename);
|
full_filename = g_strdup_printf ("%s-%s", ns, filename);
|
||||||
@ -1391,7 +1391,7 @@ gi_ir_writer_write (const char *filename,
|
|||||||
if (TRUE)
|
if (TRUE)
|
||||||
{
|
{
|
||||||
const char * const *shared_libraries;
|
const char * const *shared_libraries;
|
||||||
const gchar *c_prefix;
|
const char *c_prefix;
|
||||||
const char *cur_ns = ns;
|
const char *cur_ns = ns;
|
||||||
const char *cur_version;
|
const char *cur_version;
|
||||||
gint n_infos;
|
gint n_infos;
|
||||||
|
@ -127,7 +127,7 @@ gi_struct_info_get_field (GIStructInfo *info,
|
|||||||
*/
|
*/
|
||||||
GIFieldInfo *
|
GIFieldInfo *
|
||||||
gi_struct_info_find_field (GIStructInfo *info,
|
gi_struct_info_find_field (GIStructInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
|
StructBlob *blob = (StructBlob *)&rinfo->typelib->data[rinfo->offset];
|
||||||
@ -138,7 +138,7 @@ gi_struct_info_find_field (GIStructInfo *info,
|
|||||||
for (i = 0; i < blob->n_fields; i++)
|
for (i = 0; i < blob->n_fields; i++)
|
||||||
{
|
{
|
||||||
FieldBlob *field_blob = (FieldBlob *)&rinfo->typelib->data[offset];
|
FieldBlob *field_blob = (FieldBlob *)&rinfo->typelib->data[offset];
|
||||||
const gchar *fname = (const gchar *)&rinfo->typelib->data[field_blob->name];
|
const char *fname = (const char *)&rinfo->typelib->data[field_blob->name];
|
||||||
|
|
||||||
if (strcmp (name, fname) == 0)
|
if (strcmp (name, fname) == 0)
|
||||||
{
|
{
|
||||||
@ -213,7 +213,7 @@ gi_struct_info_get_method (GIStructInfo *info,
|
|||||||
*/
|
*/
|
||||||
GIFunctionInfo *
|
GIFunctionInfo *
|
||||||
gi_struct_info_find_method (GIStructInfo *info,
|
gi_struct_info_find_method (GIStructInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
gint offset;
|
gint offset;
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
|
@ -53,7 +53,7 @@ GIFieldInfo * gi_struct_info_get_field (GIStructInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIFieldInfo * gi_struct_info_find_field (GIStructInfo *info,
|
GIFieldInfo * gi_struct_info_find_field (GIStructInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
guint gi_struct_info_get_n_methods (GIStructInfo *info);
|
guint gi_struct_info_get_n_methods (GIStructInfo *info);
|
||||||
@ -64,7 +64,7 @@ GIFunctionInfo * gi_struct_info_get_method (GIStructInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIFunctionInfo * gi_struct_info_find_method (GIStructInfo *info,
|
GIFunctionInfo * gi_struct_info_find_method (GIStructInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gsize gi_struct_info_get_size (GIStructInfo *info);
|
gsize gi_struct_info_get_size (GIStructInfo *info);
|
||||||
|
@ -76,10 +76,10 @@ G_BEGIN_DECLS
|
|||||||
((tag) >= GI_TYPE_TAG_GLIST && (tag) <= GI_TYPE_TAG_GHASH))
|
((tag) >= GI_TYPE_TAG_GLIST && (tag) <= GI_TYPE_TAG_GHASH))
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar* gi_type_tag_to_string (GITypeTag type);
|
const char * gi_type_tag_to_string (GITypeTag type);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar* gi_info_type_to_string (GIInfoType type);
|
const char * gi_info_type_to_string (GIInfoType type);
|
||||||
|
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
|
@ -287,7 +287,7 @@ _blob_is_registered_type (GITypelibBlobType blob_type)
|
|||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
gchar magic[16];
|
char magic[16];
|
||||||
guint8 major_version;
|
guint8 major_version;
|
||||||
guint8 minor_version;
|
guint8 minor_version;
|
||||||
guint16 reserved;
|
guint16 reserved;
|
||||||
@ -1328,13 +1328,13 @@ DirEntry *gi_typelib_get_dir_entry_by_name (GITypelib *typelib,
|
|||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
DirEntry *gi_typelib_get_dir_entry_by_gtype_name (GITypelib *typelib,
|
DirEntry *gi_typelib_get_dir_entry_by_gtype_name (GITypelib *typelib,
|
||||||
const gchar *gtype_name);
|
const char *gtype_name);
|
||||||
|
|
||||||
DirEntry *gi_typelib_get_dir_entry_by_error_domain (GITypelib *typelib,
|
DirEntry *gi_typelib_get_dir_entry_by_error_domain (GITypelib *typelib,
|
||||||
GQuark error_domain);
|
GQuark error_domain);
|
||||||
|
|
||||||
gboolean gi_typelib_matches_gtype_name_prefix (GITypelib *typelib,
|
gboolean gi_typelib_matches_gtype_name_prefix (GITypelib *typelib,
|
||||||
const gchar *gtype_name);
|
const char *gtype_name);
|
||||||
|
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
@ -1350,7 +1350,7 @@ void gi_typelib_check_format (void);
|
|||||||
* Returns: TODO
|
* Returns: TODO
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
#define gi_typelib_get_string(typelib,offset) ((const gchar*)&(typelib->data)[(offset)])
|
#define gi_typelib_get_string(typelib,offset) ((const char*)&(typelib->data)[(offset)])
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -244,7 +244,7 @@ gi_typelib_get_dir_entry_by_name (GITypelib *typelib,
|
|||||||
*/
|
*/
|
||||||
DirEntry *
|
DirEntry *
|
||||||
gi_typelib_get_dir_entry_by_gtype_name (GITypelib *typelib,
|
gi_typelib_get_dir_entry_by_gtype_name (GITypelib *typelib,
|
||||||
const gchar *gtype_name)
|
const char *gtype_name)
|
||||||
{
|
{
|
||||||
Header *header = (Header *)typelib->data;
|
Header *header = (Header *)typelib->data;
|
||||||
guint i;
|
guint i;
|
||||||
@ -340,11 +340,11 @@ strsplit_iter_clear (StrSplitIter *iter)
|
|||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gi_typelib_matches_gtype_name_prefix (GITypelib *typelib,
|
gi_typelib_matches_gtype_name_prefix (GITypelib *typelib,
|
||||||
const gchar *gtype_name)
|
const char *gtype_name)
|
||||||
{
|
{
|
||||||
Header *header = (Header *)typelib->data;
|
Header *header = (Header *)typelib->data;
|
||||||
const char *c_prefix;
|
const char *c_prefix;
|
||||||
const gchar *prefix;
|
const char *prefix;
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
StrSplitIter split_iter;
|
StrSplitIter split_iter;
|
||||||
gsize gtype_name_len;
|
gsize gtype_name_len;
|
||||||
@ -2342,7 +2342,7 @@ gi_typelib_do_dlopen (GITypelib *typelib)
|
|||||||
|
|
||||||
if (shlib_str != NULL && shlib_str[0] != '\0')
|
if (shlib_str != NULL && shlib_str[0] != '\0')
|
||||||
{
|
{
|
||||||
gchar **shlibs;
|
char **shlibs;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
/* shared-library is a comma-separated list of libraries */
|
/* shared-library is a comma-separated list of libraries */
|
||||||
@ -2522,7 +2522,7 @@ gi_typelib_free (GITypelib *typelib)
|
|||||||
* Returns: name of the namespace represented by @typelib
|
* Returns: name of the namespace represented by @typelib
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const char *
|
||||||
gi_typelib_get_namespace (GITypelib *typelib)
|
gi_typelib_get_namespace (GITypelib *typelib)
|
||||||
{
|
{
|
||||||
return gi_typelib_get_string (typelib, ((Header *) typelib->data)->namespace);
|
return gi_typelib_get_string (typelib, ((Header *) typelib->data)->namespace);
|
||||||
|
@ -55,11 +55,11 @@ 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 char *symbol_name,
|
||||||
void **symbol);
|
void **symbol);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const gchar * gi_typelib_get_namespace (GITypelib *typelib);
|
const char * gi_typelib_get_namespace (GITypelib *typelib);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -132,7 +132,7 @@ union _GIArgument
|
|||||||
gulong v_ulong;
|
gulong v_ulong;
|
||||||
gssize v_ssize;
|
gssize v_ssize;
|
||||||
gsize v_size;
|
gsize v_size;
|
||||||
gchar * v_string;
|
char *v_string;
|
||||||
void *v_pointer;
|
void *v_pointer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ gi_union_info_get_discriminator (GIUnionInfo *info,
|
|||||||
*/
|
*/
|
||||||
GIFunctionInfo *
|
GIFunctionInfo *
|
||||||
gi_union_info_find_method (GIUnionInfo *info,
|
gi_union_info_find_method (GIUnionInfo *info,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
gint offset;
|
gint offset;
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
|
@ -72,7 +72,7 @@ GIConstantInfo * gi_union_info_get_discriminator (GIUnionInfo *info,
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GIFunctionInfo * gi_union_info_find_method (GIUnionInfo *info,
|
GIFunctionInfo * gi_union_info_find_method (GIUnionInfo *info,
|
||||||
const gchar *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gsize gi_union_info_get_size (GIUnionInfo *info);
|
gsize gi_union_info_get_size (GIUnionInfo *info);
|
||||||
|
@ -49,7 +49,7 @@ GIVFuncInfo *
|
|||||||
gi_base_info_find_vfunc (GIRealInfo *rinfo,
|
gi_base_info_find_vfunc (GIRealInfo *rinfo,
|
||||||
guint32 offset,
|
guint32 offset,
|
||||||
guint n_vfuncs,
|
guint n_vfuncs,
|
||||||
const gchar *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
/* FIXME hash */
|
/* FIXME hash */
|
||||||
Header *header = (Header *)rinfo->typelib->data;
|
Header *header = (Header *)rinfo->typelib->data;
|
||||||
@ -57,7 +57,7 @@ gi_base_info_find_vfunc (GIRealInfo *rinfo,
|
|||||||
for (guint i = 0; i < n_vfuncs; i++)
|
for (guint i = 0; i < n_vfuncs; i++)
|
||||||
{
|
{
|
||||||
VFuncBlob *fblob = (VFuncBlob *)&rinfo->typelib->data[offset];
|
VFuncBlob *fblob = (VFuncBlob *)&rinfo->typelib->data[offset];
|
||||||
const gchar *fname = (const gchar *)&rinfo->typelib->data[fblob->name];
|
const char *fname = (const char *)&rinfo->typelib->data[fblob->name];
|
||||||
|
|
||||||
if (strcmp (name, fname) == 0)
|
if (strcmp (name, fname) == 0)
|
||||||
return (GIVFuncInfo *) gi_info_new (GI_INFO_TYPE_VFUNC, (GIBaseInfo*) rinfo,
|
return (GIVFuncInfo *) gi_info_new (GI_INFO_TYPE_VFUNC, (GIBaseInfo*) rinfo,
|
||||||
|
Loading…
Reference in New Issue
Block a user