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

Function gjs_value_from_byte_array_gi_argument

gi/arg.cpp:2985–3003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2983}
2984
2985bool gjs_value_from_byte_array_gi_argument(JSContext* cx,
2986 JS::MutableHandleValue value_out,
2987 GIArgument* arg) {
2988 gjs_debug_marshal(GJS_DEBUG_GFUNCTION,
2989 "Converting GIArgument byte array to JS::Value");
2990
2991 auto* byte_array = gjs_arg_get<GByteArray*>(arg);
2992 if (!byte_array) {
2993 value_out.setNull();
2994 return true;
2995 }
2996
2997 JSObject* u8array = gjs_byte_array_from_byte_array(cx, byte_array);
2998 if (!u8array)
2999 return false;
3000
3001 value_out.setObject(*u8array);
3002 return true;
3003}
3004
3005bool gjs_value_from_basic_garray_gi_argument(JSContext* cx,
3006 JS::MutableHandleValue value_out,

Callers 2

outMethod · 0.85

Calls 1

Tested by

no test coverage detected