MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / list_slice

Function list_slice

src/JSArrayProxy.cc:86–97  ·  view source on GitHub ↗

private

Source from the content-addressed store, hash-verified

84
85// private
86static PyObject *list_slice(JSArrayProxy *self, Py_ssize_t ilow, Py_ssize_t ihigh)
87{
88 JS::Rooted<JS::ValueArray<2>> jArgs(GLOBAL_CX);
89 jArgs[0].setInt32(ilow);
90 jArgs[1].setInt32(ihigh);
91 JS::RootedValue jReturnedArray(GLOBAL_CX);
92 if (!JS_CallFunctionName(GLOBAL_CX, *(self->jsArray), "slice", jArgs, &jReturnedArray)) {
93 PyErr_Format(PyExc_SystemError, "%s JSAPI call failed", JSArrayProxyType.tp_name);
94 return NULL;
95 }
96 return pyTypeFactory(GLOBAL_CX, jReturnedArray);
97}
98
99PyObject *JSArrayProxyMethodDefinitions::JSArrayProxy_get_subscript(JSArrayProxy *self, PyObject *key)
100{

Callers 3

list_ass_sliceFunction · 0.85

Calls 1

pyTypeFactoryFunction · 0.85

Tested by

no test coverage detected