On Thu, 22 Jun 2023 03:00:16 GMT, Julian Waters <jwat...@openjdk.org> wrote:

>> On Windows, the basic Java Integer types are defined as long and __int64 
>> respectively. In particular, the former is rather problematic since it 
>> breaks compilation as the Visual C++ becomes stricter and more compliant 
>> with every release, which means the way Windows code treats long as a 
>> typedef for int is no longer correct, especially with -permissive- enabled. 
>> Instead of changing every piece of broken code to match the jint = long 
>> typedef, which is far too time consuming, we can instead change jint to an 
>> int (which is still the same 32 bit number type as long), as there are far 
>> fewer problems caused by this definition. It's better to get this over and 
>> done with sooner than later when a future version of Visual C++ finally 
>> starts to break on existing code
>
> Julian Waters has refreshed the contents of this pull request, and previous 
> commits have been removed. The incremental views will show differences 
> compared to the previous content of the PR. The pull request contains one new 
> commit since the last revision:
> 
>   Revert NULL to nullptr changes in jaccesswalker

src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp line 547:

> 545:         snprintf( s, sizeof(s),
> 546:             "ERROR calling GetAccessibleContextInfo; vmID = %lX, context 
> = %p",
> 547:             reinterpret_cast<unsigned long>(vmID), (void*)context );

do you need this cast? I checked a few compilers and passing a signed long to 
"%lX" was fine with them.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14125#discussion_r1238338713

Reply via email to