summaryrefslogtreecommitdiff
path: root/src/lib/elua/elua.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-04-27 11:30:33 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-06 15:05:23 +0100
commitdb66fe62551c170da81b071c0055b3b3dd4159da (patch)
treeaa3b808c35916df39cd8643c24fa80cec809425d /src/lib/elua/elua.c
parente73f7f7a40ba3832d743ae4b893940440a38e3d4 (diff)
elua lib: fix elua_util_app_load + docs
Diffstat (limited to '')
-rw-r--r--src/lib/elua/elua.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/elua/elua.c b/src/lib/elua/elua.c
index 6cb2e13d71..76cafb1ea6 100644
--- a/src/lib/elua/elua.c
+++ b/src/lib/elua/elua.c
@@ -502,21 +502,21 @@ elua_util_string_run(Elua_State *es, const char *chunk, const char *chname)
502 || _elua_docall(es, 0, 0)); 502 || _elua_docall(es, 0, 0));
503} 503}
504 504
505EAPI Eina_Bool 505EAPI int
506elua_util_app_load(Elua_State *es, const char *appname) 506elua_util_app_load(Elua_State *es, const char *appname)
507{ 507{
508 EINA_SAFETY_ON_NULL_RETURN_VAL(es, EINA_FALSE); 508 EINA_SAFETY_ON_NULL_RETURN_VAL(es, -1);
509 EINA_SAFETY_ON_NULL_RETURN_VAL(es->luastate, EINA_FALSE); 509 EINA_SAFETY_ON_NULL_RETURN_VAL(es->luastate, -1);
510 EINA_SAFETY_ON_FALSE_RETURN_VAL(elua_state_appload_ref_push(es), EINA_FALSE); 510 EINA_SAFETY_ON_FALSE_RETURN_VAL(elua_state_appload_ref_push(es), -1);
511 lua_pushstring(es->luastate, appname); 511 lua_pushstring(es->luastate, appname);
512 lua_call(es->luastate, 1, 2); 512 lua_call(es->luastate, 1, 2);
513 if (lua_isnil(es->luastate, -2)) 513 if (lua_isnil(es->luastate, -2))
514 { 514 {
515 lua_remove(es->luastate, -2); 515 lua_remove(es->luastate, -2);
516 return EINA_FALSE; 516 return 1;
517 } 517 }
518 lua_pop(es->luastate, 1); 518 lua_pop(es->luastate, 1);
519 return EINA_TRUE; 519 return 0;
520} 520}
521 521
522EAPI Eina_Bool 522EAPI Eina_Bool
@@ -541,7 +541,7 @@ elua_util_script_run(Elua_State *es, int argc, char **argv, int n, int *quit)
541 status = elua_io_loadfile(es, fname); 541 status = elua_io_loadfile(es, fname);
542 } 542 }
543 else 543 else
544 status = !elua_util_app_load(es, fname); 544 status = elua_util_app_load(es, fname);
545 } 545 }
546 else 546 else
547 status = elua_io_loadfile(es, fname); 547 status = elua_io_loadfile(es, fname);