comparison runtime/context.c @ 52:079200bc3e75

String literals almost working. Print moved out of C runtime.
author Mike Pavone <pavone@retrodev.com>
date Wed, 28 Apr 2010 01:23:30 -0400
parents 640f541e9116
children 04baa003de5a
comparison
equal deleted inserted replaced
51:7d6a6906b648 52:079200bc3e75
18 context * c = malloc(sizeof(context)); 18 context * c = malloc(sizeof(context));
19 c->stack_begin = new_stack(); 19 c->stack_begin = new_stack();
20 c->current_stack = c->stack_begin; 20 c->current_stack = c->stack_begin;
21 c->unwind = NULL; 21 c->unwind = NULL;
22 return c; 22 return c;
23 }
24
25 void free_context(context * c)
26 {
27 stackchunk *next,*current = c->stack_begin;
28 while(current)
29 {
30 next = current->next;
31 free(current);
32 current = next;
33 }
34 free(c);
23 } 35 }
24 36
25 void * alloc_stack(context * ct, uint32_t size) 37 void * alloc_stack(context * ct, uint32_t size)
26 { 38 {
27 void * ret; 39 void * ret;