--- a/tcc/gplugin-tcc-core.c Thu Feb 12 10:03:50 2015 -0800
+++ b/tcc/gplugin-tcc-core.c Sun Feb 22 13:51:11 2015 -0600
@@ -23,7 +23,7 @@
G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(GError **error) {
+gplugin_query(GPLUGIN_UNUSED GError **error) { const gchar * const authors[] = {
"Eion Robb <eion@robbmob.com>",
@@ -34,10 +34,10 @@
GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
- "name", "C Plugin Loader",
+ "name", "C source plugin loader", "version", GPLUGIN_VERSION,
- "summary", "A plugin that can load C script plugins",
+ "summary", "A plugin that can load C source plugins", "description", "This plugin allows the loading of plugins written in C.",
"website", GPLUGIN_WEBSITE,
@@ -47,17 +47,21 @@
-gplugin_load(GPluginNativePlugin *plugin, GError **error) {
- gplugin_tcc_loader_register(plugin);
- gplugin_tcc_plugin_register(plugin);
+gplugin_load(GPluginNativePlugin *plugin, + GPLUGIN_UNUSED GError **error) +// gplugin_tcc_loader_register(plugin); +// gplugin_tcc_plugin_register(plugin); - gplugin_manager_register_loader(gplugin_tcc_loader_get_type());
+// gplugin_manager_register_loader(gplugin_tcc_loader_get_type()); -gplugin_unload(GPluginNativePlugin *plugin, GError **error) {
+gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin, + GPLUGIN_UNUSED GError **error) --- a/tcc/gplugin-tcc-loader.c Thu Feb 12 10:03:50 2015 -0800
+++ b/tcc/gplugin-tcc-loader.c Sun Feb 22 13:51:11 2015 -0600
@@ -33,15 +33,10 @@
* GPluginLoaderInterface API
*****************************************************************************/
-gplugin_tcc_loader_class_supported_extensions(const GPluginLoaderClass *klass) {
+gplugin_tcc_loader_class_supported_extensions(GPLUGIN_UNUSED const GPluginLoaderClass *klass) { exts = g_slist_append(exts, "c");
- //exts = g_slist_append(exts, "so");
- //exts = g_slist_append(exts, "dll");
- //exts = g_slist_append(exts, "a");
- //exts = g_slist_append(exts, "exe");
- //exts = g_slist_append(exts, "obj");
@@ -55,16 +50,17 @@
gpointer memneeded = NULL;
GPluginTccPluginQueryFunc gplugin_query = NULL;
if(tcc_add_file(s, filename) == -1) {
*error = g_error_new(GPLUGIN_DOMAIN, 0, "couldn't load file %s", filename);
@@ -76,33 +72,34 @@
memneeded = g_malloc0(memsize);
if(tcc_relocate(s, memneeded) < 0) {
*error = g_error_new(GPLUGIN_DOMAIN, 0, "could not relocate plugin into memory");
gplugin_query = (GPluginTccPluginQueryFunc) tcc_get_symbol(s, "gplugin_query");
if (gplugin_query == NULL) {
*error = g_error_new(GPLUGIN_DOMAIN, 0, "no gplugin_query function found");
info = gplugin_query(error);
plugin = g_object_new(GPLUGIN_TYPE_TCC_PLUGIN,
@@ -115,38 +112,40 @@
-gplugin_tcc_loader_load(GPluginLoader *loader, GPluginPlugin *plugin,
+gplugin_tcc_loader_load(GPLUGIN_UNUSED GPluginLoader *loader, GPluginTccPluginLoadFunc gplugin_load = NULL;
TCCState *s = gplugin_tcc_plugin_get_state(GPLUGIN_TCC_PLUGIN(plugin));
gplugin_load = (GPluginTccPluginLoadFunc) tcc_get_symbol(s, "gplugin_load");
if (gplugin_load == NULL) {
*error = g_error_new(GPLUGIN_DOMAIN, 0, "no gplugin_load function found");
return gplugin_load(GPLUGIN_NATIVE_PLUGIN(plugin), error);
-gplugin_tcc_loader_unload(GPluginLoader *loader, GPluginPlugin *plugin,
+gplugin_tcc_loader_unload(GPLUGIN_UNUSED GPluginLoader *loader, GPluginTccPluginLoadFunc gplugin_unload = NULL;
TCCState *s = gplugin_tcc_plugin_get_state(GPLUGIN_TCC_PLUGIN(plugin));
gplugin_unload = (GPluginTccPluginUnloadFunc) tcc_get_symbol(s, "gplugin_unload");
if (gplugin_unload == NULL) {
*error = g_error_new(GPLUGIN_DOMAIN, 0, "no gplugin_unload function found");
return gplugin_unload(GPLUGIN_NATIVE_PLUGIN(plugin), error);
--- a/tcc/gplugin-tcc-plugin.c Thu Feb 12 10:03:50 2015 -0800
+++ b/tcc/gplugin-tcc-plugin.c Sun Feb 22 13:51:11 2015 -0600
@@ -52,14 +52,14 @@
gplugin_tcc_plugin_set_state(GPluginTccPlugin *plugin, TCCState *s) {
GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(plugin);
gplugin_tcc_plugin_set_memory(GPluginTccPlugin *plugin, gpointer mem) {
GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(plugin);
@@ -107,10 +107,10 @@
gplugin_tcc_plugin_finalize(GObject *obj) {
GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(obj);
--- a/tcc/tests/CMakeLists.txt Thu Feb 12 10:03:50 2015 -0800
+++ b/tcc/tests/CMakeLists.txt Sun Feb 22 13:51:11 2015 -0600
@@ -20,8 +20,8 @@
-DTCC_PLUGIN_DIR="${CMAKE_CURRENT_SOURCE_DIR}/plugins"
-add_tcc_gtest(test-tcc-c-loader)
-target_link_libraries(test-tcc-c-loader gplugin-loader-tests)
+add_tcc_gtest(test-tcc-loader) +target_link_libraries(test-tcc-loader gplugin-loader-tests) set(GTESTER_TCC_TESTS "${TCC_TESTS}")
set(GTESTER_TCC_LOG "test-gplugin-tcc.xml")