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

Method JSArrayProxy_reverse

src/JSArrayProxy.cc:1066–1076  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1064}
1065
1066PyObject *JSArrayProxyMethodDefinitions::JSArrayProxy_reverse(JSArrayProxy *self) {
1067 if (JSArrayProxy_length(self) > 1) {
1068 JS::RootedValue jReturnedArray(GLOBAL_CX);
1069 if (!JS_CallFunctionName(GLOBAL_CX, *(self->jsArray), "reverse", JS::HandleValueArray::empty(), &jReturnedArray)) {
1070 PyErr_Format(PyExc_SystemError, "%s JSAPI call failed", JSArrayProxyType.tp_name);
1071 return NULL;
1072 }
1073 }
1074
1075 Py_RETURN_NONE;
1076}
1077
1078// private
1079static bool sort_compare_key_func(JSContext *cx, unsigned argc, JS::Value *vp) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected