}
JS_ConvertArguments(JSContext *cx, uintN argc, jsval *argv, const char *format,		    ...){    va_list ap;    uintN i;    JSBool required;    const char *cp;    JSFunction *fun;    jsdouble d;    JSString *str;    JSObject *obj;    CHECK_REQUEST(cx);    va_start(ap, format);    i = 0;    required = JS_TRUE;    for (cp = format; *cp != '\0'; cp++) {    	if (isspace(*cp))	    continue;    	if (*cp == '/') {	    required = JS_FALSE;	    continue;	}	if (i == argc) {	    if (required) {		fun = js_ValueToFunction(cx, &argv[-2], JS_FALSE);		if (fun) {		    JS_ReportError(cx,				   "%s requires more than %u argument%s",				   JS_GetFunctionName(fun),				   argc, (argc == 1) ? "" : "s");		}		return JS_FALSE;	    }	    break;	}    	switch (*cp) {    	  case 'b':	    if (!js_ValueToBoolean(cx, argv[i], va_arg(ap, JSBool *)))	    	return JS_FALSE;	    break;    	  case 'c':	    if (!js_ValueToUint16(cx, argv[i], va_arg(ap, uint16 *)))	    	return JS_FALSE;	    break;    	  case 'i':	    if (!js_ValueToECMAInt32(cx, argv[i], va_arg(ap, int32 *)))	    	return JS_FALSE;	    break;    	  case 'u':	    if (!js_ValueToECMAUint32(cx, argv[i], va_arg(ap, uint32 *)))	    	return JS_FALSE;	    break;    	  case 'j':	    if (!js_ValueToInt32(cx, argv[i], va_arg(ap, int32 *)))	    	return JS_FALSE;	    break;    	  case 'd':	    if (!js_ValueToNumber(cx, argv[i], va_arg(ap, jsdouble *)))	    	return JS_FALSE;	    break;    	  case 'I':	    if (!js_ValueToNumber(cx, argv[i], &d))	    	return JS_FALSE;	    *va_arg(ap, jsdouble *) = js_DoubleToInteger(d);	    break;    	  case 's':	    str = js_ValueToString(cx, argv[i]);	    if (!str)	    	return JS_FALSE;	    argv[i] = STRING_TO_JSVAL(str);	    *va_arg(ap, char **) = JS_GetStringBytes(str);	    break;    	  case 'S':	    str = js_ValueToString(cx, argv[i]);	    if (!str)	    	return JS_FALSE;	    argv[i] = STRING_TO_JSVAL(str);	    *va_arg(ap, JSString **) = str;	    break;    	  case 'o':	    if (!js_ValueToObject(cx, argv[i], &obj))	    	return JS_FALSE;	    argv[i] = OBJECT_TO_JSVAL(obj);	    *va_arg(ap, JSObject **) = obj;	    break;    	  case 'f':	    fun = js_ValueToFunction(cx, &argv[i], JS_FALSE);	    if (!fun)	    	return JS_FALSE;	    argv[i] = OBJECT_TO_JSVAL(fun->object);	    *va_arg(ap, JSFunction **) = fun;	    break;    	  case 'v':	    *va_arg(ap, jsval *) = argv[i];	    break;    	  case '*':	    break;    	  default:	    JS_ReportError(cx, "invalid format character %c", *cp);	    return JS_FALSE;    	}    	i++;    }    va_end(ap);    return JS_TRUE;}