gplugin/gplugin

Make property registration consistent

2021-10-09, Elliott Sales de Andrade
cbac138e5c89
Parents 3c0fd3c606db
Children 96777d5e184b
Make property registration consistent

Always order it permissions, construct-only (if applicable), static strings.
And add static strings everywhere, since they are.

Testing Done:
Compile only.

Reviewed at https://reviews.imfreedom.org/r/1010/
--- a/gplugin/gplugin-loader.c Sat Oct 09 22:58:25 2021 -0500
+++ b/gplugin/gplugin-loader.c Sat Oct 09 22:58:51 2021 -0500
@@ -146,7 +146,7 @@
}
static void
-gplugin_loader_class_init(G_GNUC_UNUSED GPluginLoaderClass *klass)
+gplugin_loader_class_init(GPluginLoaderClass *klass)
{
GObjectClass *obj_class = G_OBJECT_CLASS(klass);
--- a/gplugin/gplugin-native-plugin.c Sat Oct 09 22:58:25 2021 -0500
+++ b/gplugin/gplugin-native-plugin.c Sat Oct 09 22:58:51 2021 -0500
@@ -332,7 +332,7 @@
"module",
"module handle",
"The GModule instance of the plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginNativePlugin:load-func:
@@ -343,7 +343,7 @@
"load-func",
"load function pointer",
"address pointer to load function",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginNativePlugin:unload-func:
@@ -354,7 +354,7 @@
"unload-func",
"unload function pointer",
"address pointer to the unload function",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
--- a/gplugin/gplugin-plugin-info.c Sat Oct 09 22:58:25 2021 -0500
+++ b/gplugin/gplugin-plugin-info.c Sat Oct 09 22:58:51 2021 -0500
@@ -584,7 +584,7 @@
"id",
"The ID of the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:provides:
@@ -605,7 +605,7 @@
"provides",
"The additional ids that this plugin provides.",
G_TYPE_STRV,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:priority:
@@ -652,7 +652,7 @@
0,
G_MAXUINT32,
0,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:internal:
@@ -709,7 +709,7 @@
"name",
"The name of the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:version:
@@ -721,7 +721,7 @@
"version",
"The version of the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:license-id:
@@ -741,7 +741,7 @@
"license-id",
"The license id of the plugin according to SPDX",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:license-text:
@@ -754,7 +754,7 @@
"license text",
"The text of the license for the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:license-url:
@@ -767,7 +767,7 @@
"license url",
"The url to the license of the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:icon-name:
@@ -780,7 +780,7 @@
"icon-name",
"The XDG icon name for the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:summary:
@@ -793,7 +793,7 @@
"summary",
"The summary of the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:description:
@@ -806,7 +806,7 @@
"description",
"The description of the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:category:
@@ -823,7 +823,7 @@
"category",
"The category of the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:authors:
@@ -838,7 +838,7 @@
"authors",
"The authors of the plugin",
G_TYPE_STRV,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:website:
@@ -850,7 +850,7 @@
"website",
"The website of the plugin",
NULL,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:dependencies:
@@ -862,7 +862,7 @@
"dependencies",
"The dependencies of the plugin",
G_TYPE_STRV,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
/**
* GPluginPluginInfo:unloadable:
--- a/lua/gplugin-lua-plugin.c Sat Oct 09 22:58:25 2021 -0500
+++ b/lua/gplugin-lua-plugin.c Sat Oct 09 22:58:51 2021 -0500
@@ -184,7 +184,7 @@
"lua-state",
"lua-state",
"The lua state for the plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
--- a/python3/gplugin-python3-plugin.c Sat Oct 09 22:58:25 2021 -0500
+++ b/python3/gplugin-python3-plugin.c Sat Oct 09 22:58:51 2021 -0500
@@ -276,19 +276,19 @@
"module",
"module",
"The python module object",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
properties[PROP_LOAD_FUNC] = g_param_spec_pointer(
"load-func",
"load-func",
"The python load function",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
properties[PROP_UNLOAD_FUNC] = g_param_spec_pointer(
"unload-func",
"unload-func",
"The python unload function",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
--- a/tcc/gplugin-tcc-plugin.c Sat Oct 09 22:58:25 2021 -0500
+++ b/tcc/gplugin-tcc-plugin.c Sat Oct 09 22:58:51 2021 -0500
@@ -183,13 +183,13 @@
"tcc-state",
"tcc-state",
"The TCC compilation context for the plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
properties[PROP_MEM] = g_param_spec_pointer(
"memory",
"memory",
"The memory allocated for the symbol table for the plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties(obj_class, N_PROPERTIES, properties);