added qse_awk_rtx_setmapvalfld()/qse_awk_rtx_getmapvalfld()

This commit is contained in:
2011-05-13 08:55:53 +00:00
parent 3ae34f8acc
commit 2cb55e3676
4 changed files with 112 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: awk.h 441 2011-04-22 14:28:43Z hyunghwan.chung $
* $Id: awk.h 456 2011-05-12 14:55:53Z hyunghwan.chung $
*
Copyright 2006-2011 Chung, Hyung-Hwan.
This file is part of QSE.
@ -1898,6 +1898,34 @@ qse_awk_val_t* qse_awk_rtx_makemapval (
qse_awk_rtx_t* rtx
);
/**
* The qse_awk_rtx_setmapvalfld() function sets a field value in a map.
* You must make sure that the type of @a map is #QSE_AWK_VAL_MAP.
* @return value @a v on success, #QSE_NULL on failure.
*/
qse_awk_val_t* qse_awk_rtx_setmapvalfld (
qse_awk_rtx_t* rtx,
qse_awk_val_t* map,
qse_char_t* kptr,
qse_size_t klen,
qse_awk_val_t* v
);
/**
* The qse_awk_rtx_setmapvalfld() function gets the field value in a map.
* You must make sure that the type of @a map is #QSE_AWK_VAL_MAP.
* If the field is not found, the function fails and sets the error number
* to #QSE_AWK_EINVAL.
* @return field value on success, #QSE_NULL on failure.
*/
qse_awk_val_t* qse_awk_rtx_getmapvalfld (
qse_awk_rtx_t* rtx,
qse_awk_val_t* map,
qse_char_t* kptr,
qse_size_t klen
);
/**
* The qse_awk_rtx_makerefval() function creates a reference value.
* @return value on success, QSE_NULL on failure