summaryrefslogtreecommitdiff
path: root/loaders
diff options
context:
space:
mode:
authorGarrett Regier <garrettregier@gmail.com>2014-12-18 03:43:08 -0800
committerGarrett Regier <garrettregier@gmail.com>2014-12-18 03:43:08 -0800
commit15fd57bb4715169570dddf2afedb2eeaac606d4b (patch)
tree7259a17110654a8d3dbfec26b06b18bbeea6d3db /loaders
parent79a85d6185c08cfc1da968fcd7f5dfd043fadc4a (diff)
downloadlibpeas-15fd57bb4715169570dddf2afedb2eeaac606d4b.tar.gz
Use the GQuark API for GObject data
Diffstat (limited to 'loaders')
-rw-r--r--loaders/lua5.1/peas-plugin-loader-lua.c7
-rw-r--r--loaders/python/peas-plugin-loader-python.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/loaders/lua5.1/peas-plugin-loader-lua.c b/loaders/lua5.1/peas-plugin-loader-lua.c
index 21208eb..9f08309 100644
--- a/loaders/lua5.1/peas-plugin-loader-lua.c
+++ b/loaders/lua5.1/peas-plugin-loader-lua.c
@@ -47,6 +47,9 @@ struct _PeasPluginLoaderLuaPrivate {
G_DEFINE_TYPE (PeasPluginLoaderLua, peas_plugin_loader_lua, PEAS_TYPE_PLUGIN_LOADER)
+static
+G_DEFINE_QUARK (peas-extension-type, extension_type)
+
G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
@@ -242,8 +245,8 @@ peas_plugin_loader_lua_create_extension (PeasPluginLoader *loader,
/* We have to remember which interface we are instantiating
* for the deprecated peas_extension_get_extension_type().
*/
- g_object_set_data (object, "peas-extension-type",
- GSIZE_TO_POINTER (exten_type));
+ g_object_set_qdata (object, extension_type_quark (),
+ GSIZE_TO_POINTER (exten_type));
luaL_checkstack (L, 3, "");
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 7f8d06c..6efbe0c 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -53,6 +53,9 @@ struct _PeasPluginLoaderPythonPrivate {
G_DEFINE_TYPE (PeasPluginLoaderPython, peas_plugin_loader_python, PEAS_TYPE_PLUGIN_LOADER)
+static
+G_DEFINE_QUARK (peas-extension-type, extension_type)
+
G_MODULE_EXPORT void
peas_register_types (PeasObjectModule *module)
{
@@ -227,8 +230,8 @@ peas_plugin_loader_python_create_extension (PeasPluginLoader *loader,
/* We have to remember which interface we are instantiating
* for the deprecated peas_extension_get_extension_type().
*/
- g_object_set_data (object, "peas-extension-type",
- GSIZE_TO_POINTER (exten_type));
+ g_object_set_qdata (object, extension_type_quark (),
+ GSIZE_TO_POINTER (exten_type));
pyobject = pygobject_new (object);
pyplinfo = pyg_boxed_new (PEAS_TYPE_PLUGIN_INFO, info, TRUE, TRUE);