aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/GuiLua
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-20 18:25:58 +1000
committerDavid Walter Seikel2014-05-20 18:25:58 +1000
commit315aaabbce6b2db52ff5796708b777b488fd848e (patch)
treeb58c92292cda35e4435b2448d61a654e30580c7d /src/GuiLua
parentClean up the server startup and connection a bit. (diff)
downloadSledjHamr-315aaabbce6b2db52ff5796708b777b488fd848e.zip
SledjHamr-315aaabbce6b2db52ff5796708b777b488fd848e.tar.gz
SledjHamr-315aaabbce6b2db52ff5796708b777b488fd848e.tar.bz2
SledjHamr-315aaabbce6b2db52ff5796708b777b488fd848e.tar.xz
The results of a session with valgrind.
I'm surprised that this highly experimental code, built with chewing gum and chicken wire, had so little problems, and most of those where leaks. The majority of problems reported are from external libraries.
Diffstat (limited to 'src/GuiLua')
-rw-r--r--src/GuiLua/GuiLua.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c
index 2fa9bcb..5815b45 100644
--- a/src/GuiLua/GuiLua.c
+++ b/src/GuiLua/GuiLua.c
@@ -204,6 +204,7 @@ static int action(lua_State *L)
204 if (wid && strcmp(wid->magic, "Widget") == 0) 204 if (wid && strcmp(wid->magic, "Widget") == 0)
205 { 205 {
206//PD("Setting action : %s\n", action); 206//PD("Setting action : %s\n", action);
207 free(wid->action);
207 wid->action = strdup(action); 208 wid->action = strdup(action);
208 } 209 }
209 return 0; 210 return 0;
@@ -302,7 +303,7 @@ static int window(lua_State *L)
302 } 303 }
303 304
304 win = winFangAdd(parent, 5, 26, w, h, title, name, world); 305 win = winFangAdd(parent, 5, 26, w, h, title, name, world);
305 win->module = module; 306 win->module = strdup(module);
306 if (gl) 307 if (gl)
307 { 308 {
308 // If there's no parent, we become the parent. 309 // If there's no parent, we become the parent.
@@ -418,7 +419,7 @@ PD("GuiLua 3");
418 419
419 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "loopWindow", "Run our windows main loop.", loopWindow, 0); 420 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "loopWindow", "Run our windows main loop.", loopWindow, 0);
420 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "quit", "Quit, exit, remove thyself.", quit, 0); 421 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "quit", "Quit, exit, remove thyself.", quit, 0);
421 push_lua(L, "@ ( = $ $ & $ )", skang, THINGASM, skang, "closeWindow", "Closes a window.", closeWindow, "userdata", 0); // TODO - closeWindow, "userdata"); 422 push_lua(L, "@ ( = $ $ & $ )", skang, THINGASM, skang, "closeWindow", "Closes a window.", closeWindow, "userdata", 0);
422 423
423 // A test of the array building stuff. 424 // A test of the array building stuff.
424 push_lua(L, "@ ( { = $ $ % $widget !required } )", skang, THINGASM, skang, "wibble", "It's wibbly!", 1, "'edit', 'The wibblinator:', 1, 1, 10, 50", 1, 0); 425 push_lua(L, "@ ( { = $ $ % $widget !required } )", skang, THINGASM, skang, "wibble", "It's wibbly!", 1, "'edit', 'The wibblinator:', 1, 1, 10, 50", 1, 0);