minor coding change

This commit is contained in:
hyunghwan.chung 2018-12-09 17:16:47 +00:00
parent fac97a3921
commit 66f8b530c7
2 changed files with 6 additions and 6 deletions

View File

@ -61,7 +61,7 @@ static moo_oop_oop_t expand_bucket (moo_t* moo, moo_oop_oop_t oldbuc)
}
moo_pushtmp (moo, (moo_oop_t*)&oldbuc);
newbuc = (moo_oop_oop_t)moo_instantiate (moo, moo->_array, MOO_NULL, newsz);
newbuc = (moo_oop_oop_t)moo_instantiate(moo, moo->_array, MOO_NULL, newsz);
moo_poptmp (moo);
if (!newbuc) return MOO_NULL;
@ -181,28 +181,28 @@ moo_oop_t moo_makestringwithbchars (moo_t* moo, const moo_bch_t* ptr, moo_oow_t
inlen = len;
if (moo_convbtouchars (moo, ptr, &inlen, MOO_NULL, &outlen) <= -1) return MOO_NULL;
obj = moo_instantiate (moo, moo->_string, MOO_NULL, outlen);
obj = moo_instantiate(moo, moo->_string, MOO_NULL, outlen);
if (!obj) return MOO_NULL;
inlen = len;
moo_convbtouchars (moo, ptr, &inlen, MOO_OBJ_GET_CHAR_SLOT(obj), &outlen);
return obj;
#else
return moo_instantiate (moo, moo->_string, ptr, len);
return moo_instantiate(moo, moo->_string, ptr, len);
#endif
}
moo_oop_t moo_makestringwithuchars (moo_t* moo, const moo_uch_t* ptr, moo_oow_t len)
{
#if defined(MOO_OOCH_IS_UCH)
return moo_instantiate (moo, moo->_string, ptr, len);
return moo_instantiate(moo, moo->_string, ptr, len);
#else
moo_oow_t inlen, outlen;
moo_oop_t obj;
inlen = len;
if (moo_convutobchars (moo, ptr, &inlen, MOO_NULL, &outlen) <= -1) return MOO_NULL;
obj = moo_instantiate (moo, moo->_string, MOO_NULL, outlen);
obj = moo_instantiate(moo, moo->_string, MOO_NULL, outlen);
if (!obj) return MOO_NULL;
inlen = len;

View File

@ -326,7 +326,7 @@ static moo_pfrc_t pf_listen_socket (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs)
MOO_PF_CHECK_RCV (moo,
MOO_OOP_IS_POINTER(sck) &&
MOO_OBJ_BYTESOF(sck) >= (MOO_SIZEOF(*sck) - MOO_SIZEOF(moo_obj_t)) &&
MOO_OOP_IS_SMOOI(sck->handle));/*newsck = (oop_sck_t)moo_instantiate (moo, MOO_OBJ_GET_CLASS(sck), MOO_NULL, 0);*/
MOO_OOP_IS_SMOOI(sck->handle));/*newsck = (oop_sck_t)moo_instantiate(moo, MOO_OBJ_GET_CLASS(sck), MOO_NULL, 0);*/
MOO_PF_CHECK_ARGS (moo, nargs, MOO_OOP_IS_SMOOI(arg));
fd = MOO_OOP_TO_SMOOI(sck->handle);