Update libabacus.

This commit is contained in:
Danila Fedorin 2018-09-18 21:04:18 -07:00
parent adfd0744cd
commit 7e329be922
2 changed files with 2 additions and 8 deletions

2
external/libabacus vendored

@ -1 +1 @@
Subproject commit ca6075e8d5114475ce128d1459118c4cd2151a74
Subproject commit 06f17f491c4d1be1f4936e36cda81c4f1e13cf49

View File

@ -18,13 +18,7 @@ const libab_basetype* abacus::get_basetype_string() {
}
void abacus::add_variable(const std::string& name, ref val) {
libab_table_entry* entry = libab_table_search_entry_value(get<libab_table>(scope), name.c_str());
if(entry) {
libab_ref_free(&entry->data_u.value);
libab_ref_copy(val, &entry->data_u.value);
} else {
libab_put_table_value(get<libab_table>(scope), name.c_str(), std::move(val));
}
libab_set_variable((libab_table*) libab_ref_get(&ab.table), name.c_str(), val);
}
void abacus::add_function(const std::string& name, libab_function_ptr ptr, const std::string& type) {