monor code touch-up

This commit is contained in:
hyunghwan.chung 2019-09-28 09:14:21 +00:00
parent 66be4b4d39
commit 19d480719e
5 changed files with 10 additions and 9 deletions

View File

@ -4199,7 +4199,7 @@ static moo_pfrc_t pf_strfmt (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
static moo_pfrc_t pf_strlen (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs) static moo_pfrc_t pf_strlen (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
{ {
moo_oop_t rcv, ret; moo_oop_t rcv, retv;
moo_oow_t i, limit; moo_oow_t i, limit;
moo_ooch_t* ptr; moo_ooch_t* ptr;
@ -4216,10 +4216,10 @@ static moo_pfrc_t pf_strlen (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
if (*ptr == '\0') break; if (*ptr == '\0') break;
ptr++; ptr++;
} }
ret = moo_oowtoint (moo, i); retv = moo_oowtoint(moo, i);
if (!ret) return MOO_PF_FAILURE; if (!retv) return MOO_PF_FAILURE;
MOO_STACK_SETRET (moo, nargs, ret); MOO_STACK_SETRET (moo, nargs, retv);
return MOO_PF_SUCCESS; return MOO_PF_SUCCESS;
} }

View File

@ -20,9 +20,10 @@ LIBSRCS := \
dic.c \ dic.c \
err.c \ err.c \
exec.c \ exec.c \
fmt.c \
gc.c \ gc.c \
heap.c \ heap.c \
logfmt.c \ mb8.c \
moo.c \ moo.c \
number.c \ number.c \
obj.c \ obj.c \

View File

@ -291,7 +291,7 @@ enum moo_cmgr_id_t
{ {
MOO_CMGR_UTF8, MOO_CMGR_UTF8,
MOO_CMGR_UTF16, MOO_CMGR_UTF16,
MOO_CMGR_MB8, MOO_CMGR_MB8
}; };
typedef enum moo_cmgr_id_t moo_cmgr_id_t; typedef enum moo_cmgr_id_t moo_cmgr_id_t;

View File

@ -101,7 +101,7 @@ enum moo_option_t
MOO_OPTION_SYMTAB_SIZE, /* default system table size */ MOO_OPTION_SYMTAB_SIZE, /* default system table size */
MOO_OPTION_SYSDIC_SIZE, /* default system dictionary size */ MOO_OPTION_SYSDIC_SIZE, /* default system dictionary size */
MOO_OPTION_PROCSTK_SIZE, /* default process stack size */ MOO_OPTION_PROCSTK_SIZE, /* default process stack size */
MOO_OPTION_MOD_INCTX, MOO_OPTION_MOD_INCTX
/* /*
MOO_OPTION_CMGR_FS, MOO_OPTION_CMGR_FS,

View File

@ -743,7 +743,7 @@ done:
else else
{ {
moo_oop_t v; moo_oop_t v;
v = moo_oowtoint (moo, ssz); v = moo_oowtoint(moo, ssz);
if (!v) MOO_PF_FAILURE; if (!v) MOO_PF_FAILURE;
MOO_STACK_SETRET (moo, nargs, v); MOO_STACK_SETRET (moo, nargs, v);
} }
@ -949,7 +949,7 @@ done:
else else
{ {
moo_oop_t v; moo_oop_t v;
v = moo_oowtoint (moo, ssz); v = moo_oowtoint(moo, ssz);
if (!v) MOO_PF_FAILURE; if (!v) MOO_PF_FAILURE;
MOO_STACK_SETRET (moo, nargs, v); MOO_STACK_SETRET (moo, nargs, v);
} }