summaryrefslogtreecommitdiff
path: root/src/core/token.c
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-11-07 22:11:06 +0000
committerPaul Buetow <paul@buetow.org>2008-11-07 22:11:06 +0000
commita46655f67043af257e70715903badf9d4321c4de (patch)
tree556997ba868ac106c6f92703e6e35875e4872dc2 /src/core/token.c
parentfbff89d91c2a13155423bd83d2bbefd5d6891e23 (diff)
one step further for arrays.
Diffstat (limited to 'src/core/token.c')
-rw-r--r--src/core/token.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/token.c b/src/core/token.c
index a60a790..8f8adb0 100644
--- a/src/core/token.c
+++ b/src/core/token.c
@@ -252,7 +252,10 @@ token_new_string(char *c_val) {
Token*
token_new_array(int i_size) {
Token *p_token = token_new_dummy();
+
token_set_tt(p_token, TT_ARRAY);
+ p_token->p_array = array_new();
+
array_resize(p_token->p_array, i_size);
return (p_token);
@@ -415,3 +418,4 @@ token_print_cb(void *p_void) {
token_print(p_token);
printf("\n");
}
+