MCPcopy Create free account
hub / github.com/GNOME/gjs / gjs_encode_into

Function gjs_encode_into

gjs/text-encoding.cpp:543–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543GJS_JSAPI_RETURN_CONVENTION
544static bool gjs_encode_into(JSContext* cx, unsigned argc, JS::Value* vp) {
545 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
546 JS::RootedString str(cx);
547 JS::RootedObject uint8array(cx);
548 if (!gjs_parse_call_args(cx, "encodeInto", args, "So", "string", &str,
549 "byteArray", &uint8array))
550 return false;
551
552 return gjs_encode_into_uint8array(cx, str, uint8array, args.rval());
553}
554
555static JSFunctionSpec gjs_text_encoding_module_funcs[] = {
556 JS_FN("decode", gjs_decode, 3, 0),

Callers

nothing calls this directly

Calls 2

gjs_parse_call_argsFunction · 0.85

Tested by

no test coverage detected