| 51 | } |
| 52 | |
| 53 | PyObject *JSObjectItemsProxyMethodDefinitions::JSObjectItemsProxy_iter(JSObjectItemsProxy *self) { |
| 54 | JSObjectIterProxy *iterator = PyObject_GC_New(JSObjectIterProxy, &JSObjectIterProxyType); |
| 55 | if (iterator == NULL) { |
| 56 | return NULL; |
| 57 | } |
| 58 | iterator->it.reversed = false; |
| 59 | iterator->it.it_index = 0; |
| 60 | iterator->it.kind = KIND_ITEMS; |
| 61 | Py_INCREF(self->dv.dv_dict); |
| 62 | iterator->it.di_dict = self->dv.dv_dict; |
| 63 | iterator->it.props = new JS::PersistentRootedIdVector(GLOBAL_CX); |
| 64 | // Get **enumerable** own properties |
| 65 | if (!js::GetPropertyKeys(GLOBAL_CX, *(((JSObjectProxy *)(self->dv.dv_dict))->jsObject), JSITER_OWNONLY, iterator->it.props)) { |
| 66 | return NULL; |
| 67 | } |
| 68 | PyObject_GC_Track(iterator); |
| 69 | return (PyObject *)iterator; |
| 70 | } |
| 71 | |
| 72 | PyObject *JSObjectItemsProxyMethodDefinitions::JSObjectItemsProxy_iter_reverse(JSObjectItemsProxy *self) { |
| 73 | JSObjectIterProxy *iterator = PyObject_GC_New(JSObjectIterProxy, &JSObjectIterProxyType); |
nothing calls this directly
no outgoing calls
no test coverage detected