> The comment is added in a later change, when it really matters. For now the entries aren't cached.
But now it doesn't make sense why it's arranged like this. If you really want to defer things like that, you should get rid of the double-pointer return. Obviously I didn't do that because it would have required a lot of refactoring once I did start caching objects, although sometimes that kind of refactoring is preferable, but if you are similarly going to avoid it, you should explain why there's two parameters.
> Fwiw I kept a "cache" name for the stack variable but it should probably not even be named like that, it's not a cache. I don't think it matters much anyway, the code isn't so complicated.
I can see why you see it as not a cache, although I think it also kind of is: the canonical information lives in the server, the client side can be dropped and reacquired, and the code is intended to work even if we don't have memory to store that information.
But either way, we shouldn't name the single-pointer parameter just "cache". That's not its point compared to the double-pointer parameter; the point is to be a stack or fallback pointer to hold that information.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8445#note_108294
On Fri Jun 27 20:34:29 2025 +0000, Vibhav Pant wrote:
> changed this line in [version 4 of the diff](/wine/wine/-/merge_requests/8438/diffs?diff_id=189335&start_sha=047cdc41c97e2a1e39d221cc83e8b18b318c28c7#8faf7bbc071e59c73bc84fc33e245b5dfd7e0eba_120_120)
Fixed, thanks.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8438#note_108283
On Mon Jun 30 13:17:20 2025 +0000, Rémi Bernon wrote:
> Fwiw in general output parameters aren't checked in the error cases,
> because it shouldn't matter what happens to them. For cases where it
> *does* matter (like whether they should be zeroed), the params are set
> before calling to some arbitrary and different value (0xdeadbeef) from
> the expected.
> In particular, at this point these tests succeed already because the
> stub doesn't change the parameter values. Same thing below.
> ```suggestion:-3+0
> hr = DevGetObjects( DevObjectTypeDeviceInterface, DevQueryFlagNone,
> 1, NULL, 0, NULL, &len, &objects );
> todo_wine ok( hr == HRESULT_FROM_WIN32( ERROR_INVALID_PARAMETER ),
> "got hr %#lx\n", hr );
> ```
Gotcha, removed the unnecessary checks in the latest revision, thanks.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8438#note_108281
On Fri Jun 27 20:34:30 2025 +0000, Vibhav Pant wrote:
> changed this line in [version 4 of the diff](/wine/wine/-/merge_requests/8438/diffs?diff_id=189335&start_sha=047cdc41c97e2a1e39d221cc83e8b18b318c28c7#2c4a05158dcf4c9a716dbcdc3463badaebf121b3_28_28)
Ah, missed this. Thanks.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8438#note_108279
On Fri Jun 27 20:34:30 2025 +0000, Vibhav Pant wrote:
> changed this line in [version 4 of the diff](/wine/wine/-/merge_requests/8438/diffs?diff_id=189335&start_sha=047cdc41c97e2a1e39d221cc83e8b18b318c28c7#ffd51de087e78a6f8a5f2f1d1131c2f4d41ba745_36_35)
Yup, that's easier to read. Fixed, thanks.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8438#note_108278