Compare commits

...

3 Commits

4 changed files with 21 additions and 6 deletions
-1
View File
@@ -11,7 +11,6 @@ foreach (d ${source_dirs})
set(sources ${sources} ${d_sources})
endforeach (d)
message(STATUS ${sources})
add_library(bshell.core SHARED ${sources})
target_link_libraries(bshell.core bshell.runtime FX::Runtime FX::Collections FX::Term)
-1
View File
@@ -13,7 +13,6 @@ foreach (d ${source_dirs})
set(sources ${sources} ${d_sources})
endforeach (d)
message(STATUS ${sources})
add_library(bshell.runtime SHARED ${sources})
target_link_libraries(bshell.runtime FX::Runtime FX::Collections FX::Term)
+17 -2
View File
@@ -90,10 +90,25 @@ void bshell_runtime_scope_set_block(
bshell_scriptblock_unref(scope->s_block);
}
if (!block) {
scope->s_block = NULL;
scope->s_ip = 0;
scope->s_instr = NULL;
scope->s_nr_instr = 0;
scope->s_pool = NULL;
scope->s_nr_pool = 0;
} else {
scope->s_block = bshell_scriptblock_ref(block);
scope->s_ip = 0;
bshell_scriptblock_get_text(block, &scope->s_instr, &scope->s_nr_instr);
bshell_scriptblock_get_pool(block, &scope->s_pool, &scope->s_nr_pool);
bshell_scriptblock_get_text(
block,
&scope->s_instr,
&scope->s_nr_instr);
bshell_scriptblock_get_pool(
block,
&scope->s_pool,
&scope->s_nr_pool);
}
}
fx_hashtable *bshell_runtime_scope_get_functions(
+2
View File
@@ -169,6 +169,8 @@ static unsigned long scriptblock_get_string(
goto cleanup;
}
memset(cache_entry, 0x0, sizeof *cache_entry);
str = fx_string_create_from_cstr(s);
if (!str) {
goto cleanup;