From 9da2f0772ff56d96bf1b0ff4b964d7b570cfcca7 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 16 Jan 2008 08:07:11 +0000 Subject: [PATCH] --- ase/awk/run.c | 2 +- ase/awk/val.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ase/awk/run.c b/ase/awk/run.c index c00e5153..52143343 100644 --- a/ase/awk/run.c +++ b/ase/awk/run.c @@ -981,7 +981,7 @@ static void deinit_run (ase_awk_run_t* run) while (run->ichunk != ASE_NULL) { - ase_awk_val_pool_t* next = run->ichunk->next; + ase_awk_val_chunk_t* next = run->ichunk->next; ASE_AWK_FREE (run->awk, run->ichunk); run->ichunk = next; } diff --git a/ase/awk/val.c b/ase/awk/val.c index 3d9767fb..36fc53e0 100644 --- a/ase/awk/val.c +++ b/ase/awk/val.c @@ -84,7 +84,7 @@ ase_awk_val_t* ase_awk_makeintval (ase_awk_run_t* run, ase_long_t v) } } */ - ase_awk_val_pool_t* p = run->ipool; + ase_awk_val_chunk_t* p = run->ichunk; ase_awk_val_int_t* f = run->ifree; if (f = ASE_NULL) @@ -93,7 +93,7 @@ ase_awk_val_t* ase_awk_makeintval (ase_awk_run_t* run, ase_long_t v) ase_size_t i; p = ASE_AWK_MALLOC (run->awk, - ASE_SIZEOF(ase_awk_val_pool_t)+ + ASE_SIZEOF(ase_awk_val_chunk_t)+ ASE_SIZEOF(ase_awk_val_int_t)*100); if (p == ASE_NULL) { @@ -102,16 +102,16 @@ ase_awk_val_t* ase_awk_makeintval (ase_awk_run_t* run, ase_long_t v) } x = (ase_awk_val_int_t*)(p + 1); - for (i = 0; i < 100-1; i++) f + for (i = 0; i < 100-1; i++) x[i].nde = (ase_awk_nde_int_t*)&x[i+1]; x[i].nde = ASE_NULL; run->ifree = &f[0]; - p->next = run->ipool; + p->next = run->ichunk; } val = run->ifree; - p->ifree = (ase_awk_val_int_t*)p->ifree->nde; + run->ifree = (ase_awk_val_int_t*)run->ifree->nde; val->type = ASE_AWK_VAL_INT; val->ref = 0; @@ -425,7 +425,9 @@ void ase_awk_freeval (ase_awk_run_t* run, ase_awk_val_t* val, ase_bool_t cache) */ if (cache) { - val->nde = (ase_awk_val_nde_t*)run->ifree; + + ((ase_awk_val_int_t*)val)->nde = + (ase_awk_nde_int_t*)run->ifree; run->ifree = val; } else ASE_AWK_FREE (run->awk, val);