Lines Matching refs:v
35 static void safe_array_from_zval(VARIANT *v, zval *z, int codepage) in safe_array_from_zval() argument
83 V_VT(v) = VT_ARRAY|VT_VARIANT; in safe_array_from_zval()
84 V_ARRAY(v) = sa; in safe_array_from_zval()
91 V_VT(v) = VT_NULL; in safe_array_from_zval()
99 PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage) in php_com_variant_from_zval() argument
112 V_VT(v) = VT_NULL; in php_com_variant_from_zval()
116 V_VT(v) = VT_BOOL; in php_com_variant_from_zval()
117 V_BOOL(v) = VARIANT_FALSE; in php_com_variant_from_zval()
121 V_VT(v) = VT_BOOL; in php_com_variant_from_zval()
122 V_BOOL(v) = VARIANT_TRUE; in php_com_variant_from_zval()
128 if (V_VT(&obj->v) == VT_DISPATCH) { in php_com_variant_from_zval()
130 V_VT(v) = VT_DISPATCH; in php_com_variant_from_zval()
131 if (V_DISPATCH(&obj->v)) { in php_com_variant_from_zval()
132 IDispatch_AddRef(V_DISPATCH(&obj->v)); in php_com_variant_from_zval()
134 V_DISPATCH(v) = V_DISPATCH(&obj->v); in php_com_variant_from_zval()
137 V_VT(v) = VT_VARIANT | VT_BYREF; in php_com_variant_from_zval()
138 V_VARIANTREF(v) = &obj->v; in php_com_variant_from_zval()
142 V_VT(v) = VT_DISPATCH; in php_com_variant_from_zval()
143 V_DISPATCH(v) = php_com_wrapper_export(z); in php_com_variant_from_zval()
149 safe_array_from_zval(v, z, codepage); in php_com_variant_from_zval()
154 V_VT(v) = VT_I4; in php_com_variant_from_zval()
155 V_I4(v) = Z_LVAL_P(z); in php_com_variant_from_zval()
157 V_VT(v) = VT_I8; in php_com_variant_from_zval()
158 V_I8(v) = Z_LVAL_P(z); in php_com_variant_from_zval()
163 V_VT(v) = VT_R8; in php_com_variant_from_zval()
164 V_R8(v) = Z_DVAL_P(z); in php_com_variant_from_zval()
168 V_VT(v) = VT_BSTR; in php_com_variant_from_zval()
171 … V_BSTR(v) = SysAllocStringByteLen((char*)olestring, (UINT)(wcslen(olestring) * sizeof(OLECHAR))); in php_com_variant_from_zval()
173 V_BSTR(v) = SysAllocStringByteLen((char*)olestring, (UINT)(Z_STRLEN_P(z) * sizeof(OLECHAR))); in php_com_variant_from_zval()
182 V_VT(v) = VT_NULL; in php_com_variant_from_zval()
187 PHP_COM_DOTNET_API int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage) in php_com_zval_from_variant() argument
192 switch (V_VT(v)) { in php_com_zval_from_variant()
199 ZVAL_LONG(z, (zend_long)V_UI1(v)); in php_com_zval_from_variant()
202 ZVAL_LONG(z, (zend_long)V_I1(v)); in php_com_zval_from_variant()
205 ZVAL_LONG(z, (zend_long)V_UI2(v)); in php_com_zval_from_variant()
208 ZVAL_LONG(z, (zend_long)V_I2(v)); in php_com_zval_from_variant()
211 ZVAL_LONG(z, (long)V_UI4(v)); in php_com_zval_from_variant()
214 ZVAL_LONG(z, (long)V_I4(v)); in php_com_zval_from_variant()
218 ZVAL_LONG(z, (zend_long)V_UI8(v)); in php_com_zval_from_variant()
221 ZVAL_LONG(z, (zend_long)V_I8(v)); in php_com_zval_from_variant()
225 ZVAL_LONG(z, V_INT(v)); in php_com_zval_from_variant()
228 ZVAL_LONG(z, (zend_long)V_UINT(v)); in php_com_zval_from_variant()
231 ZVAL_DOUBLE(z, (double)V_R4(v)); in php_com_zval_from_variant()
234 ZVAL_DOUBLE(z, V_R8(v)); in php_com_zval_from_variant()
237 ZVAL_BOOL(z, V_BOOL(v) ? 1 : 0); in php_com_zval_from_variant()
240 olestring = V_BSTR(v); in php_com_zval_from_variant()
252 if (V_UNKNOWN(v) != NULL) { in php_com_zval_from_variant()
255 if (SUCCEEDED(IUnknown_QueryInterface(V_UNKNOWN(v), &IID_IDispatch, &disp))) { in php_com_zval_from_variant()
265 if (V_DISPATCH(v) != NULL) { in php_com_zval_from_variant()
266 php_com_wrap_dispatch(z, V_DISPATCH(v), codepage); in php_com_zval_from_variant()
272 return php_com_zval_from_variant(z, V_VARIANTREF(v), codepage); in php_com_zval_from_variant()
275 php_com_wrap_variant(z, v, codepage); in php_com_zval_from_variant()
283 php_error_docref(NULL, E_WARNING, "variant->zval: conversion from 0x%x ret=%d", V_VT(v), ret); in php_com_zval_from_variant()
468 php_com_variant_from_zval(&obj->v, zvalue, obj->code_page); in PHP_FUNCTION()
472 if ((ZEND_NUM_ARGS() >= 2) && (vt != V_VT(&obj->v))) { in PHP_FUNCTION()
479 if ((vt & VT_ARRAY) && (V_VT(&obj->v) & VT_ARRAY)) { in PHP_FUNCTION()
489 res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt); in PHP_FUNCTION()
504 if (V_VT(&obj->v) != VT_DISPATCH && obj->typeinfo) { in PHP_FUNCTION()
536 VariantClear(&obj->v); in PHP_FUNCTION()
538 php_com_variant_from_zval(&obj->v, zvalue, obj->code_page); in PHP_FUNCTION()
572 vleft = &obj->v; in variant_binary_operation()
574 vright = &obj->v; in variant_binary_operation()
579 vleft = &obj->v; in variant_binary_operation()
585 vright = &obj->v; in variant_binary_operation()
778 vleft = &obj->v; in variant_unary_operation()
876 vleft = &obj->v; in PHP_FUNCTION()
915 vleft = &obj->v; in PHP_FUNCTION()
917 vright = &obj->v; in PHP_FUNCTION()
922 vleft = &obj->v; in PHP_FUNCTION()
929 vright = &obj->v; in PHP_FUNCTION()
968 if (SUCCEEDED(VariantChangeType(&vres, &obj->v, 0, VT_DATE))) { in PHP_FUNCTION()
1053 RETURN_LONG(V_VT(&obj->v)); in PHP_FUNCTION()
1072 res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt); in PHP_FUNCTION()
1109 res = VariantChangeType(&vres, &obj->v, 0, (VARTYPE)vt); in PHP_FUNCTION()