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