| 764 | } |
| 765 | |
| 766 | PyObject *JSArrayProxyMethodDefinitions::JSArrayProxy_copy(JSArrayProxy *self) { |
| 767 | JS::Rooted<JS::ValueArray<2>> jArgs(GLOBAL_CX); |
| 768 | jArgs[0].setInt32(0); |
| 769 | jArgs[1].setInt32(JSArrayProxy_length(self)); |
| 770 | JS::RootedValue jReturnedArray(GLOBAL_CX); |
| 771 | if (!JS_CallFunctionName(GLOBAL_CX, *(self->jsArray), "slice", jArgs, &jReturnedArray)) { |
| 772 | PyErr_Format(PyExc_SystemError, "%s JSAPI call failed", JSArrayProxyType.tp_name); |
| 773 | return NULL; |
| 774 | } |
| 775 | return pyTypeFactory(GLOBAL_CX, jReturnedArray); |
| 776 | } |
| 777 | |
| 778 | PyObject *JSArrayProxyMethodDefinitions::JSArrayProxy_append(JSArrayProxy *self, PyObject *value) { |
| 779 | Py_ssize_t len = JSArrayProxy_length(self); |
nothing calls this directly
no test coverage detected