Lines Matching refs:I

46 	struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data);  in com_iter_dtor()  local
48 if (I->ev) { in com_iter_dtor()
49 IEnumVARIANT_Release(I->ev); in com_iter_dtor()
51 VariantClear(&I->v); in com_iter_dtor()
52 VariantClear(&I->safe_array); in com_iter_dtor()
53 zval_ptr_dtor(&I->zdata); in com_iter_dtor()
58 struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); in com_iter_valid() local
60 if (Z_TYPE(I->zdata) != IS_UNDEF) { in com_iter_valid()
69 struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); in com_iter_get_data() local
71 return &I->zdata; in com_iter_get_data()
76 struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); in com_iter_get_key() local
78 if (I->key == (zend_ulong)-1) { in com_iter_get_key()
81 ZVAL_LONG(key, I->key); in com_iter_get_key()
87 struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); in com_iter_move_forwards() local
92 VariantClear(&I->v); in com_iter_move_forwards()
94 if (Z_TYPE(I->zdata) != IS_UNDEF) { in com_iter_move_forwards()
95 zval_ptr_dtor(&I->zdata); in com_iter_move_forwards()
96 ZVAL_UNDEF(&I->zdata); in com_iter_move_forwards()
99 if (I->ev) { in com_iter_move_forwards()
101 if (SUCCEEDED(IEnumVARIANT_Next(I->ev, 1, &I->v, &n_fetched)) && n_fetched > 0) { in com_iter_move_forwards()
102 I->key++; in com_iter_move_forwards()
105 I->key = (ulong)-1; in com_iter_move_forwards()
110 if (I->key >= (ULONG) I->sa_max) { in com_iter_move_forwards()
111 I->key = (ulong)-1; in com_iter_move_forwards()
114 I->key++; in com_iter_move_forwards()
115 if (php_com_safearray_get_elem(&I->safe_array, &I->v, (LONG)I->key) == 0) { in com_iter_move_forwards()
116 I->key = (ulong)-1; in com_iter_move_forwards()
122 php_com_zval_from_variant(&ptr, &I->v, I->code_page); in com_iter_move_forwards()
124 ZVAL_COPY_VALUE(&I->zdata, &ptr); in com_iter_move_forwards()
140 struct php_com_iterator *I; in php_com_iter_get() local
161 I = (struct php_com_iterator*)ecalloc(1, sizeof(*I)); in php_com_iter_get()
162 zend_iterator_init(&I->iter); in php_com_iter_get()
163 I->iter.funcs = &com_iter_funcs; in php_com_iter_get()
164 Z_PTR(I->iter.data) = I; in php_com_iter_get()
165 I->code_page = obj->code_page; in php_com_iter_get()
166 ZVAL_UNDEF(&I->zdata); in php_com_iter_get()
167 VariantInit(&I->safe_array); in php_com_iter_get()
168 VariantInit(&I->v); in php_com_iter_get()
184 VariantCopy(&I->safe_array, &obj->v); in php_com_iter_get()
187 SafeArrayGetLBound(V_ARRAY(&I->safe_array), 1, &bound); in php_com_iter_get()
188 SafeArrayGetUBound(V_ARRAY(&I->safe_array), 1, &I->sa_max); in php_com_iter_get()
191 if (php_com_safearray_get_elem(&I->safe_array, &I->v, bound)) { in php_com_iter_get()
192 I->key = bound; in php_com_iter_get()
194 php_com_zval_from_variant(&ptr, &I->v, I->code_page); in php_com_iter_get()
195 ZVAL_COPY_VALUE(&I->zdata, &ptr); in php_com_iter_get()
197 I->key = (ulong)-1; in php_com_iter_get()
221 I->ev = iev; in php_com_iter_get()
224 if (SUCCEEDED(IEnumVARIANT_Next(I->ev, 1, &I->v, &n_fetched)) && n_fetched > 0) { in php_com_iter_get()
226 I->key = 0; in php_com_iter_get()
228 php_com_zval_from_variant(&ptr, &I->v, I->code_page); in php_com_iter_get()
229 ZVAL_COPY_VALUE(&I->zdata, &ptr); in php_com_iter_get()
232 I->key = (ulong)-1; in php_com_iter_get()
236 return &I->iter; in php_com_iter_get()
239 if (I) { in php_com_iter_get()
240 VariantClear(&I->safe_array); in php_com_iter_get()
241 VariantClear(&I->v); in php_com_iter_get()
242 efree(I); in php_com_iter_get()