| 161 | } |
| 162 | |
| 163 | PyObject *JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_iter(JSObjectKeysProxy *self) { |
| 164 | JSObjectIterProxy *iterator = PyObject_GC_New(JSObjectIterProxy, &JSObjectIterProxyType); |
| 165 | if (iterator == NULL) { |
| 166 | return NULL; |
| 167 | } |
| 168 | iterator->it.reversed = false; |
| 169 | iterator->it.it_index = 0; |
| 170 | iterator->it.kind = KIND_KEYS; |
| 171 | Py_INCREF(self->dv.dv_dict); |
| 172 | iterator->it.di_dict = self->dv.dv_dict; |
| 173 | iterator->it.props = new JS::PersistentRootedIdVector(GLOBAL_CX); |
| 174 | // Get **enumerable** own properties |
| 175 | if (!js::GetPropertyKeys(GLOBAL_CX, *(((JSObjectProxy *)(self->dv.dv_dict))->jsObject), JSITER_OWNONLY, iterator->it.props)) { |
| 176 | return NULL; |
| 177 | } |
| 178 | PyObject_GC_Track(iterator); |
| 179 | return (PyObject *)iterator; |
| 180 | } |
| 181 | |
| 182 | PyObject *JSObjectKeysProxyMethodDefinitions::JSObjectKeysProxy_iter_reverse(JSObjectKeysProxy *self) { |
| 183 | JSObjectIterProxy *iterator = PyObject_GC_New(JSObjectIterProxy, &JSObjectIterProxyType); |
nothing calls this directly
no outgoing calls
no test coverage detected