diff options
author | Daniel Kolesa <d.kolesa@samsung.com> | 2015-04-10 14:39:20 +0100 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2015-05-06 15:05:20 +0100 |
commit | e806ae6f5c606279897309e3ab5790d9837526fa (patch) | |
tree | 6956d24e457b18803259186573254cfed613e66a /src/lib/elua | |
parent | 13bd7ba6533a54759df079467f9842ccb6ae4e24 (diff) |
elua lib: add a way to retrieve the progname
Diffstat (limited to 'src/lib/elua')
-rw-r--r-- | src/lib/elua/Elua.h | 2 | ||||
-rw-r--r-- | src/lib/elua/elua.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/elua/Elua.h b/src/lib/elua/Elua.h index cc7442dd4c..6d49303012 100644 --- a/src/lib/elua/Elua.h +++ b/src/lib/elua/Elua.h | |||
@@ -78,6 +78,8 @@ EAPI Eina_Stringshare *elua_state_core_dir_get(const Elua_State *es); | |||
78 | EAPI Eina_Stringshare *elua_state_mod_dir_get(const Elua_State *es); | 78 | EAPI Eina_Stringshare *elua_state_mod_dir_get(const Elua_State *es); |
79 | EAPI Eina_Stringshare *elua_state_apps_dir_get(const Elua_State *es); | 79 | EAPI Eina_Stringshare *elua_state_apps_dir_get(const Elua_State *es); |
80 | 80 | ||
81 | EAPI Eina_Stringshare *elua_state_prog_name_get(const Elua_State *es); | ||
82 | |||
81 | EAPI void elua_state_include_path_add(Elua_State *es, const char *path); | 83 | EAPI void elua_state_include_path_add(Elua_State *es, const char *path); |
82 | 84 | ||
83 | EAPI Eina_Bool elua_state_require_ref_push(Elua_State *es); | 85 | EAPI Eina_Bool elua_state_require_ref_push(Elua_State *es); |
diff --git a/src/lib/elua/elua.c b/src/lib/elua/elua.c index fb85901ec2..1827e1e878 100644 --- a/src/lib/elua/elua.c +++ b/src/lib/elua/elua.c | |||
@@ -172,6 +172,13 @@ elua_state_apps_dir_get(const Elua_State *es) | |||
172 | return es->moddir; | 172 | return es->moddir; |
173 | } | 173 | } |
174 | 174 | ||
175 | EAPI Eina_Stringshare * | ||
176 | elua_state_prog_name_get(const Elua_State *es) | ||
177 | { | ||
178 | EINA_SAFETY_ON_NULL_RETURN_VAL(es, NULL); | ||
179 | return es->progname; | ||
180 | } | ||
181 | |||
175 | EAPI void | 182 | EAPI void |
176 | elua_state_include_path_add(Elua_State *es, const char *path) | 183 | elua_state_include_path_add(Elua_State *es, const char *path) |
177 | { | 184 | { |