Changeset 307
Legend:
- Unmodified
- Added
- Removed
-
trunk/processor/main.m4
r302 r307 39 39 IFSTORE(` 40 40 IFASSERT(`{ 41 if (!xc_stack_ size(&processor->allocsizes)) {41 if (!xc_stack_count(&processor->allocsizes)) { 42 42 fprintf(stderr, "mismatch `$@' at line %d\n", __LINE__); 43 43 } -
trunk/stack.c
r11 r307 4 4 typedef xc_stack_t* S; 5 5 6 void xc_stack_init (S stack)6 void xc_stack_init_ex(S stack, int initsize) 7 7 { 8 8 stack->cnt = 0; 9 stack->size = 8;9 stack->size = initsize; 10 10 stack->data = malloc(sizeof(void *) * stack->size); 11 11 } … … 43 43 } 44 44 45 int xc_stack_ size(S stack)45 int xc_stack_count(S stack) 46 46 { 47 47 assert(stack != NULL); -
trunk/stack.h
r1 r307 7 7 8 8 #define S xc_stack_t* 9 void xc_stack_init(S stack); 9 void xc_stack_init_ex(S stack, int initsize); 10 #define xc_stack_init(stack) xc_stack_init_ex(stack, 8) 10 11 void xc_stack_destroy(S stack); 11 12 void xc_stack_push(S stack, void *item); … … 13 14 void *xc_stack_top(S stack); 14 15 void *xc_stack_get(S stack, int n); 15 int xc_stack_ size(S stack);16 int xc_stack_count(S stack); 16 17 void xc_stack_reverse(S stack); 17 18 #undef S -
trunk/xcache.c
r305 r307 606 606 for (i = 0; i < cachecount; i ++) { 607 607 s = &holds[i]; 608 TRACE("holded %d", xc_stack_ size(s));609 if (xc_stack_ size(s)) {608 TRACE("holded %d", xc_stack_count(s)); 609 if (xc_stack_count(s)) { 610 610 cache = ((xc_entry_t *)xc_stack_top(s))->cache; 611 611 ENTER_LOCK(cache) { 612 while (xc_stack_ size(s)) {612 while (xc_stack_count(s)) { 613 613 xce = (xc_entry_t*) xc_stack_pop(s); 614 614 TRACE("unhold %s", xce->name.str.val);

