diff options
author | Adrian Thurston <thurston@complang.org> | 2015-01-04 15:17:41 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-01-04 15:17:41 -0500 |
commit | 07547abf01f117076f36587f462a68dae0959b11 (patch) | |
tree | 33fa9bd30c363375f039112893151c4d0904b786 /src/struct.h | |
parent | 26ae0bcd0891fc2ace430c6258dadd17607595de (diff) | |
download | colm-07547abf01f117076f36587f462a68dae0959b11.tar.gz |
turning list elements into allocated objects
Diffstat (limited to 'src/struct.h')
-rw-r--r-- | src/struct.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/struct.h b/src/struct.h index 284cbbbd..b556684b 100644 --- a/src/struct.h +++ b/src/struct.h @@ -52,12 +52,18 @@ typedef struct colm_stream StreamImpl *impl; } Stream; +/* Must overlay colm_inbuilt. */ typedef struct colm_list_el { + short id; + struct colm_struct *prev, *next; + colm_destructor_t destructor; + void *buffer[8]; + Tree *value; - struct colm_list_el *next; - struct colm_list_el *prev; + struct colm_list_el *list_next; + struct colm_list_el *list_prev; } ListEl; /* Must overlay colm_inbuilt. */ @@ -128,6 +134,7 @@ Stream *colm_stream_new2( struct colm_program *prg ); List *colm_list_new( struct colm_program *prg ); Tree *colm_list_get( List *list, Word field ); Tree *colm_list_el_get( ListEl *listEl, Word field ); +ListEl *colm_list_el_new( struct colm_program *prg ); Map *colm_map_new( struct colm_program *prg ); |