diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-10 15:28:37 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-10 15:28:37 +0100 |
commit | 3e0be0faf5bc00e5d140e50140e6bdd1d19ff987 (patch) | |
tree | 74b95c367f97a26f7f07f7c07eb2a880ecebe97b /src/mds-kbdc | |
parent | mds-kbdc: compile-layout: test return (diff) | |
download | mds-3e0be0faf5bc00e5d140e50140e6bdd1d19ff987.tar.gz mds-3e0be0faf5bc00e5d140e50140e6bdd1d19ff987.tar.bz2 mds-3e0be0faf5bc00e5d140e50140e6bdd1d19ff987.tar.xz |
mds-kbdc: compile-layout: m bug fix + more test cases
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-kbdc')
-rw-r--r-- | src/mds-kbdc/builtin-functions.c | 4 | ||||
-rw-r--r-- | src/mds-kbdc/compile-layout.c | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/mds-kbdc/builtin-functions.c b/src/mds-kbdc/builtin-functions.c index 7cd13b7..3ad4e83 100644 --- a/src/mds-kbdc/builtin-functions.c +++ b/src/mds-kbdc/builtin-functions.c @@ -282,7 +282,7 @@ static char32_t* builtin_function_get_2(const char32_t** restrict args) const char32_t* restrict b = *args++; char32_t* restrict rc; size_t n = (size_t)*b; - mds_kbdc_tree_t* value = variables_get((size_t)*a); + mds_kbdc_tree_t* value = variables_get((size_t)*a)->array.elements; while (n--) value = value->next; fail_if (rc = string_dup(value->compiled_string.string), rc == NULL); @@ -303,7 +303,7 @@ static char32_t* builtin_function_set_3(const char32_t** restrict args) const char32_t* restrict c = *args++; char32_t* restrict rc; size_t n = (size_t)*b; - mds_kbdc_tree_t* value = variables_get((size_t)*a); + mds_kbdc_tree_t* value = variables_get((size_t)*a)->array.elements; while (n--) value = value->next; free(value->compiled_string.string); diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index e15e7e4..db2680d 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -18,7 +18,6 @@ #include "compile-layout.h" /* TODO add call stack */ /* TODO fix so that for-loops do not generate the same errors/warnings in all iterations [loopy_error]. */ -/* TODO test set/3 and get/2 */ #include "include-stack.h" #include "builtin-functions.h" |