Lines Matching refs:v

30 static void safe_array_from_zval(VARIANT *v, zval *z, int codepage)  in safe_array_from_zval()  argument
80 V_VT(v) = VT_ARRAY|VT_VARIANT; in safe_array_from_zval()
81 V_ARRAY(v) = sa; in safe_array_from_zval()
88 V_VT(v) = VT_NULL; in safe_array_from_zval()
96 static void php_com_variant_from_zval_ex(VARIANT *v, zval *z, int codepage, VARTYPE vt) in php_com_variant_from_zval_ex() argument
108 V_VT(v) = VT_NULL; in php_com_variant_from_zval_ex()
112 V_VT(v) = VT_BOOL; in php_com_variant_from_zval_ex()
113 V_BOOL(v) = VARIANT_FALSE; in php_com_variant_from_zval_ex()
117 V_VT(v) = VT_BOOL; in php_com_variant_from_zval_ex()
118 V_BOOL(v) = VARIANT_TRUE; in php_com_variant_from_zval_ex()
124 if (V_VT(&obj->v) == VT_DISPATCH) { in php_com_variant_from_zval_ex()
126 V_VT(v) = VT_DISPATCH; in php_com_variant_from_zval_ex()
127 if (V_DISPATCH(&obj->v)) { in php_com_variant_from_zval_ex()
128 IDispatch_AddRef(V_DISPATCH(&obj->v)); in php_com_variant_from_zval_ex()
130 V_DISPATCH(v) = V_DISPATCH(&obj->v); in php_com_variant_from_zval_ex()
133 V_VT(v) = VT_VARIANT | VT_BYREF; in php_com_variant_from_zval_ex()
134 V_VARIANTREF(v) = &obj->v; in php_com_variant_from_zval_ex()
138 V_VT(v) = VT_DISPATCH; in php_com_variant_from_zval_ex()
139 V_DISPATCH(v) = php_com_wrapper_export(z); in php_com_variant_from_zval_ex()
145 safe_array_from_zval(v, z, codepage); in php_com_variant_from_zval_ex()
150 V_VT(v) = VT_ERROR; in php_com_variant_from_zval_ex()
151 V_ERROR(v) = Z_LVAL_P(z); in php_com_variant_from_zval_ex()
155 V_VT(v) = VT_I4; in php_com_variant_from_zval_ex()
156 V_I4(v) = Z_LVAL_P(z); in php_com_variant_from_zval_ex()
158 V_VT(v) = VT_I8; in php_com_variant_from_zval_ex()
159 V_I8(v) = Z_LVAL_P(z); in php_com_variant_from_zval_ex()
164 V_VT(v) = VT_R8; in php_com_variant_from_zval_ex()
165 V_R8(v) = Z_DVAL_P(z); in php_com_variant_from_zval_ex()
169 V_VT(v) = VT_BSTR; in php_com_variant_from_zval_ex()
170 V_BSTR(v) = php_com_string_to_bstr(Z_STR_P(z), codepage); in php_com_variant_from_zval_ex()
176 V_VT(v) = VT_NULL; in php_com_variant_from_zval_ex()
181 PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage) in php_com_variant_from_zval() argument
183 php_com_variant_from_zval_ex(v, z, codepage, VT_EMPTY); in php_com_variant_from_zval()
186 PHP_COM_DOTNET_API zend_result php_com_zval_from_variant(zval *z, VARIANT *v, int codepage) in php_com_zval_from_variant() argument
191 switch (V_VT(v)) { in php_com_zval_from_variant()
198 ZVAL_LONG(z, (zend_long)V_UI1(v)); in php_com_zval_from_variant()
201 ZVAL_LONG(z, (zend_long)V_I1(v)); in php_com_zval_from_variant()
204 ZVAL_LONG(z, (zend_long)V_UI2(v)); in php_com_zval_from_variant()
207 ZVAL_LONG(z, (zend_long)V_I2(v)); in php_com_zval_from_variant()
210 ZVAL_LONG(z, (long)V_UI4(v)); in php_com_zval_from_variant()
213 ZVAL_LONG(z, (long)V_I4(v)); in php_com_zval_from_variant()
217 ZVAL_LONG(z, (zend_long)V_UI8(v)); in php_com_zval_from_variant()
220 ZVAL_LONG(z, (zend_long)V_I8(v)); in php_com_zval_from_variant()
224 ZVAL_LONG(z, V_INT(v)); in php_com_zval_from_variant()
227 ZVAL_LONG(z, (zend_long)V_UINT(v)); in php_com_zval_from_variant()
230 ZVAL_DOUBLE(z, (double)V_R4(v)); in php_com_zval_from_variant()
233 ZVAL_DOUBLE(z, V_R8(v)); in php_com_zval_from_variant()
236 ZVAL_BOOL(z, V_BOOL(v) ? 1 : 0); in php_com_zval_from_variant()
239 olestring = V_BSTR(v); in php_com_zval_from_variant()
247 if (V_UNKNOWN(v) != NULL) { in php_com_zval_from_variant()
250 if (SUCCEEDED(IUnknown_QueryInterface(V_UNKNOWN(v), &IID_IDispatch, &disp))) { in php_com_zval_from_variant()
260 if (V_DISPATCH(v) != NULL) { in php_com_zval_from_variant()
261 php_com_wrap_dispatch(z, V_DISPATCH(v), codepage); in php_com_zval_from_variant()
267 return php_com_zval_from_variant(z, V_VARIANTREF(v), codepage); in php_com_zval_from_variant()
270 php_com_wrap_variant(z, v, codepage); in php_com_zval_from_variant()
278 php_error_docref(NULL, E_WARNING, "variant->zval: conversion from 0x%x ret=%d", V_VT(v), ret); in php_com_zval_from_variant()
462 php_com_variant_from_zval_ex(&obj->v, zvalue, obj->code_page, vt); in PHP_METHOD()
466 if ((ZEND_NUM_ARGS() >= 2) && (vt != V_VT(&obj->v))) { in PHP_METHOD()
473 if ((vt & VT_ARRAY) && (V_VT(&obj->v) & VT_ARRAY)) { in PHP_METHOD()
483 res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt); in PHP_METHOD()
498 if (V_VT(&obj->v) != VT_DISPATCH && obj->typeinfo) { in PHP_METHOD()
529 VariantClear(&obj->v); in PHP_FUNCTION()
531 php_com_variant_from_zval(&obj->v, zvalue, obj->code_page); in PHP_FUNCTION()
565 vleft = &obj->v; in variant_binary_operation()
567 vright = &obj->v; in variant_binary_operation()
572 vleft = &obj->v; in variant_binary_operation()
578 vright = &obj->v; in variant_binary_operation()
758 vleft = &obj->v; in variant_unary_operation()
850 vleft = &obj->v; in PHP_FUNCTION()
888 vleft = &obj->v; in PHP_FUNCTION()
890 vright = &obj->v; in PHP_FUNCTION()
895 vleft = &obj->v; in PHP_FUNCTION()
902 vright = &obj->v; in PHP_FUNCTION()
940 if (SUCCEEDED(VariantChangeType(&vres, &obj->v, 0, VT_DATE))) { in PHP_FUNCTION()
1023 RETURN_LONG(V_VT(&obj->v)); in PHP_FUNCTION()
1042 if (V_VT(&obj->v) == VT_ERROR) { in PHP_FUNCTION()
1045 V_I4(&vtmp) = V_ERROR(&obj->v); in PHP_FUNCTION()
1047 res = VariantChangeType(&obj->v, V_VT(&obj->v) != VT_ERROR ? &obj->v : &vtmp, 0, (VARTYPE)vt); in PHP_FUNCTION()
1083 if (V_VT(&obj->v) == VT_ERROR) { in PHP_FUNCTION()
1085 V_I4(&vres) = V_ERROR(&obj->v); in PHP_FUNCTION()
1087 res = VariantChangeType(&vres, V_VT(&vres) == VT_EMPTY ? &obj->v : &vres, 0, (VARTYPE)vt); in PHP_FUNCTION()