improved qse_htb_t to use less memory. this resulted in backward-incompatible interface
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.cpp 328 2010-07-08 06:58:44Z hyunghwan.chung $
|
||||
* $Id: Awk.cpp 363 2010-10-27 12:54:37Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
This file is part of QSE.
|
||||
@ -1128,7 +1128,9 @@ int Awk::open ()
|
||||
qse_awk_seterrstr (awk, xerrstr);
|
||||
|
||||
functionMap = qse_htb_open (
|
||||
qse_awk_getmmgr(awk), QSE_SIZEOF(this), 512, 70);
|
||||
qse_awk_getmmgr(awk), QSE_SIZEOF(this), 512, 70,
|
||||
QSE_SIZEOF(qse_char_t), 1
|
||||
);
|
||||
if (functionMap == QSE_NULL)
|
||||
{
|
||||
qse_awk_close (awk);
|
||||
@ -1139,9 +1141,29 @@ int Awk::open ()
|
||||
}
|
||||
|
||||
*(Awk**)QSE_XTN(functionMap) = this;
|
||||
|
||||
static qse_htb_mancbs_t mancbs =
|
||||
{
|
||||
{
|
||||
QSE_HTB_COPIER_INLINE,
|
||||
QSE_HTB_COPIER_DEFAULT
|
||||
},
|
||||
{
|
||||
QSE_HTB_FREEER_DEFAULT,
|
||||
free_function_map_value
|
||||
},
|
||||
QSE_HTB_HASHER_DEFAULT,
|
||||
QSE_HTB_COMPER_DEFAULT,
|
||||
QSE_HTB_KEEPER_DEFAULT,
|
||||
QSE_HTB_SIZER_DEFAULT
|
||||
};
|
||||
|
||||
qse_htb_setmancbs (functionMap, &mancbs);
|
||||
#if 0
|
||||
qse_htb_setscale (functionMap, QSE_HTB_KEY, QSE_SIZEOF(qse_char_t));
|
||||
qse_htb_setcopier (functionMap, QSE_HTB_KEY, QSE_HTB_COPIER_INLINE);
|
||||
qse_htb_setfreeer (functionMap, QSE_HTB_VAL, free_function_map_value);
|
||||
qse_htb_setscale (functionMap, QSE_HTB_KEY, QSE_SIZEOF(qse_char_t));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user