diff options
Diffstat (limited to 'eglib/gmodule.c')
-rw-r--r-- | eglib/gmodule.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/eglib/gmodule.c b/eglib/gmodule.c index d9ece8d7..c3400823 100644 --- a/eglib/gmodule.c +++ b/eglib/gmodule.c @@ -11,6 +11,7 @@ struct _GModule { void *handle; + gchar *file_name; }; static const char *dl_error_string = NULL; @@ -33,6 +34,8 @@ GModule *g_module_open(const gchar *file_name, GModuleFlags flags) return NULL; } + module->file_name = g_strdup(file_name); + return module; } @@ -74,3 +77,11 @@ const gchar *g_module_error(void) return str; } + +const gchar *g_module_name(GModule *module) +{ + if (module == NULL) + return NULL; + + return module->file_name; +} |