Zebediah Figura (@zfigura) commented about dlls/kernelbase/path.c:
> + * First check for known, valid and typo free scheme
> + */
> + for (pos=1; pos<ARRAY_SIZE(url_scheme); pos++)
> + {
> + len = wcslen(url_scheme[pos]);
> + if ( (len <= wcslen(url)) && (!_wcsnicmp(url, url_scheme[pos], len)) )
> + {
> + /*
> + * check if string fits into maxChars
> + */
> + if (len+1 >= maxChars)
> + return S_FALSE;
> +
> + lstrcpynW(save_str, url_scheme[pos], len+1);
> + url += len;
> + goto scheme_done;
Can we use a helper function to fix up the scheme instead of using a goto? This will probably also help make the function easier to follow, by virtue of being less monolithic.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_19809
Zebediah Figura (@zfigura) commented about dlls/kernelbase/path.c:
> */
> HRESULT WINAPI UrlFixupW(PCWSTR url, PWSTR translatedUrl, DWORD maxChars)
> {
> - DWORD srcLen;
> + DWORD srcLen, dstLen, len;
> + DWORD colon_pos = 0, pos = 0;
> + wchar_t *helper_str = NULL;
> + PWSTR save_str = translatedUrl;
We use WCHAR, not wchar_t.
It'd also be nice to use a consistent style for all of variable names in this function (wrt snake case vs camel case). In new code I think we prefer snake case.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_19808
Zebediah Figura (@zfigura) commented about dlls/kernelbase/path.c:
>
> -HRESULT WINAPI UrlFixupW(const WCHAR *url, WCHAR *translatedUrl, DWORD maxChars)
> +/*
> + * from Documentation:
> + * https://docs.microsoft.com/en-us/windows/desktop/api/shlwapi/nf-shlwapi-url…
> + *
> + * UrlFixupW attempts to correct a URL whose protocol identifier is incorrect.
> + * For example, htttp will be changed to http.
> + *
> + * LWSTDAPI UrlFixupW(
> + * [in] PCWSTR pcszUrl,
> + * [out] PWSTR pszTranslatedUrl,
> + * DWORD cchMax
> + * );
> +*/
> +HRESULT WINAPI UrlFixupW(PCWSTR url, PWSTR translatedUrl, DWORD maxChars)
Without trying to get bogged down in style, this change is somewhat counterproductive; we tend to avoid P* typedefs in new code, and we also have been abandoning the use of "documentation" style headers, which rarely convey any useful information.
(This also doesn't really belong in a commit which should only affect tests.)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_19805
On Sun Dec 18 23:01:30 2022 +0000, Zebediah Figura wrote:
> Hi Thomas, thanks for the patch!
> We want the tests to "pass" after every commit, i.e. have no failures.
> That may mean, in this case, introducing the tests marked as todo, and
> then later removing those todos.
Ok. Got it. Will do it soon
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_19804
Hi Thomas, thanks for the patch!
We want the tests to "pass" after every commit, i.e. have no failures. That may mean, in this case, introducing the tests marked as todo, and then later removing those todos.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_19803
Setting the return type of various wined3d refcounting functions to void
These patches modify:
- wined3d_incref
- wined3d_decref
- wined3d_resource_incref
- wined3d_resource_decref
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1755