From 0ef72a5769f1c283786aa105d67127d6b113168c Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 11 Mar 2008 22:54:59 +0000 Subject: Add g_dir* and g_str_has_prefix functions to eglib. --- eglib/gmodule.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'eglib/gmodule.c') 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; +} -- cgit