minor code touch-up again
This commit is contained in:
parent
53b76934d9
commit
3bae71b21f
@ -1047,6 +1047,7 @@ int Hawk::Value::setIndexedStr (const Index& idx, const hawk_bch_t* str, bool nu
|
|||||||
int Hawk::Value::setIndexedStr (Run* r, const Index& idx, const hawk_bch_t* str, bool numeric)
|
int Hawk::Value::setIndexedStr (Run* r, const Index& idx, const hawk_bch_t* str, bool numeric)
|
||||||
{
|
{
|
||||||
hawk_val_t* tmp;
|
hawk_val_t* tmp;
|
||||||
|
|
||||||
tmp = numeric? hawk_rtx_makenumorstrvalwithbchars(r->rtx, str, hawk_count_bcstr(str)):
|
tmp = numeric? hawk_rtx_makenumorstrvalwithbchars(r->rtx, str, hawk_count_bcstr(str)):
|
||||||
hawk_rtx_makestrvalwithbcstr(r->rtx, str);
|
hawk_rtx_makestrvalwithbcstr(r->rtx, str);
|
||||||
if (HAWK_UNLIKELY(!tmp))
|
if (HAWK_UNLIKELY(!tmp))
|
||||||
@ -1823,17 +1824,17 @@ int Hawk::init_runctx ()
|
|||||||
rio.console = consoleHandler;
|
rio.console = consoleHandler;
|
||||||
|
|
||||||
hawk_rtx_t* rtx = hawk_rtx_open(this->hawk, HAWK_SIZEOF(rxtn_t), &rio);
|
hawk_rtx_t* rtx = hawk_rtx_open(this->hawk, HAWK_SIZEOF(rxtn_t), &rio);
|
||||||
if (rtx == HAWK_NULL)
|
if (HAWK_UNLIKELY(!rtx))
|
||||||
{
|
{
|
||||||
this->retrieveError();
|
this->retrieveError();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtx->_instsize += HAWK_SIZEOF(rxtn_t);
|
rtx->_instsize += HAWK_SIZEOF(rxtn_t);
|
||||||
runctx.rtx = rtx;
|
this->runctx.rtx = rtx;
|
||||||
|
|
||||||
rxtn_t* rxtn = GET_RXTN(rtx);
|
rxtn_t* rxtn = GET_RXTN(rtx);
|
||||||
rxtn->run = &runctx;
|
rxtn->run = &this->runctx;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1336,7 +1336,7 @@ public:
|
|||||||
///
|
///
|
||||||
const Hawk::Run* getRunContext () const
|
const Hawk::Run* getRunContext () const
|
||||||
{
|
{
|
||||||
return &runctx;
|
return &this->runctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -1348,7 +1348,7 @@ public:
|
|||||||
///
|
///
|
||||||
Hawk::Run* getRunContext ()
|
Hawk::Run* getRunContext ()
|
||||||
{
|
{
|
||||||
return &runctx;
|
return &this->runctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -132,7 +132,7 @@ static hawk_sio_t* open_sio_std (Hawk* hawk, HawkStd::Run* run, hawk_sio_std_t s
|
|||||||
int HawkStd::open ()
|
int HawkStd::open ()
|
||||||
{
|
{
|
||||||
int n = Hawk::open();
|
int n = Hawk::open();
|
||||||
if (n == -1) return n;
|
if (HAWK_UNLIKELY(n <= -1)) return n;
|
||||||
|
|
||||||
this->gbl_argc = this->addGlobal(HAWK_T("ARGC"));
|
this->gbl_argc = this->addGlobal(HAWK_T("ARGC"));
|
||||||
this->gbl_argv = this->addGlobal(HAWK_T("ARGV"));
|
this->gbl_argv = this->addGlobal(HAWK_T("ARGV"));
|
||||||
|
Loading…
Reference in New Issue
Block a user