diff options
| author | Paul Buetow <paul@buetow.org> | 2008-11-04 21:20:56 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-11-04 21:20:56 +0000 |
| commit | ff0828f06a1f317681c45402feda48bde592a076 (patch) | |
| tree | 7c94275d5ab8b140cd41659d567c09bdc7ca9f16 /src/core/convert.c | |
| parent | 48cf82bfc6cd65cc95f7658582fc532602a85ac0 (diff) | |
array_new_size
array_new_copy
implemented
Diffstat (limited to 'src/core/convert.c')
| -rw-r--r-- | src/core/convert.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/convert.c b/src/core/convert.c index a5f910d..aac54d1 100644 --- a/src/core/convert.c +++ b/src/core/convert.c @@ -33,6 +33,7 @@ *:*/ #include "convert.h" +#include "../data/array.h" void convert_to_integer(Token *p_token) { @@ -47,6 +48,10 @@ convert_to_integer(Token *p_token) { token_set_tt(p_token, TT_INTEGER); token_set_ival(p_token, atoi(token_get_val(p_token))); break; + case TT_ARRAY: + token_set_tt(p_token, TT_INTEGER); + token_set_ival(p_token, array_get_size(p_token->p_array)); + break; default: ERROR("Ouups(%s)", tt_get_name(token_get_tt(p_token))); break; |
