summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-12-11 15:48:18 +0000
committerDaniel Kolesa <d.kolesa@samsung.com>2014-12-11 15:48:18 +0000
commit3b343878a840d6b33e65dab573fadad0dee54fd4 (patch)
treef47d26c40ced1564ad3a5e3b940f57224ba19f61 /src/bin
parent2f6f06d7a1490263d58d41405278e7220f6833e9 (diff)
elua: add initial pieces of the library
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elua/main.c12
-rw-r--r--src/bin/elua/main.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/bin/elua/main.c b/src/bin/elua/main.c
index 424d5b9f37..1edf98fbd4 100644
--- a/src/bin/elua/main.c
+++ b/src/bin/elua/main.c
@@ -1,4 +1,4 @@
1#include "config.h" 1#include "config.h"
2 2
3/* The Lua runtime component of the EFL */ 3/* The Lua runtime component of the EFL */
4 4
@@ -265,7 +265,7 @@ elua_doscript(lua_State *L, int argc, char **argv, int n, int *quit)
265} 265}
266 266
267void 267void
268elua_shutdown(lua_State *L, int c) 268elua_bin_shutdown(lua_State *L, int c)
269{ 269{
270 void *data; 270 void *data;
271 INF("elua shutdown"); 271 INF("elua shutdown");
@@ -281,7 +281,7 @@ elua_shutdown(lua_State *L, int c)
281 if (L) lua_close(L); 281 if (L) lua_close(L);
282 if (el_log_domain != EINA_LOG_DOMAIN_GLOBAL) 282 if (el_log_domain != EINA_LOG_DOMAIN_GLOBAL)
283 eina_log_domain_unregister(el_log_domain); 283 eina_log_domain_unregister(el_log_domain);
284 eina_shutdown(); 284 elua_shutdown();
285 exit(c); 285 exit(c);
286} 286}
287 287
@@ -584,7 +584,7 @@ main(int argc, char **argv)
584 textdomain(PACKAGE); 584 textdomain(PACKAGE);
585#endif 585#endif
586 586
587 eina_init(); 587 elua_init();
588 588
589 if (!(el_log_domain = eina_log_domain_register("elua", EINA_COLOR_ORANGE))) 589 if (!(el_log_domain = eina_log_domain_register("elua", EINA_COLOR_ORANGE)))
590 { 590 {
@@ -598,7 +598,7 @@ main(int argc, char **argv)
598 if (!(L = luaL_newstate())) 598 if (!(L = luaL_newstate()))
599 { 599 {
600 ERR("could not initialize elua state."); 600 ERR("could not initialize elua state.");
601 elua_shutdown(L, 1); 601 elua_bin_shutdown(L, 1);
602 } 602 }
603 603
604 elua_state = L; 604 elua_state = L;
@@ -609,7 +609,7 @@ main(int argc, char **argv)
609 m.argv = argv; 609 m.argv = argv;
610 m.status = 0; 610 m.status = 0;
611 611
612 elua_shutdown(L, !!(lua_cpcall(L, elua_main, &m) || m.status)); 612 elua_bin_shutdown(L, !!(lua_cpcall(L, elua_main, &m) || m.status));
613 613
614 return 0; /* never gets here */ 614 return 0; /* never gets here */
615} 615}
diff --git a/src/bin/elua/main.h b/src/bin/elua/main.h
index 15c749012c..c66b3d6d7d 100644
--- a/src/bin/elua/main.h
+++ b/src/bin/elua/main.h
@@ -23,6 +23,8 @@
23#include <Evil.h> 23#include <Evil.h>
24#endif 24#endif
25 25
26#include "Elua.h"
27
26#include <lua.h> 28#include <lua.h>
27#include <lualib.h> 29#include <lualib.h>
28#include <lauxlib.h> 30#include <lauxlib.h>