On 1/8/2014 19:03, Dmitry Timoshkov wrote:
Nikolay Sivov nsivov@codeweavers.com wrote:
+/* features listed here are not propagated to newly created array or data copy
- created with SafeArrayCopy()/SafeArrayCopyData() */
+static const USHORT ignored_copy_features =
FADF_AUTO |
FADF_STATIC |
FADF_EMBEDDED |
FADF_FIXEDSIZE |
FADF_CREATEVECTOR |
FADF_DATADELETED;
...
(*ppsaOut)->fFeatures = psa->fFeatures & ~FADF_CREATEVECTOR;
(*ppsaOut)->fFeatures = psa->fFeatures & ~(FADF_CREATEVECTOR|ignored_copy_features);
ignored_copy_features already includes FADF_CREATEVECTOR.
Yes, that's redundant.
--- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -57,6 +57,14 @@ static BOOL has_i8; /* Has INT_PTR/UINT_PTR type? */ static BOOL has_int_ptr;
+static const USHORT ignored_copy_features[] =
- {
FADF_AUTO,
FADF_STATIC,
FADF_EMBEDDED,
FADF_FIXEDSIZE
- };
Tested and actually ignored flags do not match. Either the test is not complete or the ignored list includes too much.
Array marked with FADF_DATADELETED should never get to this code, it's a matter of adding more tests that are not closely related to this one. FADF_CREATEVECTOR is different, I don't believe it's possible to simply toggle this bit. The reason it's included to ignore is that it's already done in existing code.