Add js_pushlstring to avoid a lot of try/malloc/pushstring boilerplate.

This commit is contained in:
Tor Andersson
2014-01-31 16:14:51 +01:00
parent 6c37f967b4
commit b7afd400f6
5 changed files with 44 additions and 54 deletions

View File

@@ -448,7 +448,7 @@ void jsB_initarray(js_State *J)
}
js_newcconstructor(J, jsB_new_Array, jsB_new_Array, 1);
{
/* ECMA-262-5 */
/* ES5 */
jsB_propf(J, "isArray", A_isArray, 1);
}
js_defglobal(J, "Array", JS_DONTENUM);