Lines Matching refs:I

46 	struct php_com_iterator *I = (struct php_com_iterator*)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 if (I->zdata) { in com_iter_dtor()
54 zval_ptr_dtor((zval**)&I->zdata); in com_iter_dtor()
56 efree(I); in com_iter_dtor()
61 struct php_com_iterator *I = (struct php_com_iterator*)iter->data; in com_iter_valid() local
63 if (I->zdata) { in com_iter_valid()
72 struct php_com_iterator *I = (struct php_com_iterator*)iter->data; in com_iter_get_data() local
74 *data = &I->zdata; in com_iter_get_data()
80 struct php_com_iterator *I = (struct php_com_iterator*)iter->data; in com_iter_get_key() local
82 if (I->key == (ulong)-1) { in com_iter_get_key()
85 *int_key = I->key; in com_iter_get_key()
91 struct php_com_iterator *I = (struct php_com_iterator*)iter->data; in com_iter_move_forwards() local
96 VariantClear(&I->v); in com_iter_move_forwards()
98 if (I->zdata) { in com_iter_move_forwards()
99 zval_ptr_dtor((zval**)&I->zdata); in com_iter_move_forwards()
100 I->zdata = NULL; in com_iter_move_forwards()
103 if (I->ev) { in com_iter_move_forwards()
105 if (SUCCEEDED(IEnumVARIANT_Next(I->ev, 1, &I->v, &n_fetched)) && n_fetched > 0) { in com_iter_move_forwards()
106 I->key++; in com_iter_move_forwards()
109 I->key = (ulong)-1; in com_iter_move_forwards()
114 if (I->key >= (ULONG) I->sa_max) { in com_iter_move_forwards()
115 I->key = (ulong)-1; in com_iter_move_forwards()
118 I->key++; in com_iter_move_forwards()
119 if (php_com_safearray_get_elem(&I->safe_array, &I->v, (LONG)I->key TSRMLS_CC) == 0) { in com_iter_move_forwards()
120 I->key = (ulong)-1; in com_iter_move_forwards()
126 php_com_zval_from_variant(ptr, &I->v, I->code_page TSRMLS_CC); in com_iter_move_forwards()
128 I->zdata = ptr; in com_iter_move_forwards()
145 struct php_com_iterator *I; in php_com_iter_get() local
166 I = (struct php_com_iterator*)ecalloc(1, sizeof(*I)); in php_com_iter_get()
167 I->iter.funcs = &com_iter_funcs; in php_com_iter_get()
168 I->iter.data = I; in php_com_iter_get()
169 I->code_page = obj->code_page; in php_com_iter_get()
170 I->zdata = NULL; in php_com_iter_get()
171 VariantInit(&I->safe_array); in php_com_iter_get()
172 VariantInit(&I->v); in php_com_iter_get()
188 VariantCopy(&I->safe_array, &obj->v); in php_com_iter_get()
191 SafeArrayGetLBound(V_ARRAY(&I->safe_array), 1, &bound); in php_com_iter_get()
192 SafeArrayGetUBound(V_ARRAY(&I->safe_array), 1, &I->sa_max); in php_com_iter_get()
195 if (php_com_safearray_get_elem(&I->safe_array, &I->v, bound TSRMLS_CC)) { in php_com_iter_get()
196 I->key = bound; in php_com_iter_get()
198 php_com_zval_from_variant(ptr, &I->v, I->code_page TSRMLS_CC); in php_com_iter_get()
199 I->zdata = ptr; in php_com_iter_get()
201 I->key = (ulong)-1; in php_com_iter_get()
225 I->ev = iev; in php_com_iter_get()
228 if (SUCCEEDED(IEnumVARIANT_Next(I->ev, 1, &I->v, &n_fetched)) && n_fetched > 0) { in php_com_iter_get()
230 I->key = 0; in php_com_iter_get()
232 php_com_zval_from_variant(ptr, &I->v, I->code_page TSRMLS_CC); in php_com_iter_get()
233 I->zdata = ptr; in php_com_iter_get()
236 I->key = (ulong)-1; in php_com_iter_get()
240 return &I->iter; in php_com_iter_get()
243 if (I) { in php_com_iter_get()
244 VariantClear(&I->safe_array); in php_com_iter_get()
245 VariantClear(&I->v); in php_com_iter_get()
246 efree(I); in php_com_iter_get()