added qse_awk_rtx_setprm().
changed some module functions to use referenced argument
This commit is contained in:
@ -424,9 +424,14 @@ void* qse_awk_getxtn (qse_awk_t* awk)
|
||||
return QSE_XTN (awk);
|
||||
}
|
||||
|
||||
qse_awk_prm_t* qse_awk_getprm (qse_awk_t* awk)
|
||||
void qse_awk_getprm (qse_awk_t* awk, qse_awk_prm_t* prm)
|
||||
{
|
||||
return &awk->prm;
|
||||
*prm = awk->prm;
|
||||
}
|
||||
|
||||
void qse_awk_setprm (qse_awk_t* awk, const qse_awk_prm_t* prm)
|
||||
{
|
||||
awk->prm = *prm;
|
||||
}
|
||||
|
||||
int qse_awk_setopt (qse_awk_t* awk, qse_awk_opt_t id, const void* value)
|
||||
|
@ -755,9 +755,6 @@ qse_awk_rtx_t* qse_awk_rtx_open (
|
||||
qse_awk_rtx_t* rtx;
|
||||
struct module_init_ctx_t mic;
|
||||
|
||||
QSE_ASSERTX (awk->prm.math.pow != QSE_NULL, "Call qse_awk_setprm() first");
|
||||
QSE_ASSERTX (awk->prm.sprintf != QSE_NULL, "Call qse_awk_setprm() first");
|
||||
|
||||
/* clear the awk error code */
|
||||
qse_awk_seterrnum (awk, QSE_AWK_ENOERR, QSE_NULL);
|
||||
|
||||
@ -4732,9 +4729,6 @@ static qse_awk_val_t* eval_binop_exp (
|
||||
qse_flt_t r1, r2;
|
||||
qse_awk_val_t* res;
|
||||
|
||||
QSE_ASSERTX (rtx->awk->prm.math.pow != QSE_NULL,
|
||||
"the pow function must be provided when the awk object is created to make exponentiation work properly.");
|
||||
|
||||
n1 = qse_awk_rtx_valtonum (rtx, left, &l1, &r1);
|
||||
n2 = qse_awk_rtx_valtonum (rtx, right, &l2, &r2);
|
||||
|
||||
|
Reference in New Issue
Block a user