diff options
author | David Walter Seikel | 2014-05-20 23:34:25 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-20 23:34:25 +1000 |
commit | 909fd6e2c4369020707782e20656069fbb3030d1 (patch) | |
tree | 15590f94950be42916fff1b3ba00124bce157751 /src/GuiLua | |
parent | The results of a session with valgrind. (diff) | |
download | SledjHamr-909fd6e2c4369020707782e20656069fbb3030d1.zip SledjHamr-909fd6e2c4369020707782e20656069fbb3030d1.tar.gz SledjHamr-909fd6e2c4369020707782e20656069fbb3030d1.tar.bz2 SledjHamr-909fd6e2c4369020707782e20656069fbb3030d1.tar.xz |
Found a way to deal with the PACKAGE_* stuff outside of Elm. It's undocumented.
Diffstat (limited to 'src/GuiLua')
-rw-r--r-- | src/GuiLua/GuiLua.c | 10 | ||||
-rw-r--r-- | src/GuiLua/GuiLua.h | 1 | ||||
-rw-r--r-- | src/GuiLua/skang.c | 6 | ||||
-rw-r--r-- | src/GuiLua/test_c.c | 3 |
4 files changed, 7 insertions, 13 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c index 5815b45..1ffbc0f 100644 --- a/src/GuiLua/GuiLua.c +++ b/src/GuiLua/GuiLua.c | |||
@@ -142,12 +142,10 @@ and ordinary elementary widgets. Proper introspection can come later. | |||
142 | */ | 142 | */ |
143 | 143 | ||
144 | 144 | ||
145 | #include "LumbrJack.h" | ||
146 | #include "GuiLua.h" | 145 | #include "GuiLua.h" |
147 | #include "Runnr.h" | 146 | #include "Runnr.h" |
148 | 147 | ||
149 | 148 | ||
150 | static int logDom; // Our logging domain. | ||
151 | const char *glName = "ourGuiLua"; | 149 | const char *glName = "ourGuiLua"; |
152 | 150 | ||
153 | /* Sooo, how to do this - | 151 | /* Sooo, how to do this - |
@@ -373,7 +371,6 @@ int luaopen_GuiLua(lua_State *L) | |||
373 | 371 | ||
374 | printf("**********************require GuiLua\n"); | 372 | printf("**********************require GuiLua\n"); |
375 | // In theory this function only ever gets called once. | 373 | // In theory this function only ever gets called once. |
376 | logDom = loggingStartup("GuiLua", logDom); | ||
377 | 374 | ||
378 | elm_policy_set(ELM_POLICY_EXIT, ELM_POLICY_EXIT_NONE); | 375 | elm_policy_set(ELM_POLICY_EXIT, ELM_POLICY_EXIT_NONE); |
379 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_NONE); | 376 | elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_NONE); |
@@ -474,18 +471,13 @@ GuiLua *GuiLuaDo(int argc, char **argv, winFang *parent, EPhysics_World *world) | |||
474 | PE("Error running - skang.loopWindow()"); | 471 | PE("Error running - skang.loopWindow()"); |
475 | GuiLuaDel(result); | 472 | GuiLuaDel(result); |
476 | result = NULL; | 473 | result = NULL; |
477 | if (logDom >= 0) | ||
478 | { | ||
479 | eina_log_domain_unregister(logDom); | ||
480 | logDom = -1; | ||
481 | } | ||
482 | 474 | ||
483 | // This shuts down Elementary, but keeps the main loop running until all ecore_evas are freed. | 475 | // This shuts down Elementary, but keeps the main loop running until all ecore_evas are freed. |
484 | elm_shutdown(); | 476 | elm_shutdown(); |
485 | } | 477 | } |
486 | } | 478 | } |
487 | else | 479 | else |
488 | fprintf(stderr, "Failed to start Lua!\n"); | 480 | PE("Failed to start Lua!"); |
489 | 481 | ||
490 | return result; | 482 | return result; |
491 | } | 483 | } |
diff --git a/src/GuiLua/GuiLua.h b/src/GuiLua/GuiLua.h index d82d244..216ce8a 100644 --- a/src/GuiLua/GuiLua.h +++ b/src/GuiLua/GuiLua.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _GUILUA_H_ | 2 | #define _GUILUA_H_ |
3 | 3 | ||
4 | 4 | ||
5 | #include "LumbrJack.h" | ||
5 | #include "Runnr.h" | 6 | #include "Runnr.h" |
6 | #include "winFang.h" | 7 | #include "winFang.h" |
7 | 8 | ||
diff --git a/src/GuiLua/skang.c b/src/GuiLua/skang.c index c116f30..3aee0e2 100644 --- a/src/GuiLua/skang.c +++ b/src/GuiLua/skang.c | |||
@@ -1,11 +1,13 @@ | |||
1 | #include "SledjHamr.h" | ||
2 | #include "GuiLua.h" | 1 | #include "GuiLua.h" |
3 | 2 | ||
4 | 3 | ||
4 | int logDom = -1; | ||
5 | |||
5 | EAPI_MAIN int elm_main(int argc, char **argv) | 6 | EAPI_MAIN int elm_main(int argc, char **argv) |
6 | { | 7 | { |
7 | HamrTime(elm_main, "GuiLua"); | 8 | logDom = HamrTime(argv[0], elm_main, logDom); |
8 | GuiLuaDo(argc, argv, NULL, NULL); | 9 | GuiLuaDo(argc, argv, NULL, NULL); |
10 | pantsOff(logDom); | ||
9 | 11 | ||
10 | return 0; | 12 | return 0; |
11 | } | 13 | } |
diff --git a/src/GuiLua/test_c.c b/src/GuiLua/test_c.c index e85814b..ed680b0 100644 --- a/src/GuiLua/test_c.c +++ b/src/GuiLua/test_c.c | |||
@@ -10,7 +10,6 @@ http://lua-users.org/lists/lua-l/2008-01/msg00671.html | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | 12 | ||
13 | //#include "LumbrJack.h" | ||
14 | #include "Runnr.h" | 13 | #include "Runnr.h" |
15 | #include "GuiLua.h" | 14 | #include "GuiLua.h" |
16 | 15 | ||
@@ -23,7 +22,7 @@ static int cfunc (lua_State *L) | |||
23 | double arg1 = luaL_checknumber(L, 1); | 22 | double arg1 = luaL_checknumber(L, 1); |
24 | const char *arg2 = luaL_checkstring(L, 2); | 23 | const char *arg2 = luaL_checkstring(L, 2); |
25 | 24 | ||
26 | printf("Inside %s.cfunc(%f, %s)\n", ourName, arg1, arg2); | 25 | PI("Inside %s.cfunc(%f, %s)\n", ourName, arg1, arg2); |
27 | return 0; | 26 | return 0; |
28 | } | 27 | } |
29 | 28 | ||