summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklib.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-10-13 13:35:01 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2018-10-15 18:24:10 +0200
commit07fed9053a476b4c6e5ecd23fc43ec84f4094978 (patch)
treeda366faad51087b2e5000a1d9d3659d5bd1a73a8 /apps/plugins/lua/rocklib.c
parent0b7a8d5afd3d751fd0f6454098bc9fd1d05ee764 (diff)
downloadrockbox-07fed9053a476b4c6e5ecd23fc43ec84f4094978.tar.gz
rockbox-07fed9053a476b4c6e5ecd23fc43ec84f4094978.zip
lua optimize current_path function
frees up around 500 bytes by using the builtin string functionality Change-Id: Icd4ec921d3fec339b8a4b7f80c9c63d51d4c101c
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r--apps/plugins/lua/rocklib.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 57165a5d15..ffd449e9d4 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -194,13 +194,7 @@ RB_WRAP(font_getstringsize)
194 194
195RB_WRAP(current_path) 195RB_WRAP(current_path)
196{ 196{
197 const char *current_path = get_current_path(L, 1); 197 return get_current_path(L, 1);
198 if(current_path != NULL)
199 lua_pushstring(L, current_path);
200 else
201 lua_pushnil(L);
202
203 return 1;
204} 198}
205 199
206static void fill_text_message(lua_State *L, struct text_message * message, 200static void fill_text_message(lua_State *L, struct text_message * message,