Compare commits
3 Commits
afab5343c4
...
ca33228e0e
| Author | SHA1 | Date | |
|---|---|---|---|
| ca33228e0e | |||
| 09f64aaaba | |||
| 74695e8593 |
@@ -11,7 +11,6 @@ foreach (d ${source_dirs})
|
|||||||
set(sources ${sources} ${d_sources})
|
set(sources ${sources} ${d_sources})
|
||||||
endforeach (d)
|
endforeach (d)
|
||||||
|
|
||||||
message(STATUS ${sources})
|
|
||||||
add_library(bshell.core SHARED ${sources})
|
add_library(bshell.core SHARED ${sources})
|
||||||
|
|
||||||
target_link_libraries(bshell.core bshell.runtime FX::Runtime FX::Collections FX::Term)
|
target_link_libraries(bshell.core bshell.runtime FX::Runtime FX::Collections FX::Term)
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ foreach (d ${source_dirs})
|
|||||||
set(sources ${sources} ${d_sources})
|
set(sources ${sources} ${d_sources})
|
||||||
endforeach (d)
|
endforeach (d)
|
||||||
|
|
||||||
message(STATUS ${sources})
|
|
||||||
add_library(bshell.runtime SHARED ${sources})
|
add_library(bshell.runtime SHARED ${sources})
|
||||||
|
|
||||||
target_link_libraries(bshell.runtime FX::Runtime FX::Collections FX::Term)
|
target_link_libraries(bshell.runtime FX::Runtime FX::Collections FX::Term)
|
||||||
|
|||||||
@@ -90,10 +90,25 @@ void bshell_runtime_scope_set_block(
|
|||||||
bshell_scriptblock_unref(scope->s_block);
|
bshell_scriptblock_unref(scope->s_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
scope->s_block = bshell_scriptblock_ref(block);
|
if (!block) {
|
||||||
scope->s_ip = 0;
|
scope->s_block = NULL;
|
||||||
bshell_scriptblock_get_text(block, &scope->s_instr, &scope->s_nr_instr);
|
scope->s_ip = 0;
|
||||||
bshell_scriptblock_get_pool(block, &scope->s_pool, &scope->s_nr_pool);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fx_hashtable *bshell_runtime_scope_get_functions(
|
fx_hashtable *bshell_runtime_scope_get_functions(
|
||||||
|
|||||||
@@ -169,6 +169,8 @@ static unsigned long scriptblock_get_string(
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(cache_entry, 0x0, sizeof *cache_entry);
|
||||||
|
|
||||||
str = fx_string_create_from_cstr(s);
|
str = fx_string_create_from_cstr(s);
|
||||||
if (!str) {
|
if (!str) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|||||||
Reference in New Issue
Block a user