[PATCH v2 08/10] combase: Implement creation and deletion of HSTRING objects.

Martin Storsjö martin at martin.st
Mon Dec 8 13:08:25 CST 2014


On Mon, 8 Dec 2014, Sebastian Lackner wrote:

> On 08.12.2014 10:26, Martin Storsjo wrote:
>> +        return E_INVALIDARG;
>> +    if (str == NULL)
>> +    {
>> +         *out = NULL;        <---
>> +         return S_OK;        <---
>> +    }
>> +    if (priv->reference)
>> +        return WindowsCreateString(priv->buffer, priv->length, out);
>
> Wrong indentation.

Thanks for catching

> Moreover I noticed a mistake in patch 10. I had the guess that 
> preallocating an empty string should also return a NULL string-buffer.
>
> +    /* Test creation of an empty buffer */
> +    ok(pWindowsPreallocateStringBuffer(0, &ptr, &buf) == S_OK, "Failed to preallocate string buffer\n");
> +    ok(buf != NULL, "Empty string buffer is a null string\n");
> +    ok(ptr != NULL, "Empty string didn't return a buffer pointer\n");
> +    ok(pWindowsDeleteStringBuffer(buf) == S_OK, "Failed to delete string buffer\n");
> +
>
> The testbot seems to confirm that:
> https://newtestbot.winehq.org/JobDetails.pl?Key=10687

Ok, I fixed this locally, including a testcase for promoting an empty (aka 
null) string buffer into an empty (and also null) string.

> ( I would suggest to wait with resending till after the daily commits, 
> everything from patch 1-7 should be fine, and it probably doesn't make 
> sense to resend the whole series several times. ;) )

Ok, will do.

// Martin



More information about the wine-devel mailing list