added QSE_AWK_VAL_MAP_ITR_KEY() and deleted QSE_AWK_VAL_MAP_ITR_KEY_PTR()/QSE_AWK_VAL_MAP_ITR_KEY_LEN()

added QSE_HTB_KPTL()/QSE_HTB_VPTL()/QSE_RBT_KPTL()/QSE_RBT_VPTL()
This commit is contained in:
2011-05-24 22:22:40 +00:00
parent 5577499bfb
commit 948f5de1cb
7 changed files with 55 additions and 21 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.cpp 476 2011-05-23 17:07:13Z hyunghwan.chung $
* $Id: Awk.cpp 477 2011-05-24 04:22:40Z hyunghwan.chung $
*
Copyright 2006-2011 Chung, Hyung-Hwan.
This file is part of QSE.
@ -806,8 +806,7 @@ Awk::Value::IndexIterator Awk::Value::getFirstIndex (Index* idx) const
iptr = qse_awk_rtx_getfirstmapvalitr (this->run->rtx, this->val, &itr);
if (iptr == QSE_NULL) return IndexIterator::END; // no more key
idx->ptr = QSE_AWK_VAL_MAP_ITR_KEY_PTR(iptr);
idx->len = QSE_AWK_VAL_MAP_ITR_KEY_LEN(iptr);
idx->set (QSE_AWK_VAL_MAP_ITR_KEY(iptr));
return itr;
}
@ -827,8 +826,7 @@ Awk::Value::IndexIterator Awk::Value::getNextIndex (
iptr = qse_awk_rtx_getnextmapvalitr (this->run->rtx, this->val, &itr);
if (iptr == QSE_NULL) return IndexIterator::END; // no more key
idx->ptr = QSE_AWK_VAL_MAP_ITR_KEY_PTR(iptr);
idx->len = QSE_AWK_VAL_MAP_ITR_KEY_LEN(iptr);
idx->set (QSE_AWK_VAL_MAP_ITR_KEY(iptr));
return itr;
}

View File

@ -1,5 +1,5 @@
/*
* $Id: run.c 469 2011-05-21 16:16:18Z hyunghwan.chung $
* $Id: run.c 477 2011-05-24 04:22:40Z hyunghwan.chung $
*
Copyright 2006-2011 Chung, Hyung-Hwan.
This file is part of QSE.
@ -260,9 +260,9 @@ typedef qse_awk_val_t* (*binop_func_t) (
typedef qse_awk_val_t* (*eval_expr_t) (qse_awk_rtx_t* run, qse_awk_nde_t* nde);
#ifdef NDEBUG
#define xstr_to_cstr(x) ((qse_cstr_t*)x)
# define xstr_to_cstr(xstr) ((qse_cstr_t*)xstr)
#else
static qse_cstr_t* xstr_to_cstr (qse_xstr_t* xstr)
static QSE_INLINE qse_cstr_t* xstr_to_cstr (qse_xstr_t* xstr)
{
/* i use this function to typecast qse_cstr_t* to
* qse_xstr_t* instead of direct typecasting.