aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-17 19:51:43 +1000
committerDavid Walter Seikel2012-01-17 19:51:43 +1000
commit1a4c02c8d912809fc888530ab2983bfa047ac818 (patch)
treeead29a009302289b067ffc4cd8737a45e72130c9
parentSome extra protection and debugging, coz something is making broken tokens. B-( (diff)
downloadSledjHamr-1a4c02c8d912809fc888530ab2983bfa047ac818.zip
SledjHamr-1a4c02c8d912809fc888530ab2983bfa047ac818.tar.gz
SledjHamr-1a4c02c8d912809fc888530ab2983bfa047ac818.tar.bz2
SledjHamr-1a4c02c8d912809fc888530ab2983bfa047ac818.tar.xz
Change to the stringshared hash, it's way faster.
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_compile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 99ba53e..c28a6fc 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -518,7 +518,7 @@ void beginBlock(LuaSL_compiler *compiler, LSL_Leaf *block)
518 518
519 if (blok) 519 if (blok)
520 { 520 {
521 blok->variables = eina_hash_string_superfast_new(burnLeaf); 521 blok->variables = eina_hash_stringshared_new(burnLeaf);
522 block->value.blockValue = blok; 522 block->value.blockValue = blok;
523 blok->outerBlock = compiler->currentBlock; 523 blok->outerBlock = compiler->currentBlock;
524 compiler->currentBlock = blok; 524 compiler->currentBlock = blok;
@@ -998,9 +998,9 @@ Eina_Bool compileLSL(gameGlobals *game, char *script)
998 998
999 memset(&compiler, 0, sizeof(LuaSL_compiler)); 999 memset(&compiler, 0, sizeof(LuaSL_compiler));
1000 compiler.game = game; 1000 compiler.game = game;
1001 compiler.script.functions = eina_hash_string_superfast_new(burnLeaf); 1001 compiler.script.functions = eina_hash_stringshared_new(burnLeaf);
1002 compiler.script.states = eina_hash_string_superfast_new(burnLeaf); 1002 compiler.script.states = eina_hash_stringshared_new(burnLeaf);
1003 compiler.script.variables = eina_hash_string_superfast_new(burnLeaf); 1003 compiler.script.variables = eina_hash_stringshared_new(burnLeaf);
1004 compiler.ignorableText = eina_strbuf_new(); 1004 compiler.ignorableText = eina_strbuf_new();
1005 1005
1006 strncpy(compiler.fileName, script, PATH_MAX - 1); 1006 strncpy(compiler.fileName, script, PATH_MAX - 1);