mirror of
https://github.com/ccxvii/mujs.git
synced 2026-09-22 07:03:36 +08:00
Fixes.
This commit is contained in:
@@ -284,6 +284,7 @@ static void pexpi(int d, int p, js_Ast *exp)
|
||||
p = tp;
|
||||
|
||||
switch (exp->type) {
|
||||
case AST_IDENTIFIER: ps(exp->string); break;
|
||||
case EXP_IDENTIFIER: ps(exp->string); break;
|
||||
case EXP_NUMBER: printf("%.9g", exp->number); break;
|
||||
case EXP_STRING: pstr(exp->string); break;
|
||||
|
||||
@@ -265,6 +265,11 @@ static js_Object *jsR_tofunction(js_State *J, int idx)
|
||||
|
||||
/* Stack manipulation */
|
||||
|
||||
int js_gettop(js_State *J)
|
||||
{
|
||||
return TOP - BOT;
|
||||
}
|
||||
|
||||
void js_pop(js_State *J, int n)
|
||||
{
|
||||
TOP -= n;
|
||||
@@ -838,9 +843,9 @@ static void jsR_callscript(js_State *J, int n, js_Function *F)
|
||||
|
||||
static void jsR_callcfunction(js_State *J, int n, int min, js_CFunction F)
|
||||
{
|
||||
int rv;
|
||||
int rv, i;
|
||||
|
||||
while (min++ < n)
|
||||
for (i = n; i < min; ++i)
|
||||
js_pushundefined(J);
|
||||
|
||||
rv = F(J, n);
|
||||
|
||||
Reference in New Issue
Block a user