private
| 59 | |
| 60 | // private |
| 61 | static int all_contained_in(PyObject *self, PyObject *other) { |
| 62 | PyObject *iter = PyObject_GetIter(self); |
| 63 | int ok = 1; |
| 64 | |
| 65 | if (iter == NULL) { |
| 66 | return -1; |
| 67 | } |
| 68 | |
| 69 | for (;; ) { |
| 70 | PyObject *next = PyIter_Next(iter); |
| 71 | if (next == NULL) { |
| 72 | if (PyErr_Occurred()) |
| 73 | ok = -1; |
| 74 | break; |
| 75 | } |
| 76 | if (PyObject_TypeCheck(other, &JSObjectValuesProxyType)) { |
| 77 | JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_contains((JSObjectValuesProxy *)other, next); |
| 78 | } |
| 79 | else { |
| 80 | ok = PySequence_Contains(other, next); |
| 81 | } |
| 82 | Py_DECREF(next); |
| 83 | if (ok <= 0) |
| 84 | break; |
| 85 | } |
| 86 | |
| 87 | Py_DECREF(iter); |
| 88 | return ok; |
| 89 | } |
| 90 | |
| 91 | PyObject *JSObjectValuesProxyMethodDefinitions::JSObjectValuesProxy_iter(JSObjectValuesProxy *self) { |
| 92 | JSObjectIterProxy *iterator = PyObject_GC_New(JSObjectIterProxy, &JSObjectIterProxyType); |
nothing calls this directly
no outgoing calls
no test coverage detected