summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2023-03-20 22:03:47 -0700
committerChristian Hergert <chergert@redhat.com>2023-03-22 16:44:45 -0700
commit40b77bd0fd2b34d19803609d7c07bf3d6bf50a1b (patch)
tree1b3d0a49ced83eee832bf85f58b3e14dcec6e9ff
parent1b3740a242ed7e7ab2c4940b1d8751d7f2e18bf8 (diff)
downloadlibpeas-40b77bd0fd2b34d19803609d7c07bf3d6bf50a1b.tar.gz
janitorial: use char and int over gchar and gint
-rw-r--r--libpeas/peas-debug.c8
-rw-r--r--libpeas/peas-dirs.c28
-rw-r--r--libpeas/peas-dirs.h8
-rw-r--r--libpeas/peas-extension-set.c16
-rw-r--r--libpeas/peas-extension-set.h6
-rw-r--r--libpeas/peas-i18n.c2
-rw-r--r--libpeas/peas-object-module.c38
-rw-r--r--libpeas/peas-object-module.h60
-rw-r--r--libpeas/peas-plugin-info-priv.h2
-rw-r--r--libpeas/peas-plugin-loader-c.c4
-rw-r--r--libpeas/peas-utils-osx.h14
-rw-r--r--libpeas/peas-utils-osx.m26
-rw-r--r--libpeas/peas-utils.c48
-rw-r--r--libpeas/peas-utils.h12
-rw-r--r--loaders/lua5.1/peas-lua-internal.c10
-rw-r--r--loaders/lua5.1/peas-lua-internal.h13
-rw-r--r--loaders/lua5.1/peas-lua-utils.c30
-rw-r--r--loaders/lua5.1/peas-lua-utils.h7
-rw-r--r--loaders/python/peas-plugin-loader-python.c2
-rw-r--r--loaders/python/peas-python-internal.c10
-rw-r--r--loaders/python/peas-python-internal.h7
-rw-r--r--tests/libpeas/engine.c28
-rw-r--r--tests/libpeas/extension-set.c28
-rw-r--r--tests/libpeas/introspection/introspection-abstract.c6
-rw-r--r--tests/libpeas/introspection/introspection-abstract.h4
-rw-r--r--tests/libpeas/introspection/introspection-callable.c8
-rw-r--r--tests/libpeas/introspection/introspection-callable.h16
-rw-r--r--tests/libpeas/introspection/introspection-prerequisite.c2
-rw-r--r--tests/libpeas/plugin-info.c6
-rw-r--r--tests/libpeas/plugins/extension-c/extension-c-plugin.c8
-rw-r--r--tests/libpeas/testing/testing-extension.c52
-rw-r--r--tests/libpeas/testing/testing-extension.h9
-rw-r--r--tests/libpeas/testing/testing.c4
-rw-r--r--tests/libpeas/testing/testing.h4
-rw-r--r--tests/testing-util/testing-util.c12
-rw-r--r--tests/testing-util/testing-util.h2
36 files changed, 263 insertions, 277 deletions
diff --git a/libpeas/peas-debug.c b/libpeas/peas-debug.c
index 9cdd023..e0086c6 100644
--- a/libpeas/peas-debug.c
+++ b/libpeas/peas-debug.c
@@ -27,9 +27,9 @@
static void
-debug_log_handler (const gchar *log_domain,
+debug_log_handler (const char *log_domain,
GLogLevelFlags log_level,
- const gchar *message,
+ const char *message,
gpointer user_data)
{
}
@@ -46,7 +46,7 @@ peas_debug_init (void)
}
else
{
- const gchar *g_messages_debug;
+ const char *g_messages_debug;
g_messages_debug = g_getenv ("G_MESSAGES_DEBUG");
@@ -56,7 +56,7 @@ peas_debug_init (void)
}
else
{
- gchar *new_g_messages_debug;
+ char *new_g_messages_debug;
new_g_messages_debug = g_strconcat (g_messages_debug, " ",
G_LOG_DOMAIN, NULL);
diff --git a/libpeas/peas-dirs.c b/libpeas/peas-dirs.c
index 3f4d069..1517b9f 100644
--- a/libpeas/peas-dirs.c
+++ b/libpeas/peas-dirs.c
@@ -51,13 +51,13 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
#endif
#endif
-gchar *
+char *
peas_dirs_get_data_dir (void)
{
- gchar *data_dir;
+ char *data_dir;
#ifdef G_OS_WIN32
- gchar *win32_dir;
+ char *win32_dir;
win32_dir = g_win32_get_package_installation_directory_of_module (libpeas_dll);
@@ -72,13 +72,13 @@ peas_dirs_get_data_dir (void)
return data_dir;
}
-gchar *
+char *
peas_dirs_get_lib_dir (void)
{
- gchar *lib_dir;
+ char *lib_dir;
#ifdef G_OS_WIN32
- gchar *win32_dir;
+ char *win32_dir;
win32_dir = g_win32_get_package_installation_directory_of_module (libpeas_dll);
@@ -93,12 +93,12 @@ peas_dirs_get_lib_dir (void)
return lib_dir;
}
-gchar *
-peas_dirs_get_plugin_loader_dir (const gchar *loader_name)
+char *
+peas_dirs_get_plugin_loader_dir (const char *loader_name)
{
- const gchar *env_var;
- gchar *lib_dir;
- gchar *loader_dir;
+ const char *env_var;
+ char *lib_dir;
+ char *loader_dir;
env_var = g_getenv ("PEAS_PLUGIN_LOADERS_DIR");
if (env_var != NULL)
@@ -112,13 +112,13 @@ peas_dirs_get_plugin_loader_dir (const gchar *loader_name)
return loader_dir;
}
-gchar *
+char *
peas_dirs_get_locale_dir (void)
{
- gchar *locale_dir;
+ char *locale_dir;
#ifdef G_OS_WIN32
- gchar *win32_dir;
+ char *win32_dir;
win32_dir = g_win32_get_package_installation_directory_of_module (libpeas_dll);
diff --git a/libpeas/peas-dirs.h b/libpeas/peas-dirs.h
index 420a796..41bdbc3 100644
--- a/libpeas/peas-dirs.h
+++ b/libpeas/peas-dirs.h
@@ -28,9 +28,9 @@
G_BEGIN_DECLS
-gchar *peas_dirs_get_data_dir (void);
-gchar *peas_dirs_get_lib_dir (void);
-gchar *peas_dirs_get_plugin_loader_dir (const gchar *loader_name);
-gchar *peas_dirs_get_locale_dir (void);
+char *peas_dirs_get_data_dir (void);
+char *peas_dirs_get_lib_dir (void);
+char *peas_dirs_get_plugin_loader_dir (const char *loader_name);
+char *peas_dirs_get_locale_dir (void);
G_END_DECLS
diff --git a/libpeas/peas-extension-set.c b/libpeas/peas-extension-set.c
index d98105b..0573b01 100644
--- a/libpeas/peas-extension-set.c
+++ b/libpeas/peas-extension-set.c
@@ -527,7 +527,7 @@ PeasExtensionSet *
peas_extension_set_new_with_properties (PeasEngine *engine,
GType exten_type,
guint n_properties,
- const gchar **prop_names,
+ const char **prop_names,
const GValue *prop_values)
{
PeasExtensionSet *ret;
@@ -585,10 +585,10 @@ peas_extension_set_new_with_properties (PeasEngine *engine,
* Returns: a new instance of #PeasExtensionSet.
*/
PeasExtensionSet *
-peas_extension_set_new_valist (PeasEngine *engine,
- GType exten_type,
- const gchar *first_property,
- va_list var_args)
+peas_extension_set_new_valist (PeasEngine *engine,
+ GType exten_type,
+ const char *first_property,
+ va_list var_args)
{
GParameter *parameters;
guint n_parameters;
@@ -639,9 +639,9 @@ peas_extension_set_new_valist (PeasEngine *engine,
* Returns: a new instance of #PeasExtensionSet.
*/
PeasExtensionSet *
-peas_extension_set_new (PeasEngine *engine,
- GType exten_type,
- const gchar *first_property,
+peas_extension_set_new (PeasEngine *engine,
+ GType exten_type,
+ const char *first_property,
...)
{
va_list var_args;
diff --git a/libpeas/peas-extension-set.h b/libpeas/peas-extension-set.h
index 3ccee7d..9d20f23 100644
--- a/libpeas/peas-extension-set.h
+++ b/libpeas/peas-extension-set.h
@@ -65,17 +65,17 @@ PEAS_AVAILABLE_IN_ALL
PeasExtensionSet *peas_extension_set_new_with_properties (PeasEngine *engine,
GType exten_type,
guint n_properties,
- const gchar **prop_names,
+ const char **prop_names,
const GValue *prop_values);
PEAS_AVAILABLE_IN_ALL
PeasExtensionSet *peas_extension_set_new_valist (PeasEngine *engine,
GType exten_type,
- const gchar *first_property,
+ const char *first_property,
va_list var_args);
PEAS_AVAILABLE_IN_ALL
PeasExtensionSet *peas_extension_set_new (PeasEngine *engine,
GType exten_type,
- const gchar *first_property,
+ const char *first_property,
...);
G_END_DECLS
diff --git a/libpeas/peas-i18n.c b/libpeas/peas-i18n.c
index 3f07de7..4923558 100644
--- a/libpeas/peas-i18n.c
+++ b/libpeas/peas-i18n.c
@@ -40,7 +40,7 @@ G_DEFINE_CONSTRUCTOR(peas_init_ctor)
static void
peas_init_ctor (void)
{
- gchar *locale_dir = peas_dirs_get_locale_dir ();
+ char *locale_dir = peas_dirs_get_locale_dir ();
bindtextdomain (GETTEXT_PACKAGE, locale_dir);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
diff --git a/libpeas/peas-object-module.c b/libpeas/peas-object-module.c
index ae41033..0da077d 100644
--- a/libpeas/peas-object-module.c
+++ b/libpeas/peas-object-module.c
@@ -70,9 +70,9 @@ typedef struct _PeasObjectModulePrivate {
PeasObjectModuleRegisterFunc register_func;
GArray *implementations;
- gchar *path;
- gchar *module_name;
- gchar *symbol;
+ char *path;
+ char *module_name;
+ char *symbol;
guint resident : 1;
guint local_linkage : 1;
@@ -82,7 +82,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (PeasObjectModule, peas_object_module, G_TYPE_TYPE_MO
#define TYPE_MISSING_PLUGIN_INFO_PROPERTY (G_TYPE_FLAG_RESERVED_ID_BIT)
-static const gchar *intern_plugin_info = NULL;
+static const char *intern_plugin_info = NULL;
static gboolean
peas_object_module_load (GTypeModule *gmodule)
@@ -101,9 +101,9 @@ peas_object_module_load (GTypeModule *gmodule)
}
else
{
- gchar *path;
+ char *path;
GModuleFlags flags = 0;
- gchar *fallback_path = NULL;
+ char *fallback_path = NULL;
#ifdef G_OS_WIN32
if (!g_str_has_suffix (priv->module_name, "." G_MODULE_SUFFIX))
@@ -115,7 +115,7 @@ peas_object_module_load (GTypeModule *gmodule)
* not found, as it is commonly the case on Meson builds and
* also likely in other cases.
*/
- gchar *mod_file = g_strconcat (priv->module_name, "." G_MODULE_SUFFIX, NULL);
+ char *mod_file = g_strconcat (priv->module_name, "." G_MODULE_SUFFIX, NULL);
fallback_path = g_module_build_path (priv->path, mod_file);
g_free (mod_file);
}
@@ -381,9 +381,9 @@ peas_object_module_class_init (PeasObjectModuleClass *klass)
* Returns: a new #PeasObjectModule.
*/
PeasObjectModule *
-peas_object_module_new (const gchar *module_name,
- const gchar *path,
- gboolean resident)
+peas_object_module_new (const char *module_name,
+ const char *path,
+ gboolean resident)
{
g_return_val_if_fail (module_name != NULL && *module_name != '\0', NULL);
g_return_val_if_fail (path != NULL && *path != '\0', NULL);
@@ -407,10 +407,10 @@ peas_object_module_new (const gchar *module_name,
* Returns: a new #PeasObjectModule.
*/
PeasObjectModule *
-peas_object_module_new_full (const gchar *module_name,
- const gchar *path,
- gboolean resident,
- gboolean local_linkage)
+peas_object_module_new_full (const char *module_name,
+ const char *path,
+ gboolean resident,
+ gboolean local_linkage)
{
g_return_val_if_fail (module_name != NULL && *module_name != '\0', NULL);
g_return_val_if_fail (path != NULL && *path != '\0', NULL);
@@ -434,8 +434,8 @@ peas_object_module_new_full (const gchar *module_name,
* Since: 1.18
*/
PeasObjectModule *
-peas_object_module_new_embedded (const gchar *module_name,
- const gchar *symbol)
+peas_object_module_new_embedded (const char *module_name,
+ const char *symbol)
{
g_return_val_if_fail (module_name != NULL && *module_name != '\0', NULL);
g_return_val_if_fail (symbol != NULL && *symbol != '\0', NULL);
@@ -527,7 +527,7 @@ peas_object_module_provides_object (PeasObjectModule *module,
*
* Returns: the path.
*/
-const gchar *
+const char *
peas_object_module_get_path (PeasObjectModule *module)
{
PeasObjectModulePrivate *priv = peas_object_module_get_instance_private (module);
@@ -545,7 +545,7 @@ peas_object_module_get_path (PeasObjectModule *module)
*
* Returns: the module name.
*/
-const gchar *
+const char *
peas_object_module_get_module_name (PeasObjectModule *module)
{
PeasObjectModulePrivate *priv = peas_object_module_get_instance_private (module);
@@ -565,7 +565,7 @@ peas_object_module_get_module_name (PeasObjectModule *module)
*
* Since: 1.18
*/
-const gchar *
+const char *
peas_object_module_get_symbol (PeasObjectModule *module)
{
PeasObjectModulePrivate *priv = peas_object_module_get_instance_private (module);
diff --git a/libpeas/peas-object-module.h b/libpeas/peas-object-module.h
index be242d9..7c3c944 100644
--- a/libpeas/peas-object-module.h
+++ b/libpeas/peas-object-module.h
@@ -76,50 +76,44 @@ struct _PeasObjectModuleClass
};
PEAS_AVAILABLE_IN_ALL
-PeasObjectModule *peas_object_module_new (const gchar *module_name,
- const gchar *path,
- gboolean resident);
+PeasObjectModule *peas_object_module_new (const char *module_name,
+ const char *path,
+ gboolean resident);
PEAS_AVAILABLE_IN_ALL
-PeasObjectModule *peas_object_module_new_full (const gchar *module_name,
- const gchar *path,
- gboolean resident,
- gboolean local_linkage);
+PeasObjectModule *peas_object_module_new_full (const char *module_name,
+ const char *path,
+ gboolean resident,
+ gboolean local_linkage);
PEAS_AVAILABLE_IN_ALL
-PeasObjectModule *peas_object_module_new_embedded (const gchar *module_name,
- const gchar *symbol);
-
+PeasObjectModule *peas_object_module_new_embedded (const char *module_name,
+ const char *symbol);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
PEAS_AVAILABLE_IN_ALL
-GObject *peas_object_module_create_object (PeasObjectModule *module,
- GType exten_type,
- guint n_parameters,
- GParameter *parameters);
+GObject *peas_object_module_create_object (PeasObjectModule *module,
+ GType exten_type,
+ guint n_parameters,
+ GParameter *parameters);
G_GNUC_END_IGNORE_DEPRECATIONS
PEAS_AVAILABLE_IN_ALL
-gboolean peas_object_module_provides_object (PeasObjectModule *module,
- GType exten_type);
-
+gboolean peas_object_module_provides_object (PeasObjectModule *module,
+ GType exten_type);
PEAS_AVAILABLE_IN_ALL
-const gchar *peas_object_module_get_path (PeasObjectModule *module);
+const char *peas_object_module_get_path (PeasObjectModule *module);
PEAS_AVAILABLE_IN_ALL
-const gchar *peas_object_module_get_module_name (PeasObjectModule *module);
+const char *peas_object_module_get_module_name (PeasObjectModule *module);
PEAS_AVAILABLE_IN_ALL
-const gchar *peas_object_module_get_symbol (PeasObjectModule *module);
-
+const char *peas_object_module_get_symbol (PeasObjectModule *module);
PEAS_AVAILABLE_IN_ALL
-GModule *peas_object_module_get_library (PeasObjectModule *module);
-
+GModule *peas_object_module_get_library (PeasObjectModule *module);
PEAS_AVAILABLE_IN_ALL
-void peas_object_module_register_extension_factory
- (PeasObjectModule *module,
- GType exten_type,
- PeasFactoryFunc factory_func,
- gpointer user_data,
- GDestroyNotify destroy_func);
+void peas_object_module_register_extension_factory (PeasObjectModule *module,
+ GType exten_type,
+ PeasFactoryFunc factory_func,
+ gpointer user_data,
+ GDestroyNotify destroy_func);
PEAS_AVAILABLE_IN_ALL
-void peas_object_module_register_extension_type
- (PeasObjectModule *module,
- GType exten_type,
- GType impl_type);
+void peas_object_module_register_extension_type (PeasObjectModule *module,
+ GType exten_type,
+ GType impl_type);
G_END_DECLS
diff --git a/libpeas/peas-plugin-info-priv.h b/libpeas/peas-plugin-info-priv.h
index f9c8d44..0a164f8 100644
--- a/libpeas/peas-plugin-info-priv.h
+++ b/libpeas/peas-plugin-info-priv.h
@@ -38,7 +38,7 @@ struct _PeasPluginInfo {
char *module_dir;
char *data_dir;
- gint loader_id;
+ int loader_id;
char *embedded;
char *module_name;
char **dependencies;
diff --git a/libpeas/peas-plugin-loader-c.c b/libpeas/peas-plugin-loader-c.c
index 2a7383d..b395a40 100644
--- a/libpeas/peas-plugin-loader-c.c
+++ b/libpeas/peas-plugin-loader-c.c
@@ -40,7 +40,7 @@ struct _PeasPluginLoaderC {
G_DEFINE_FINAL_TYPE (PeasPluginLoaderC, peas_plugin_loader_c, PEAS_TYPE_PLUGIN_LOADER)
static GQuark quark_extension_type = 0;
-static const gchar *intern_plugin_info = NULL;
+static const char *intern_plugin_info = NULL;
static gboolean
peas_plugin_loader_c_load (PeasPluginLoader *loader,
@@ -54,7 +54,7 @@ peas_plugin_loader_c_load (PeasPluginLoader *loader,
info->filename,
NULL, (gpointer *) &info->loader_data))
{
- const gchar *module_name, *module_dir;
+ const char *module_name, *module_dir;
module_name = peas_plugin_info_get_module_name (info);
module_dir = peas_plugin_info_get_module_dir (info);
diff --git a/libpeas/peas-utils-osx.h b/libpeas/peas-utils-osx.h
index 73e4eb2..5c8d4d1 100644
--- a/libpeas/peas-utils-osx.h
+++ b/libpeas/peas-utils-osx.h
@@ -28,12 +28,12 @@
G_BEGIN_DECLS
-gchar *peas_dirs_os_x_get_bundle_resource_dir (void);
-gchar *peas_dirs_os_x_get_resource_dir (const gchar *subdir,
- const gchar *default_dir);
-gchar *peas_dirs_os_x_get_data_dir (void);
-gchar *peas_dirs_os_x_get_lib_dir (void);
-gchar *peas_dirs_os_x_get_locale_dir (void);
-void peas_open_url_osx (const gchar *uri);
+char *peas_dirs_os_x_get_bundle_resource_dir (void);
+char *peas_dirs_os_x_get_resource_dir (const char *subdir,
+ const char *default_dir);
+char *peas_dirs_os_x_get_data_dir (void);
+char *peas_dirs_os_x_get_lib_dir (void);
+char *peas_dirs_os_x_get_locale_dir (void);
+void peas_open_url_osx (const char *uri);
G_END_DECLS
diff --git a/libpeas/peas-utils-osx.m b/libpeas/peas-utils-osx.m
index 4b960b9..726c67c 100644
--- a/libpeas/peas-utils-osx.m
+++ b/libpeas/peas-utils-osx.m
@@ -30,16 +30,16 @@
#import <AppKit/AppKit.h>
void
-peas_open_url_osx (const gchar *uri)
+peas_open_url_osx (const char *uri)
{
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithUTF8String:uri]]];
}
-gchar *
+char *
peas_dirs_os_x_get_bundle_resource_dir (void)
{
NSAutoreleasePool *pool;
- gchar *str = NULL;
+ char *str = NULL;
NSString *path;
pool = [[NSAutoreleasePool alloc] init];
@@ -63,12 +63,12 @@ peas_dirs_os_x_get_bundle_resource_dir (void)
return str;
}
-gchar *
-peas_dirs_os_x_get_resource_dir (const gchar *subdir,
- const gchar *default_dir)
+char *
+peas_dirs_os_x_get_resource_dir (const char *subdir,
+ const char *default_dir)
{
- gchar *res_dir;
- gchar *ret;
+ char *res_dir;
+ char *ret;
res_dir = peas_dirs_os_x_get_bundle_resource_dir ();
@@ -85,23 +85,23 @@ peas_dirs_os_x_get_resource_dir (const gchar *subdir,
return ret;
}
-gchar *
+char *
peas_dirs_os_x_get_data_dir (void)
{
return peas_dirs_os_x_get_resource_dir ("share", DATADIR);
}
-gchar *
+char *
peas_dirs_os_x_get_lib_dir (void)
{
return peas_dirs_os_x_get_resource_dir ("lib", LIBDIR);
}
-gchar *
+char *
peas_dirs_os_x_get_locale_dir (void)
{
- gchar *res_dir;
- gchar *ret;
+ char *res_dir;
+ char *ret;
res_dir = peas_dirs_os_x_get_bundle_resource_dir ();
diff --git a/libpeas/peas-utils.c b/libpeas/peas-utils.c
index d65e22c..433e6cf 100644
--- a/libpeas/peas-utils.c
+++ b/libpeas/peas-utils.c
@@ -30,15 +30,15 @@
#include "peas-utils.h"
-static const gchar *all_plugin_loaders[] = {
+static const char *all_plugin_loaders[] = {
"c", "lua5.1", "python",
};
-static const gchar *all_plugin_loader_modules[] = {
+static const char *all_plugin_loader_modules[] = {
"cloader", "lua51loader", "pythonloader",
};
-static const gint conflicting_plugin_loaders[PEAS_UTILS_N_LOADERS][2] = {
+static const int conflicting_plugin_loaders[PEAS_UTILS_N_LOADERS][2] = {
{ -1, -1 }, /* c => {} */
{ -1, -1 }, /* lua5.1 => {} */
{ -1, -1 }, /* python => {} */
@@ -113,7 +113,7 @@ find_base_class_and_interfaces (GType exten_type)
}
else
{
- gint i;
+ int i;
GType *interfaces;
interfaces = g_type_interfaces (exten_type, NULL);
@@ -163,7 +163,7 @@ get_base_class_and_interfaces (GType exten_type,
}
static inline GParamSpec *
-find_param_spec_for_prerequisites (const gchar *name,
+find_param_spec_for_prerequisites (const char *name,
GObjectClass *base_class,
gpointer *ifaces)
{
@@ -183,7 +183,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gboolean
peas_utils_properties_array_to_parameter_list (GType exten_type,
guint n_properties,
- const gchar **prop_names,
+ const char **prop_names,
const GValue *prop_values,
GParameter *parameters)
{
@@ -235,15 +235,15 @@ error:
}
gboolean
-peas_utils_valist_to_parameter_list (GType exten_type,
- const gchar *first_property,
- va_list args,
- GParameter **params,
- guint *n_params)
+peas_utils_valist_to_parameter_list (GType exten_type,
+ const char *first_property,
+ va_list args,
+ GParameter **params,
+ guint *n_params)
{
gpointer *ifaces;
GObjectClass *base_class;
- const gchar *name;
+ const char *name;
guint n_allocated_params;
g_return_val_if_fail (G_TYPE_IS_INTERFACE (exten_type) ||
@@ -258,7 +258,7 @@ peas_utils_valist_to_parameter_list (GType exten_type,
name = first_property;
while (name)
{
- gchar *error_msg = NULL;
+ char *error_msg = NULL;
GParamSpec *pspec;
pspec = find_param_spec_for_prerequisites (name, base_class, ifaces);
@@ -291,7 +291,7 @@ peas_utils_valist_to_parameter_list (GType exten_type,
goto error;
}
- name = va_arg (args, gchar*);
+ name = va_arg (args, char*);
}
return TRUE;
@@ -306,12 +306,12 @@ error:
}
G_GNUC_END_IGNORE_DEPRECATIONS
-gint
-peas_utils_get_loader_id (const gchar *loader)
+int
+peas_utils_get_loader_id (const char *loader)
{
- gint i;
+ int i;
gsize len;
- gchar lowercase[32];
+ char lowercase[32];
len = strlen (loader);
@@ -333,8 +333,8 @@ peas_utils_get_loader_id (const gchar *loader)
return -1;
}
-const gchar *
-peas_utils_get_loader_from_id (gint loader_id)
+const char *
+peas_utils_get_loader_from_id (int loader_id)
{
g_return_val_if_fail (loader_id >= 0, NULL);
g_return_val_if_fail (loader_id < PEAS_UTILS_N_LOADERS, NULL);
@@ -342,8 +342,8 @@ peas_utils_get_loader_from_id (gint loader_id)
return all_plugin_loaders[loader_id];
}
-const gchar *
-peas_utils_get_loader_module_from_id (gint loader_id)
+const char *
+peas_utils_get_loader_module_from_id (int loader_id)
{
g_return_val_if_fail (loader_id >= 0, NULL);
g_return_val_if_fail (loader_id < PEAS_UTILS_N_LOADERS, NULL);
@@ -351,8 +351,8 @@ peas_utils_get_loader_module_from_id (gint loader_id)
return all_plugin_loader_modules[loader_id];
}
-const gint *
-peas_utils_get_conflicting_loaders_from_id (gint loader_id)
+const int *
+peas_utils_get_conflicting_loaders_from_id (int loader_id)
{
g_return_val_if_fail (loader_id >= 0, NULL);
g_return_val_if_fail (loader_id < PEAS_UTILS_N_LOADERS, NULL);
diff --git a/libpeas/peas-utils.h b/libpeas/peas-utils.h
index 227f9cc..a01c4b6 100644
--- a/libpeas/peas-utils.h
+++ b/libpeas/peas-utils.h
@@ -31,16 +31,16 @@
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gboolean peas_utils_properties_array_to_parameter_list (GType exten_type,
guint n_properties,
- const gchar **prop_names,
+ const char **prop_names,
const GValue *prop_values,
GParameter *params);
gboolean peas_utils_valist_to_parameter_list (GType exten_type,
- const gchar *first_property,
+ const char *first_property,
va_list var_args,
GParameter **params,
guint *n_params);
G_GNUC_END_IGNORE_DEPRECATIONS
-gint peas_utils_get_loader_id (const gchar *loader) G_GNUC_CONST;
-const gchar *peas_utils_get_loader_from_id (gint loader_id) G_GNUC_CONST;
-const gchar *peas_utils_get_loader_module_from_id (gint loader_id) G_GNUC_CONST;
-const gint *peas_utils_get_conflicting_loaders_from_id (gint loader_id) G_GNUC_CONST;
+int peas_utils_get_loader_id (const char *loader) G_GNUC_CONST;
+const char *peas_utils_get_loader_from_id (int loader_id) G_GNUC_CONST;
+const char *peas_utils_get_loader_module_from_id (int loader_id) G_GNUC_CONST;
+const int *peas_utils_get_conflicting_loaders_from_id (int loader_id) G_GNUC_CONST;
diff --git a/loaders/lua5.1/peas-lua-internal.c b/loaders/lua5.1/peas-lua-internal.c
index 5530015..a72a4b0 100644
--- a/loaders/lua5.1/peas-lua-internal.c
+++ b/loaders/lua5.1/peas-lua-internal.c
@@ -37,7 +37,7 @@ static gpointer failed_err_key = NULL;
static int
failed_fn (lua_State *L)
{
- gchar *msg;
+ char *msg;
/* The first parameter is the Hooks table instance */
luaL_checktype (L, 1, LUA_TTABLE);
@@ -96,10 +96,10 @@ peas_lua_internal_shutdown (lua_State *L)
}
gboolean
-peas_lua_internal_call (lua_State *L,
- const gchar *name,
- guint n_args,
- gint return_type)
+peas_lua_internal_call (lua_State *L,
+ const char *name,
+ guint n_args,
+ int return_type)
{
/* Get the Hooks table */
lua_pushlightuserdata (L, &hooks_key);
diff --git a/loaders/lua5.1/peas-lua-internal.h b/loaders/lua5.1/peas-lua-internal.h
index 5624e34..ce75cb6 100644
--- a/loaders/lua5.1/peas-lua-internal.h
+++ b/loaders/lua5.1/peas-lua-internal.h
@@ -28,12 +28,11 @@
G_BEGIN_DECLS
-gboolean peas_lua_internal_setup (lua_State *L);
-void peas_lua_internal_shutdown (lua_State *L);
-
-gboolean peas_lua_internal_call (lua_State *L,
- const gchar *name,
- guint n_args,
- gint return_type);
+gboolean peas_lua_internal_setup (lua_State *L);
+void peas_lua_internal_shutdown (lua_State *L);
+gboolean peas_lua_internal_call (lua_State *L,
+ const char *name,
+ guint n_args,
+ int return_type);
G_END_DECLS
diff --git a/loaders/lua5.1/peas-lua-utils.c b/loaders/lua5.1/peas-lua-utils.c
index a74fa34..955473a 100644
--- a/loaders/lua5.1/peas-lua-utils.c
+++ b/loaders/lua5.1/peas-lua-utils.c
@@ -31,8 +31,8 @@
gboolean
-peas_lua_utils_require (lua_State *L,
- const gchar *name)
+peas_lua_utils_require (lua_State *L,
+ const char *name)
{
luaL_checkstack (L, 2, "");
@@ -69,11 +69,11 @@ peas_lua_utils_check_version (lua_State *L,
guint req_minor,
guint req_micro)
{
- const gchar *version_str;
- gchar **version_str_parts;
- gint n_version_parts;
+ const char *version_str;
+ char **version_str_parts;
+ int n_version_parts;
gint64 *version_parts;
- gint i;
+ int i;
gboolean success = FALSE;
lua_getfield (L, -1, "_VERSION");
@@ -86,7 +86,7 @@ peas_lua_utils_check_version (lua_State *L,
for (i = 0; i < n_version_parts; ++i)
{
- gchar *end;
+ char *end;
version_parts[i] = g_ascii_strtoll (version_str_parts[i], &end, 10);
@@ -120,7 +120,7 @@ error:
return success;
}
-static gint
+static int
traceback (lua_State *L)
{
/* Always ignore an error that isn't a string */
@@ -176,16 +176,16 @@ peas_lua_utils_call (lua_State *L,
}
gboolean
-peas_lua_utils_load_resource (lua_State *L,
- const gchar *name,
- guint n_args,
- guint n_results)
+peas_lua_utils_load_resource (lua_State *L,
+ const char *name,
+ guint n_args,
+ guint n_results)
{
- gchar *resource_path;
+ char *resource_path;
GBytes *lua_resource;
- const gchar *code;
+ const char *code;
gsize code_len;
- gchar *lua_filename;
+ char *lua_filename;
/* We don't use the byte-compiled Lua source
* because glib-compile-resources cannot output
diff --git a/loaders/lua5.1/peas-lua-utils.h b/loaders/lua5.1/peas-lua-utils.h
index 15352df..4183854 100644
--- a/loaders/lua5.1/peas-lua-utils.h
+++ b/loaders/lua5.1/peas-lua-utils.h
@@ -30,19 +30,16 @@ G_BEGIN_DECLS
gboolean peas_lua_utils_require (lua_State *L,
- const gchar *name);
-
+ const char *name);
gboolean peas_lua_utils_check_version (lua_State *L,
guint req_major,
guint req_minor,
guint req_micro);
-
gboolean peas_lua_utils_call (lua_State *L,
guint n_args,
guint n_results);
-
gboolean peas_lua_utils_load_resource (lua_State *L,
- const gchar *name,
+ const char *name,
guint n_args,
guint n_results);
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index d54e023..7106b50 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -161,7 +161,7 @@ peas_plugin_loader_python_load (PeasPluginLoader *loader,
PeasPluginInfo *info)
{
PeasPluginLoaderPython *pyloader = PEAS_PLUGIN_LOADER_PYTHON (loader);
- const gchar *module_dir, *module_name;
+ const char *module_dir, *module_name;
PyObject *pymodule;
PyGILState_STATE state = PyGILState_Ensure ();
diff --git a/loaders/python/peas-python-internal.c b/loaders/python/peas-python-internal.c
index 9ab55d7..22fd93a 100644
--- a/loaders/python/peas-python-internal.c
+++ b/loaders/python/peas-python-internal.c
@@ -37,8 +37,8 @@ static PyObject *
failed_fn (PyObject *self,
PyObject *args)
{
- const gchar *msg;
- gchar *clean_msg;
+ const char *msg;
+ char *clean_msg;
if (!PyArg_ParseTuple (args, "s:Hooks.failed", &msg))
return NULL;
@@ -63,7 +63,7 @@ static PyMethodDef failed_method_def = {
gboolean
peas_python_internal_setup (gboolean already_initialized)
{
- const gchar *prgname;
+ const char *prgname;
GBytes *internal_python = NULL;
PyObject *builtins_module, *globals, *result;
PyObject *code = NULL, *failed_method = NULL;
@@ -185,9 +185,9 @@ peas_python_internal_shutdown (void)
}
PyObject *
-peas_python_internal_call (const gchar *name,
+peas_python_internal_call (const char *name,
PyTypeObject *return_type,
- const gchar *format,
+ const char *format,
...)
{
PyObject *args;
diff --git a/loaders/python/peas-python-internal.h b/loaders/python/peas-python-internal.h
index f3b3aa3..1f4c956 100644
--- a/loaders/python/peas-python-internal.h
+++ b/loaders/python/peas-python-internal.h
@@ -33,12 +33,11 @@
G_BEGIN_DECLS
-gboolean peas_python_internal_setup (gboolean already_initialized);
+gboolean peas_python_internal_setup (gboolean already_initialized);
void peas_python_internal_shutdown (void);
-
-PyObject *peas_python_internal_call (const gchar *name,
+PyObject *peas_python_internal_call (const char *name,
PyTypeObject *return_type,
- const gchar *format,
+ const char *format,
...);
G_END_DECLS
diff --git a/tests/libpeas/engine.c b/tests/libpeas/engine.c
index cf8a3be..3b3985f 100644
--- a/tests/libpeas/engine.c
+++ b/tests/libpeas/engine.c
@@ -266,8 +266,8 @@ list_index (GListModel *model,
static void
test_engine_plugin_list (PeasEngine *engine)
{
- const gchar * const *dependencies;
- gint builtin_index, loadable_index, two_deps_index;
+ const char * const *dependencies;
+ int builtin_index, loadable_index, two_deps_index;
PeasPluginInfo *builtin_info, *loadable_info, *two_deps_info;
builtin_info = peas_engine_get_plugin_info (engine, "builtin");
@@ -296,7 +296,7 @@ test_engine_plugin_list (PeasEngine *engine)
static void
load_plugin_cb (PeasEngine *engine,
PeasPluginInfo *info,
- gint *loaded)
+ int *loaded)
{
/* PeasEngine:load is not stopped if loading fails */
if (peas_plugin_info_is_loaded (info))
@@ -306,7 +306,7 @@ load_plugin_cb (PeasEngine *engine,
static void
unload_plugin_cb (PeasEngine *engine,
PeasPluginInfo *info,
- gint *loaded)
+ int *loaded)
{
--(*loaded);
}
@@ -314,7 +314,7 @@ unload_plugin_cb (PeasEngine *engine,
static void
notify_loaded_plugins_cb (PeasEngine *engine,
GParamSpec *pspec,
- gchar ***loaded_plugins)
+ char ***loaded_plugins)
{
if (*loaded_plugins != NULL)
g_strfreev (*loaded_plugins);
@@ -326,9 +326,9 @@ static void
test_engine_loaded_plugins (PeasEngine *engine)
{
PeasPluginInfo *info;
- gint loaded = 0;
- gchar **load_plugins;
- gchar **loaded_plugins = NULL;
+ int loaded = 0;
+ char **load_plugins;
+ char **loaded_plugins = NULL;
testing_util_push_log_hook ("Could not find plugin 'does-not-exist'*");
@@ -361,8 +361,8 @@ test_engine_loaded_plugins (PeasEngine *engine)
g_assert (loaded_plugins != NULL);
g_assert (loaded_plugins[0] == NULL);
- load_plugins = g_new0 (gchar *, 1);
- peas_engine_set_loaded_plugins (engine, (const gchar **) load_plugins);
+ load_plugins = g_new0 (char *, 1);
+ peas_engine_set_loaded_plugins (engine, (const char **) load_plugins);
g_strfreev (load_plugins);
g_assert_cmpint (loaded, ==, 0);
@@ -371,9 +371,9 @@ test_engine_loaded_plugins (PeasEngine *engine)
/* Load a plugin */
- load_plugins = g_new0 (gchar *, 2);
+ load_plugins = g_new0 (char *, 2);
load_plugins[0] = g_strdup ("loadable");
- peas_engine_set_loaded_plugins (engine, (const gchar **) load_plugins);
+ peas_engine_set_loaded_plugins (engine, (const char **) load_plugins);
g_strfreev (load_plugins);
g_assert_cmpint (loaded, ==, 1);
@@ -383,9 +383,9 @@ test_engine_loaded_plugins (PeasEngine *engine)
/* Try to load an unavailable plugin */
- load_plugins = g_new0 (gchar *, 2);
+ load_plugins = g_new0 (char *, 2);
load_plugins[0] = g_strdup ("unavailable");
- peas_engine_set_loaded_plugins (engine, (const gchar **) load_plugins);
+ peas_engine_set_loaded_plugins (engine, (const char **) load_plugins);
g_strfreev (load_plugins);
g_assert_cmpint (loaded, ==, 0);
diff --git a/tests/libpeas/extension-set.c b/tests/libpeas/extension-set.c
index 60cec72..9f3a48e 100644
--- a/tests/libpeas/extension-set.c
+++ b/tests/libpeas/extension-set.c
@@ -40,7 +40,7 @@ struct _TestFixture {
};
/* Have dependencies before the plugin that requires them */
-static const gchar *loadable_plugins[] = {
+static const char *loadable_plugins[] = {
"loadable", "has-dep", "self-dep"
};
@@ -48,7 +48,7 @@ static void
extension_added_cb (PeasExtensionSet *extension_set,
PeasPluginInfo *info,
GObject *extension,
- gint *active)
+ int *active)
{
++(*active);
}
@@ -57,16 +57,16 @@ static void
extension_removed_cb (PeasExtensionSet *extension_set,
PeasPluginInfo *info,
GObject *extension,
- gint *active)
+ int *active)
{
--(*active);
}
static PeasExtensionSet *
testing_extension_set_new (PeasEngine *engine,
- gint *active)
+ int *active)
{
- gint i;
+ int i;
PeasPluginInfo *info;
PeasExtensionSet *extension_set;
@@ -77,7 +77,7 @@ testing_extension_set_new (PeasEngine *engine,
if (active == NULL)
{
- active = g_new (gint, 1);
+ active = g_new (int, 1);
g_object_set_data_full (G_OBJECT (extension_set),
"testing-extension-set-active", active,
g_free);
@@ -167,7 +167,7 @@ test_extension_set_create_valid_with_properties (PeasEngine *engine)
GValue prop_value = G_VALUE_INIT;
GObject *obj;
GObject *obj_cmp = NULL;
- const gchar *prop_names[1] = { "object" };
+ const char *prop_names[1] = { "object" };
obj = g_object_new (G_TYPE_OBJECT, NULL);
g_value_init (&prop_value, G_TYPE_OBJECT);
@@ -227,8 +227,8 @@ test_extension_set_create_invalid_with_properties (PeasEngine *engine)
{
PeasExtensionSet *extension_set;
GValue prop_values[2] = { G_VALUE_INIT };
- const gchar *prop_names[2] = { "object", NULL };
- const gchar *prop_names_not_exist[1] = { "aleb" };
+ const char *prop_names[2] = { "object", NULL };
+ const char *prop_names_not_exist[1] = { "aleb" };
guint n_elements;
testing_util_push_log_hook ("*property name*should not be NULL.");
@@ -281,7 +281,7 @@ test_extension_set_create_invalid_with_properties (PeasEngine *engine)
static void
test_extension_set_extension_added (PeasEngine *engine)
{
- gint active;
+ int active;
PeasExtensionSet *extension_set;
/* This will check that an extension is added
@@ -301,7 +301,7 @@ test_extension_set_extension_added (PeasEngine *engine)
static void
test_extension_set_extension_removed (PeasEngine *engine)
{
- gint i, active;
+ int i, active;
PeasPluginInfo *info;
PeasExtensionSet *extension_set;
@@ -352,7 +352,7 @@ test_extension_set_get_extension (PeasEngine *engine)
static void
test_extension_set_foreach (PeasEngine *engine)
{
- gint count = 0;
+ int count = 0;
PeasExtensionSet *extension_set;
extension_set = testing_extension_set_new (engine, NULL);
@@ -369,10 +369,10 @@ test_extension_set_foreach (PeasEngine *engine)
static void
ordering_cb (PeasExtensionSet *set,
PeasPluginInfo *info,
- GObject *extension,
+ GObject *extension,
GList **order)
{
- const gchar *order_module_name = (const gchar *) (*order)->data;
+ const char *order_module_name = (const char *) (*order)->data;
g_assert_cmpstr (order_module_name, ==,
peas_plugin_info_get_module_name (info));
diff --git a/tests/libpeas/introspection/introspection-abstract.c b/tests/libpeas/introspection/introspection-abstract.c
index 73bd4cb..8eb9da9 100644
--- a/tests/libpeas/introspection/introspection-abstract.c
+++ b/tests/libpeas/introspection/introspection-abstract.c
@@ -26,7 +26,7 @@
#include "introspection-abstract.h"
typedef struct {
- gint value;
+ int value;
} IntrospectionAbstractPrivate;
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (IntrospectionAbstract,
@@ -110,7 +110,7 @@ introspection_abstract_init (IntrospectionAbstract *prereq)
{
}
-gint
+int
introspection_abstract_get_value (IntrospectionAbstract *abstract)
{
IntrospectionAbstractPrivate *priv = GET_PRIV (abstract);
@@ -122,7 +122,7 @@ introspection_abstract_get_value (IntrospectionAbstract *abstract)
void
introspection_abstract_set_value (IntrospectionAbstract *abstract,
- gint value)
+ int value)
{
IntrospectionAbstractPrivate *priv = GET_PRIV (abstract);
diff --git a/tests/libpeas/introspection/introspection-abstract.h b/tests/libpeas/introspection/introspection-abstract.h
index 3f6a2f5..3f41d1f 100644
--- a/tests/libpeas/introspection/introspection-abstract.h
+++ b/tests/libpeas/introspection/introspection-abstract.h
@@ -57,10 +57,10 @@ GType introspection_abstract_get_type (void) G_GNUC_CONST;
PEAS_TEST_EXPORT
-gint introspection_abstract_get_value (IntrospectionAbstract *abstract);
+int introspection_abstract_get_value (IntrospectionAbstract *abstract);
PEAS_TEST_EXPORT
void introspection_abstract_set_value (IntrospectionAbstract *abstract,
- gint value);
+ int value);
G_END_DECLS
diff --git a/tests/libpeas/introspection/introspection-callable.c b/tests/libpeas/introspection/introspection-callable.c
index 0fdd18f..c818186 100644
--- a/tests/libpeas/introspection/introspection-callable.c
+++ b/tests/libpeas/introspection/introspection-callable.c
@@ -38,7 +38,7 @@ introspection_callable_default_init (IntrospectionCallableInterface *iface)
*
* Returns: (transfer full):
*/
-gchar *
+char *
introspection_callable_call_with_return (IntrospectionCallable *callable)
{
IntrospectionCallableInterface *iface;
@@ -96,9 +96,9 @@ introspection_callable_call_single_arg (IntrospectionCallable *callable,
*/
void
introspection_callable_call_multi_args (IntrospectionCallable *callable,
- gint in,
- gint *out,
- gint *inout)
+ int in,
+ int *out,
+ int *inout)
{
IntrospectionCallableInterface *iface;
diff --git a/tests/libpeas/introspection/introspection-callable.h b/tests/libpeas/introspection/introspection-callable.h
index 2a880c4..eb63765 100644
--- a/tests/libpeas/introspection/introspection-callable.h
+++ b/tests/libpeas/introspection/introspection-callable.h
@@ -45,14 +45,14 @@ struct _IntrospectionCallableInterface {
GTypeInterface g_iface;
/* Virtual public methods */
- gchar *(*call_with_return) (IntrospectionCallable *callable);
+ char *(*call_with_return) (IntrospectionCallable *callable);
void (*call_no_args) (IntrospectionCallable *callable);
void (*call_single_arg) (IntrospectionCallable *callable,
gboolean *called);
void (*call_multi_args) (IntrospectionCallable *callable,
- gint in,
- gint *out,
- gint *inout);
+ int in,
+ int *out,
+ int *inout);
/* libpeas must have an invoker to implement an interface's vfunc */
void (*no_invoker_) (IntrospectionCallable *callable);
@@ -65,7 +65,7 @@ PEAS_TEST_EXPORT
GType introspection_callable_get_type (void) G_GNUC_CONST;
PEAS_TEST_EXPORT
-gchar *introspection_callable_call_with_return (IntrospectionCallable *callable);
+char *introspection_callable_call_with_return (IntrospectionCallable *callable);
PEAS_TEST_EXPORT
@@ -77,8 +77,8 @@ void introspection_callable_call_single_arg (IntrospectionCallable *cal
PEAS_TEST_EXPORT
void introspection_callable_call_multi_args (IntrospectionCallable *callable,
- gint in,
- gint *out,
- gint *inout);
+ int in,
+ int *out,
+ int *inout);
G_END_DECLS
diff --git a/tests/libpeas/introspection/introspection-prerequisite.c b/tests/libpeas/introspection/introspection-prerequisite.c
index 1e3ef57..50925bf 100644
--- a/tests/libpeas/introspection/introspection-prerequisite.c
+++ b/tests/libpeas/introspection/introspection-prerequisite.c
@@ -26,7 +26,7 @@
#include "introspection-prerequisite.h"
typedef struct {
- gint value;
+ int value;
} IntrospectionPrerequisitePrivate;
G_DEFINE_TYPE_WITH_PRIVATE (IntrospectionPrerequisite,
diff --git a/tests/libpeas/plugin-info.c b/tests/libpeas/plugin-info.c
index 8253811..98f124d 100644
--- a/tests/libpeas/plugin-info.c
+++ b/tests/libpeas/plugin-info.c
@@ -62,7 +62,7 @@ test_plugin_info_verify_full_info (PeasEngine *engine)
{
PeasPluginInfo *info;
GError *error = NULL;
- const gchar * const *authors;
+ const char * const *authors;
info = peas_engine_get_plugin_info (engine, "full-info");
@@ -112,7 +112,7 @@ test_plugin_info_verify_min_info (PeasEngine *engine)
{
PeasPluginInfo *info;
GError *error = NULL;
- const gchar * const *authors;
+ const char * const *authors;
info = peas_engine_get_plugin_info (engine, "min-info");
@@ -173,7 +173,7 @@ static void
test_plugin_info_os_dependant_help (PeasEngine *engine)
{
PeasPluginInfo *info;
- const gchar *help;
+ const char *help;
info = peas_engine_get_plugin_info (engine, "os-dependant-help");
diff --git a/tests/libpeas/plugins/extension-c/extension-c-plugin.c b/tests/libpeas/plugins/extension-c/extension-c-plugin.c
index 758c3de..eba036d 100644
--- a/tests/libpeas/plugins/extension-c/extension-c-plugin.c
+++ b/tests/libpeas/plugins/extension-c/extension-c-plugin.c
@@ -88,7 +88,7 @@ testing_extension_c_plugin_call_no_args (IntrospectionCallable *callable)
{
}
-static gchar *
+static char *
testing_extension_c_plugin_call_with_return (IntrospectionCallable *callable)
{
return g_strdup ("Hello, World!");
@@ -103,9 +103,9 @@ testing_extension_c_plugin_call_single_arg (IntrospectionCallable *callable,
static void
testing_extension_c_plugin_call_multi_args (IntrospectionCallable *callable,
- gint in,
- gint *out,
- gint *inout)
+ int in,
+ int *out,
+ int *inout)
{
*out = *inout;
*inout = in;
diff --git a/tests/libpeas/testing/testing-extension.c b/tests/libpeas/testing/testing-extension.c
index d4790d5..dcf4d52 100644
--- a/tests/libpeas/testing/testing-extension.c
+++ b/tests/libpeas/testing/testing-extension.c
@@ -47,8 +47,8 @@ struct _TestFixture {
PeasPluginInfo *info;
};
-static gchar *loader = NULL;
-static gchar *extension_plugin = NULL;
+static char *loader = NULL;
+static char *extension_plugin = NULL;
static void
test_setup (TestFixture *fixture,
@@ -82,7 +82,7 @@ static void
test_extension_garbage_collect (PeasEngine *engine,
PeasPluginInfo *info)
{
- gchar **loaded_plugins;
+ char **loaded_plugins;
peas_engine_garbage_collect (engine);
@@ -169,7 +169,7 @@ test_extension_create_valid_with_properties (PeasEngine *engine,
GObject *extension;
IntrospectionAbstract *abstract;
GValue prop_values[1] = { G_VALUE_INIT };
- const gchar *prop_names[1] = { "abstract-property" };
+ const char *prop_names[1] = { "abstract-property" };
g_assert (peas_engine_load_plugin (engine, info));
@@ -236,9 +236,9 @@ test_extension_create_invalid_with_properties (PeasEngine *engine,
{
GObject *extension;
GValue prop_values[1] = { G_VALUE_INIT };
- const gchar *prop_names[1] = { NULL };
+ const char *prop_names[1] = { NULL };
GValue prop_values2[1] = { G_VALUE_INIT };
- const gchar *prop_names2[1] = { "does-not-exist" };
+ const char *prop_names2[1] = { "does-not-exist" };
g_value_init (&prop_values[0], G_TYPE_STRING);
g_value_set_string (&prop_values[0], "foo");
@@ -301,7 +301,7 @@ test_extension_create_with_prerequisite (PeasEngine *engine,
PeasPluginInfo *info)
{
GObject *extension;
- gint prerequisite_property = -1;
+ int prerequisite_property = -1;
extension = peas_engine_create_extension (engine, info,
INTROSPECTION_TYPE_HAS_PREREQUISITE,
@@ -323,7 +323,7 @@ static void
test_extension_reload (PeasEngine *engine,
PeasPluginInfo *info)
{
- gint i;
+ int i;
for (i = 0; i < 3; ++i)
{
@@ -398,11 +398,11 @@ test_extension_abstract (PeasEngine *engine,
g_object_unref (extension);
}
-static gint
+static int
run_in_multiple_threads (GFunc func,
gpointer user_data)
{
- gint i, n_threads;
+ int i, n_threads;
GThreadPool *pool;
GError *error = NULL;
@@ -428,7 +428,7 @@ static void
multiple_threads_loaders_in_thread (guint nth_thread,
gboolean use_nonglobal_loaders)
{
- gint i, j;
+ int i, j;
PeasEngine *engine;
PeasPluginInfo *info;
GObject *extension;
@@ -479,7 +479,7 @@ static void
multiple_threads_callbacks_in_thread (guint nth_thread,
IntrospectionActivatable *activatable)
{
- gint i;
+ int i;
for (i = 0; i < 100; ++i)
introspection_activatable_update_state (activatable);
@@ -490,7 +490,7 @@ test_extension_multiple_threads_callbacks (PeasEngine *engine,
PeasPluginInfo *info)
{
GObject *extension;
- gint n_threads, update_count;
+ int n_threads, update_count;
extension = peas_engine_create_extension (engine, info,
INTROSPECTION_TYPE_ACTIVATABLE,
@@ -507,26 +507,26 @@ test_extension_multiple_threads_callbacks (PeasEngine *engine,
#define _EXTENSION_TEST(loader, path, ftest) \
G_STMT_START { \
- gchar *full_path = g_strdup_printf (EXTENSION_TEST_NAME (%s, "%s"), \
- loader, path); \
-\
- g_test_add (full_path, TestFixture, \
- (gpointer) test_extension_##ftest, \
- test_setup, test_runner, test_teardown); \
-\
- g_free (full_path); \
+ char *full_path = g_strdup_printf (EXTENSION_TEST_NAME (%s, "%s"), \
+ loader, path); \
+ \
+ g_test_add (full_path, TestFixture, \
+ (gpointer) test_extension_##ftest, \
+ test_setup, test_runner, test_teardown); \
+ \
+ g_free (full_path); \
} G_STMT_END
void
-testing_extension_basic (const gchar *loader_)
+testing_extension_basic (const char *loader_)
{
- gint i, j;
- gchar *loader_name;
+ int i, j;
+ char *loader_name;
PeasEngine *engine;
loader = g_strdup (loader_);
- loader_name = g_new0 (gchar, strlen (loader) + 1);
+ loader_name = g_new0 (char, strlen (loader) + 1);
for (i = 0, j = 0; loader[i] != '\0'; ++i)
{
if (loader[i] != '.')
@@ -581,7 +581,7 @@ testing_extension_basic (const gchar *loader_)
}
void
-testing_extension_add (const gchar *path,
+testing_extension_add (const char *path,
GTestDataFunc func)
{
g_test_add (path, TestFixture, (gpointer) func,
diff --git a/tests/libpeas/testing/testing-extension.h b/tests/libpeas/testing/testing-extension.h
index ef9ce30..ded89e1 100644
--- a/tests/libpeas/testing/testing-extension.h
+++ b/tests/libpeas/testing/testing-extension.h
@@ -30,15 +30,12 @@
G_BEGIN_DECLS
PEAS_TEST_EXPORT
-void testing_extension_basic (const gchar *loader);
-
+void testing_extension_basic (const char *loader);
PEAS_TEST_EXPORT
-void testing_extension_add (const gchar *path,
+void testing_extension_add (const char *path,
GTestDataFunc func);
-
-
PEAS_TEST_EXPORT
-int testing_extension_run_tests (void);
+int testing_extension_run_tests (void);
#define testing_extension_all(loader) \
testing_extension_basic (loader);
diff --git a/tests/libpeas/testing/testing.c b/tests/libpeas/testing/testing.c
index 083b8a2..3bfa99e 100644
--- a/tests/libpeas/testing/testing.c
+++ b/tests/libpeas/testing/testing.c
@@ -32,8 +32,8 @@
#include "testing.h"
void
-testing_init (gint *argc,
- gchar ***argv)
+testing_init (int *argc,
+ char ***argv)
{
GError *error = NULL;
static gboolean initialized = FALSE;
diff --git a/tests/libpeas/testing/testing.h b/tests/libpeas/testing/testing.h
index 73a5b95..ea05b60 100644
--- a/tests/libpeas/testing/testing.h
+++ b/tests/libpeas/testing/testing.h
@@ -29,8 +29,8 @@
G_BEGIN_DECLS
PEAS_TEST_EXPORT
-void testing_init (gint *argc,
- gchar ***argv);
+void testing_init (int *argc,
+ char ***argv);
PEAS_TEST_EXPORT
PeasEngine *testing_engine_new_full (gboolean nonglobal_loaders);
diff --git a/tests/testing-util/testing-util.c b/tests/testing-util/testing-util.c
index 905b407..464460d 100644
--- a/tests/testing-util/testing-util.c
+++ b/tests/testing-util/testing-util.c
@@ -33,7 +33,7 @@
#include "testing-util.h"
typedef struct {
- const gchar *pattern;
+ const char *pattern;
gboolean hit;
} LogHook;
@@ -106,9 +106,9 @@ get_log_hooks (void)
}
static void
-log_handler (const gchar *log_domain,
+log_handler (const char *log_domain,
GLogLevelFlags log_level,
- const gchar *message,
+ const char *message,
gpointer user_data)
{
LogHooks *log_hooks = get_log_hooks ();
@@ -136,7 +136,7 @@ log_handler (const gchar *log_domain,
for (i = 0; i < hooks->len; ++i)
{
LogHook *hook = g_ptr_array_index (hooks, i);
- gchar *msg;
+ char *msg;
if (!g_pattern_match_simple (hook->pattern, message))
continue;
@@ -306,7 +306,7 @@ testing_util_run_tests (void)
}
void
-testing_util_push_log_hook (const gchar *pattern)
+testing_util_push_log_hook (const char *pattern)
{
LogHooks *log_hooks = get_log_hooks ();
LogHook *hook;
@@ -402,7 +402,7 @@ testing_util_pop_log_hooks (void)
for (i = 0; i < hits->len; ++i)
{
- const gchar *hit = g_ptr_array_index (hits, i);
+ const char *hit = g_ptr_array_index (hits, i);
g_string_append_printf (msg, "\n\t%s", hit);
}
diff --git a/tests/testing-util/testing-util.h b/tests/testing-util/testing-util.h
index 6eadad5..f5ac477 100644
--- a/tests/testing-util/testing-util.h
+++ b/tests/testing-util/testing-util.h
@@ -48,7 +48,7 @@ int testing_util_run_tests (void);
PEAS_TEST_EXPORT
-void testing_util_push_log_hook (const gchar *pattern);
+void testing_util_push_log_hook (const char *pattern);
PEAS_TEST_EXPORT
void testing_util_pop_log_hook (void);