From 7e329be92211359cc773f3dc4dac1832b2fb6ec6 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 18 Sep 2018 21:04:18 -0700 Subject: [PATCH] Update libabacus. --- external/libabacus | 2 +- src/abacus.cpp | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/external/libabacus b/external/libabacus index ca6075e..06f17f4 160000 --- a/external/libabacus +++ b/external/libabacus @@ -1 +1 @@ -Subproject commit ca6075e8d5114475ce128d1459118c4cd2151a74 +Subproject commit 06f17f491c4d1be1f4936e36cda81c4f1e13cf49 diff --git a/src/abacus.cpp b/src/abacus.cpp index a7d4cfe..a07075e 100644 --- a/src/abacus.cpp +++ b/src/abacus.cpp @@ -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(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(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) {