corrected swapped code between qse_awk_rtx_findfunwithmbs() and qse_awk_rtx_findfunwithwcs()
This commit is contained in:
parent
74ff72564e
commit
9f889d8243
@ -320,7 +320,7 @@ const qse_mchar_t* qse_awk_rtx_geterrmsgasmbs (qse_awk_rtx_t* rtx)
|
|||||||
qse_size_t wcslen, mbslen;
|
qse_size_t wcslen, mbslen;
|
||||||
|
|
||||||
msg = (rtx->errinf.msg[0] == QSE_T('\0')) ?
|
msg = (rtx->errinf.msg[0] == QSE_T('\0')) ?
|
||||||
qse_awk_geterrstr(rtx->awk)(rtx->awk,rtx->errinf.num): rtx->errinf.msg;
|
qse_awk_geterrstr(rtx->awk)(rtx->awk, rtx->errinf.num): rtx->errinf.msg;
|
||||||
|
|
||||||
mbslen = QSE_COUNTOF(rtx->merrmsg);
|
mbslen = QSE_COUNTOF(rtx->merrmsg);
|
||||||
qse_wcstombswithcmgr(msg, &wcslen, rtx->merrmsg, &mbslen, qse_awk_rtx_getcmgr(rtx));
|
qse_wcstombswithcmgr(msg, &wcslen, rtx->merrmsg, &mbslen, qse_awk_rtx_getcmgr(rtx));
|
||||||
|
@ -1533,12 +1533,12 @@ qse_awk_fun_t* qse_awk_rtx_findfunwithmbs (qse_awk_rtx_t* rtx, const qse_mchar_t
|
|||||||
#if defined(QSE_CHAR_IS_MCHAR)
|
#if defined(QSE_CHAR_IS_MCHAR)
|
||||||
return find_fun(rtx, name);
|
return find_fun(rtx, name);
|
||||||
#else
|
#else
|
||||||
qse_mcstr_t mbs;
|
qse_wcstr_t wcs;
|
||||||
qse_awk_fun_t* fun;
|
qse_awk_fun_t* fun;
|
||||||
mbs.ptr = qse_awk_rtx_wcstombsdup(rtx, name, &mbs.len);
|
wcs.ptr = qse_awk_rtx_mbstowcsdup(rtx, name, &wcs.len);
|
||||||
if (!mbs.ptr) return -1;
|
if (!wcs.ptr) return QSE_NULL;
|
||||||
fun = find_fun(rtx, mbs.ptr);
|
fun = find_fun(rtx, wcs.ptr);
|
||||||
qse_awk_rtx_freemem (rtx, mbs.ptr);
|
qse_awk_rtx_freemem (rtx, wcs.ptr);
|
||||||
return fun;
|
return fun;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1546,12 +1546,12 @@ qse_awk_fun_t* qse_awk_rtx_findfunwithmbs (qse_awk_rtx_t* rtx, const qse_mchar_t
|
|||||||
qse_awk_fun_t* qse_awk_rtx_findfunwithwcs (qse_awk_rtx_t* rtx, const qse_wchar_t* name)
|
qse_awk_fun_t* qse_awk_rtx_findfunwithwcs (qse_awk_rtx_t* rtx, const qse_wchar_t* name)
|
||||||
{
|
{
|
||||||
#if defined(QSE_CHAR_IS_MCHAR)
|
#if defined(QSE_CHAR_IS_MCHAR)
|
||||||
qse_wcstr_t wcs;
|
qse_mcstr_t mbs;
|
||||||
qse_awk_fun_t* fun;
|
qse_awk_fun_t* fun;
|
||||||
wcs.ptr = qse_awk_rtx_mbstowcsdup(rtx, name, &wcs.len);
|
mbs.ptr = qse_awk_rtx_wcstombsdup(rtx, name, &mbs.len);
|
||||||
if (!wcs.ptr) return -1;
|
if (!mbs.ptr) return QSE_NULL;
|
||||||
fun = find_fun(rtx, wcs.ptr);
|
fun = find_fun(rtx, mbs.ptr);
|
||||||
qse_awk_rtx_freemem (rtx, wcs.ptr);
|
qse_awk_rtx_freemem (rtx, mbs.ptr);
|
||||||
return fun;
|
return fun;
|
||||||
#else
|
#else
|
||||||
return find_fun(rtx, name);
|
return find_fun(rtx, name);
|
||||||
|
Loading…
Reference in New Issue
Block a user