Lines Matching refs:v
35 static void safe_array_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC) in safe_array_from_zval() argument
85 V_VT(v) = VT_ARRAY|VT_VARIANT; in safe_array_from_zval()
86 V_ARRAY(v) = sa; in safe_array_from_zval()
93 V_VT(v) = VT_NULL; in safe_array_from_zval()
101 PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC) in php_com_variant_from_zval() argument
109 V_VT(v) = VT_NULL; in php_com_variant_from_zval()
113 V_VT(v) = VT_BOOL; in php_com_variant_from_zval()
114 V_BOOL(v) = Z_BVAL_P(z) ? VARIANT_TRUE : VARIANT_FALSE; in php_com_variant_from_zval()
120 if (V_VT(&obj->v) == VT_DISPATCH) { in php_com_variant_from_zval()
122 V_VT(v) = VT_DISPATCH; in php_com_variant_from_zval()
123 if (V_DISPATCH(&obj->v)) { in php_com_variant_from_zval()
124 IDispatch_AddRef(V_DISPATCH(&obj->v)); in php_com_variant_from_zval()
126 V_DISPATCH(v) = V_DISPATCH(&obj->v); in php_com_variant_from_zval()
129 V_VT(v) = VT_VARIANT | VT_BYREF; in php_com_variant_from_zval()
130 V_VARIANTREF(v) = &obj->v; in php_com_variant_from_zval()
134 V_VT(v) = VT_DISPATCH; in php_com_variant_from_zval()
135 V_DISPATCH(v) = php_com_wrapper_export(z TSRMLS_CC); in php_com_variant_from_zval()
141 safe_array_from_zval(v, z, codepage TSRMLS_CC); in php_com_variant_from_zval()
145 V_VT(v) = VT_I4; in php_com_variant_from_zval()
146 V_I4(v) = Z_LVAL_P(z); in php_com_variant_from_zval()
150 V_VT(v) = VT_R8; in php_com_variant_from_zval()
151 V_R8(v) = Z_DVAL_P(z); in php_com_variant_from_zval()
155 V_VT(v) = VT_BSTR; in php_com_variant_from_zval()
158 V_BSTR(v) = SysAllocStringByteLen((char*)olestring, wcslen(olestring) * sizeof(OLECHAR)); in php_com_variant_from_zval()
160 V_BSTR(v) = SysAllocStringByteLen((char*)olestring, Z_STRLEN_P(z) * sizeof(OLECHAR)); in php_com_variant_from_zval()
169 V_VT(v) = VT_NULL; in php_com_variant_from_zval()
174 PHP_COM_DOTNET_API int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC) in php_com_zval_from_variant() argument
179 switch (V_VT(v)) { in php_com_zval_from_variant()
186 ZVAL_LONG(z, (long)V_UI1(v)); in php_com_zval_from_variant()
189 ZVAL_LONG(z, (long)V_I1(v)); in php_com_zval_from_variant()
192 ZVAL_LONG(z, (long)V_UI2(v)); in php_com_zval_from_variant()
195 ZVAL_LONG(z, (long)V_I2(v)); in php_com_zval_from_variant()
198 ZVAL_LONG(z, (long)V_UI4(v)); in php_com_zval_from_variant()
201 ZVAL_LONG(z, (long)V_I4(v)); in php_com_zval_from_variant()
204 ZVAL_LONG(z, V_INT(v)); in php_com_zval_from_variant()
207 ZVAL_LONG(z, (long)V_UINT(v)); in php_com_zval_from_variant()
210 ZVAL_DOUBLE(z, (double)V_R4(v)); in php_com_zval_from_variant()
213 ZVAL_DOUBLE(z, V_R8(v)); in php_com_zval_from_variant()
216 ZVAL_BOOL(z, V_BOOL(v) ? 1 : 0); in php_com_zval_from_variant()
219 olestring = V_BSTR(v); in php_com_zval_from_variant()
228 if (V_UNKNOWN(v) != NULL) { in php_com_zval_from_variant()
231 if (SUCCEEDED(IUnknown_QueryInterface(V_UNKNOWN(v), &IID_IDispatch, &disp))) { in php_com_zval_from_variant()
241 if (V_DISPATCH(v) != NULL) { in php_com_zval_from_variant()
242 php_com_wrap_dispatch(z, V_DISPATCH(v), codepage TSRMLS_CC); in php_com_zval_from_variant()
248 return php_com_zval_from_variant(z, V_VARIANTREF(v), codepage TSRMLS_CC); in php_com_zval_from_variant()
251 php_com_wrap_variant(z, v, codepage TSRMLS_CC); in php_com_zval_from_variant()
259 …php_error_docref(NULL TSRMLS_CC, E_WARNING, "variant->zval: conversion from 0x%x ret=%d", V_VT(v),… in php_com_zval_from_variant()
428 php_com_variant_from_zval(&obj->v, zvalue, obj->code_page TSRMLS_CC); in PHP_FUNCTION()
432 if ((ZEND_NUM_ARGS() >= 2) && (vt != V_VT(&obj->v))) { in PHP_FUNCTION()
439 if ((vt & VT_ARRAY) && (V_VT(&obj->v) & VT_ARRAY)) { in PHP_FUNCTION()
449 res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt); in PHP_FUNCTION()
464 if (V_VT(&obj->v) != VT_DISPATCH && obj->typeinfo) { in PHP_FUNCTION()
496 VariantClear(&obj->v); in PHP_FUNCTION()
498 php_com_variant_from_zval(&obj->v, zvalue, obj->code_page TSRMLS_CC); in PHP_FUNCTION()
532 vleft = &obj->v; in variant_binary_operation()
534 vright = &obj->v; in variant_binary_operation()
539 vleft = &obj->v; in variant_binary_operation()
545 vright = &obj->v; in variant_binary_operation()
738 vleft = &obj->v; in variant_unary_operation()
836 vleft = &obj->v; in PHP_FUNCTION()
875 vleft = &obj->v; in PHP_FUNCTION()
877 vright = &obj->v; in PHP_FUNCTION()
882 vleft = &obj->v; in PHP_FUNCTION()
889 vright = &obj->v; in PHP_FUNCTION()
928 if (SUCCEEDED(VariantChangeType(&vres, &obj->v, 0, VT_DATE))) { in PHP_FUNCTION()
1006 RETURN_LONG(V_VT(&obj->v)); in PHP_FUNCTION()
1025 res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt); in PHP_FUNCTION()
1062 res = VariantChangeType(&vres, &obj->v, 0, (VARTYPE)vt); in PHP_FUNCTION()