Commit e47b813f authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

oleaut32: Define missing but useful VTBIT_* macros.

parent d9d9d7e8
......@@ -1983,7 +1983,7 @@ VARIANT_FormatString_Exit:
#define NUMBER_VTBITS (VTBIT_I1|VTBIT_UI1|VTBIT_I2|VTBIT_UI2| \
VTBIT_I4|VTBIT_UI4|VTBIT_I8|VTBIT_UI8| \
VTBIT_R4|VTBIT_R8|VTBIT_CY|VTBIT_DECIMAL| \
(1<<VT_BOOL)|(1<<VT_INT)|(1<<VT_UINT))
VTBIT_BOOL|VTBIT_INT|VTBIT_UINT)
/**********************************************************************
* VarFormatFromTokens [OLEAUT32.139]
......
......@@ -3184,7 +3184,7 @@ HRESULT WINAPI VarDiv(LPVARIANT left, LPVARIANT right, LPVARIANT result)
found = TRUE;
resvt = VT_DECIMAL;
}
if (!found && (((1<<lvt) | (1<<rvt)) & (VTBIT_I1|VTBIT_I2|VTBIT_UI1|VTBIT_UI2|VTBIT_I4|VTBIT_UI4|(1<<VT_INT)|(1<<VT_UINT)))) {
if (!found && (((1<<lvt) | (1<<rvt)) & (VTBIT_I1|VTBIT_I2|VTBIT_UI1|VTBIT_UI2|VTBIT_I4|VTBIT_UI4|VTBIT_INT|VTBIT_UINT))) {
found = TRUE;
resvt = VT_I4;
}
......@@ -3253,7 +3253,7 @@ HRESULT WINAPI VarSub(LPVARIANT left, LPVARIANT right, LPVARIANT result)
lvt = V_VT(left)&VT_TYPEMASK;
rvt = V_VT(right)&VT_TYPEMASK;
found = FALSE;resvt = VT_VOID;
if (((1<<lvt) | (1<<rvt)) & ((1<<VT_DATE)|(1<<VT_R4)|(1<<VT_R8))) {
if (((1<<lvt) | (1<<rvt)) & (VTBIT_DATE|VTBIT_R4|VTBIT_R8)) {
found = TRUE;
resvt = VT_R8;
}
......@@ -3261,7 +3261,7 @@ HRESULT WINAPI VarSub(LPVARIANT left, LPVARIANT right, LPVARIANT result)
found = TRUE;
resvt = VT_DECIMAL;
}
if (!found && (((1<<lvt) | (1<<rvt)) & (VTBIT_I1|VTBIT_I2|VTBIT_UI1|VTBIT_UI2|VTBIT_I4|VTBIT_UI4|(1<<VT_INT)|(1<<VT_UINT)))) {
if (!found && (((1<<lvt) | (1<<rvt)) & (VTBIT_I1|VTBIT_I2|VTBIT_UI1|VTBIT_UI2|VTBIT_I4|VTBIT_UI4|VTBIT_INT|VTBIT_UINT))) {
found = TRUE;
resvt = VT_I4;
}
......
......@@ -34,6 +34,20 @@
/* Get the extra flags from a variant pointer */
#define V_EXTRA_TYPE(v) (V_VT((v)) & VT_EXTRA_TYPE)
/* Missing in Windows but usefull VTBIT_* defines */
#define VTBIT_BOOL (1 << VT_BSTR)
#define VTBIT_BSTR (1 << VT_BSTR)
#define VTBIT_DATE (1 << VT_DATE)
#define VTBIT_DISPATCH (1 << VT_DISPATCH)
#define VTBIT_EMPTY (1 << VT_EMPTY)
#define VTBIT_ERROR (1 << VT_ERROR)
#define VTBIT_INT (1 << VT_INT)
#define VTBIT_NULL (1 << VT_NULL)
#define VTBIT_UINT (1 << VT_UINT)
#define VTBIT_UNKNOWN (1 << VT_UNKNOWN)
#define VTBIT_VARIANT (1 << VT_VARIANT)
#define VTBIT_15 (1 << 15) /* no variant type with this number */
extern const char* wine_vtypes[];
#define debugstr_vt(v) (((v)&VT_TYPEMASK) <= VT_CLSID ? wine_vtypes[((v)&VT_TYPEMASK)] : \
((v)&VT_TYPEMASK) == VT_BSTR_BLOB ? "VT_BSTR_BLOB": "Invalid")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment