mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-06 01:41:37 +08:00
Fix several constructors.
"is/was supplied/specified" is different from "is not undefined" which is used in most of the spec.
This commit is contained in:
@@ -50,12 +50,12 @@ int js_utfptrtoidx(const char *s, const char *p)
|
||||
|
||||
static void jsB_new_String(js_State *J)
|
||||
{
|
||||
js_newstring(J, js_isdefined(J, 1) ? js_tostring(J, 1) : "");
|
||||
js_newstring(J, js_gettop(J) > 1 ? js_tostring(J, 1) : "");
|
||||
}
|
||||
|
||||
static void jsB_String(js_State *J)
|
||||
{
|
||||
js_pushliteral(J, js_isdefined(J, 1) ? js_tostring(J, 1) : "");
|
||||
js_pushliteral(J, js_gettop(J) > 1 ? js_tostring(J, 1) : "");
|
||||
}
|
||||
|
||||
static void Sp_toString(js_State *J)
|
||||
|
||||
Reference in New Issue
Block a user