diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-01-26 12:56:47 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-01-26 12:56:47 +0100 |
commit | 1ab8f5d8bd9a730f8d6b11335343835b19fc4c3e (patch) | |
tree | 79b90c26f76636f8fd00c439d0e97a7dcefcda19 /src | |
parent | fa1f9af151526a6679d605c8af91d502cef90b75 (diff) |
Temporary disable string indexing
Diffstat (limited to 'src')
-rw-r--r-- | src/program.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/program.c b/src/program.c index 88f94a4..71b310e 100644 --- a/src/program.c +++ b/src/program.c @@ -48,6 +48,7 @@ static int program_output_temp(char *data, int size, void *userdata) { return 1; } +#if 0 static void tsl_string_to_ref(const TslString *self, TslStringView *result) { result->data = self->data; result->size = self->size; @@ -70,6 +71,7 @@ static TslProgramResult tsl_string_ref_get_item_at_index(const TslStringView *se return TSL_PROGRAM_RESULT_OK; } +#endif static TslProgramResult tsl_value_create_from_stack_value(TslProgram *self, TslValue *dst) { TslStackValue *src = tsl_buffer_pop(&self->stack_values, sizeof(TslStackValue)); @@ -206,12 +208,13 @@ static TslProgramResult tsl_value_create_from_stack_value(TslProgram *self, TslV dst->type = TSL_TYPE_NULL; } return TSL_PROGRAM_RESULT_OK; - } else if(var.type == TSL_TYPE_STRING) { + /*} else if(var.type == TSL_TYPE_STRING) { TslStringView str_ref; tsl_string_to_ref(var.data.string, &str_ref); return tsl_string_ref_get_item_at_index(&str_ref, &key, dst); } else if(var.type == TSL_TYPE_STRING_REF) { return tsl_string_ref_get_item_at_index(&var.data.string_ref, &key, dst); + */ } else { /* TODO: Print type as string */ fprintf(stderr, "Error: Unable to index data of type %d. Expected list or map\n", var.type); |