| 3021 | } |
| 3022 | |
| 3023 | bool gjs_value_from_basic_gptrarray_gi_argument( |
| 3024 | JSContext* cx, JS::MutableHandleValue value_out, GITypeTag element_tag, |
| 3025 | GIArgument* arg) { |
| 3026 | gjs_debug_marshal(GJS_DEBUG_GFUNCTION, |
| 3027 | "Converting GIArgument GPtrArray of %s to JS::Value", |
| 3028 | gi_type_tag_to_string(element_tag)); |
| 3029 | |
| 3030 | auto* ptr_array = gjs_arg_get<GPtrArray*>(arg); |
| 3031 | if (!ptr_array) { |
| 3032 | value_out.setNull(); |
| 3033 | return true; |
| 3034 | } |
| 3035 | |
| 3036 | return gjs_array_from_basic_c_array_internal( |
| 3037 | cx, value_out, element_tag, ptr_array->len, ptr_array->pdata); |
| 3038 | } |
| 3039 | |
| 3040 | template <typename T> |
| 3041 | GJS_JSAPI_RETURN_CONVENTION |
no test coverage detected