<i18n dev> RFR: 8370420: HostLocaleProviderAdapter_md.c from libjava can use GetLocaleInfoEx, GetCalendarInfoEx, EnumCalendarInfoExEx directly
Matthias Baesken
mbaesken at openjdk.org
Tue Nov 4 08:17:21 UTC 2025
On Tue, 4 Nov 2025 00:46:37 GMT, Naoto Sato <naoto at openjdk.org> wrote:
> I think we can clean it further, as we don't need to call Win32 through their function pointers. Specifically,
>
> ```
> typedef int (WINAPI *PGLIE)(const jchar *, LCTYPE, LPWSTR, int);
> typedef int (WINAPI *PGCIE)(const jchar *, CALID, LPCWSTR, CALTYPE, LPWSTR, int, LPDWORD);
> typedef int (WINAPI *PECIEE)(CALINFO_ENUMPROCEXEX, const jchar *, CALID, LPCWSTR, CALTYPE, LPARAM);
> PGLIE pGetLocaleInfoEx;
> PGCIE pGetCalendarInfoEx;
> PECIEE pEnumCalendarInfoExEx;
> BOOL initialized = FALSE;
> ```
>
> and it's init code can all go away, IIUC
Yes the GetProcAddress stuff should be removed too, see
https://github.com/openjdk/jdk/blob/c1476fca9d7a679d32b7b43956638b845d1027cc/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c#L189
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28119#issuecomment-3484469810
More information about the i18n-dev
mailing list