7 May
2025
7 May
'25
10:50 a.m.
Jacek Caban (@jacek) commented about server/user.c:
- if (!entry) return 0; - entry->ptr = ptr; - entry->type = type; - if (++entry->generation >= 0xffff) entry->generation = 1; + user_entry_t *entry; + + if (!(entry = alloc_user_entry( type ))) return 0; + set_server_object( entry, ptr ); return entry_to_handle( entry ); }
/* return a pointer to a user object from its handle */ void *get_user_object( user_handle_t handle, unsigned short type ) { - struct user_handle *entry; + user_entry_t *entry; You could still keep const here and in similar places.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7610#note_102740