Rémi Bernon (@rbernon) commented about dlls/windows.media.speech/vosk.c:
+ libvosk_handle = NULL; + return STATUS_ENTRYPOINT_NOT_FOUND; #else /* SONAME_LIBVOSK */ return STATUS_NOT_SUPPORTED; #endif /* SONAME_LIBVOSK */ }
+static inline vosk_instance to_vosk_instance( VoskRecognizer *ptr ) +{ + return (vosk_instance)(UINT_PTR)ptr; +} + +static inline VoskRecognizer *from_vosk_instance( vosk_instance instance ) +{ + return (VoskRecognizer *)(UINT_PTR)instance; +} I think usually we name these helpers with the type being converted too, though i don't really mind.
As a suggestion, if you're only going to have a single unixlib handle type, and because we generally use the `handle` term elsewhere, maybe you could name `vosk_instance` to `vosk_handle` and name these `vosk_recognizer_(from|to)_handle`? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2091#note_22799