Lines Matching refs:I
44 struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); in com_iter_dtor() local
46 if (I->ev) { in com_iter_dtor()
47 IEnumVARIANT_Release(I->ev); in com_iter_dtor()
49 VariantClear(&I->v); in com_iter_dtor()
50 VariantClear(&I->safe_array); in com_iter_dtor()
51 zval_ptr_dtor(&I->zdata); in com_iter_dtor()
56 struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); in com_iter_valid() local
58 if (Z_TYPE(I->zdata) != IS_UNDEF) { in com_iter_valid()
67 struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); in com_iter_get_data() local
69 return &I->zdata; in com_iter_get_data()
74 struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); in com_iter_get_key() local
76 if (I->key == (zend_ulong)-1) { in com_iter_get_key()
79 ZVAL_LONG(key, I->key); in com_iter_get_key()
85 struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); in com_iter_move_forwards() local
90 VariantClear(&I->v); in com_iter_move_forwards()
92 if (Z_TYPE(I->zdata) != IS_UNDEF) { in com_iter_move_forwards()
93 zval_ptr_dtor(&I->zdata); in com_iter_move_forwards()
94 ZVAL_UNDEF(&I->zdata); in com_iter_move_forwards()
97 if (I->ev) { in com_iter_move_forwards()
99 if (SUCCEEDED(IEnumVARIANT_Next(I->ev, 1, &I->v, &n_fetched)) && n_fetched > 0) { in com_iter_move_forwards()
100 I->key++; in com_iter_move_forwards()
103 I->key = (zend_ulong)-1; in com_iter_move_forwards()
108 if (I->key >= (ULONG) I->sa_max) { in com_iter_move_forwards()
109 I->key = (zend_ulong)-1; in com_iter_move_forwards()
112 I->key++; in com_iter_move_forwards()
113 if (php_com_safearray_get_elem(&I->safe_array, &I->v, (LONG)I->key) == 0) { in com_iter_move_forwards()
114 I->key = (zend_ulong)-1; in com_iter_move_forwards()
120 php_com_zval_from_variant(&ptr, &I->v, I->code_page); in com_iter_move_forwards()
122 ZVAL_COPY_VALUE(&I->zdata, &ptr); in com_iter_move_forwards()
138 struct php_com_iterator *I; in php_com_iter_get() local
160 I = (struct php_com_iterator*)ecalloc(1, sizeof(*I)); in php_com_iter_get()
161 zend_iterator_init(&I->iter); in php_com_iter_get()
162 I->iter.funcs = &com_iter_funcs; in php_com_iter_get()
163 Z_PTR(I->iter.data) = I; in php_com_iter_get()
164 I->code_page = obj->code_page; in php_com_iter_get()
165 ZVAL_UNDEF(&I->zdata); in php_com_iter_get()
166 VariantInit(&I->safe_array); in php_com_iter_get()
167 VariantInit(&I->v); in php_com_iter_get()
183 VariantCopy(&I->safe_array, &obj->v); in php_com_iter_get()
186 SafeArrayGetLBound(V_ARRAY(&I->safe_array), 1, &bound); in php_com_iter_get()
187 SafeArrayGetUBound(V_ARRAY(&I->safe_array), 1, &I->sa_max); in php_com_iter_get()
190 if (I->sa_max >= bound && php_com_safearray_get_elem(&I->safe_array, &I->v, bound)) { in php_com_iter_get()
191 I->key = bound; in php_com_iter_get()
193 php_com_zval_from_variant(&ptr, &I->v, I->code_page); in php_com_iter_get()
194 ZVAL_COPY_VALUE(&I->zdata, &ptr); in php_com_iter_get()
196 I->key = (zend_ulong)-1; in php_com_iter_get()
220 I->ev = iev; in php_com_iter_get()
223 if (SUCCEEDED(IEnumVARIANT_Next(I->ev, 1, &I->v, &n_fetched)) && n_fetched > 0) { in php_com_iter_get()
225 I->key = 0; in php_com_iter_get()
227 php_com_zval_from_variant(&ptr, &I->v, I->code_page); in php_com_iter_get()
228 ZVAL_COPY_VALUE(&I->zdata, &ptr); in php_com_iter_get()
231 I->key = (zend_ulong)-1; in php_com_iter_get()
235 return &I->iter; in php_com_iter_get()
238 if (I) { in php_com_iter_get()
239 VariantClear(&I->safe_array); in php_com_iter_get()
240 VariantClear(&I->v); in php_com_iter_get()
241 efree(I); in php_com_iter_get()