Re: RFR: 8308780: Fix the Java Integer types on Windows [v11]

2023-06-22 Thread Julian Waters
> 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 t

Re: RFR: 8308780: Fix the Java Integer types on Windows [v11]

2023-06-22 Thread Daniel Jeliński
On Fri, 23 Jun 2023 02:38:13 GMT, Julian Waters 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

Re: RFR: 8308780: Fix the Java Integer types on Windows [v11]

2023-06-23 Thread Alexey Ivanov
On Fri, 23 Jun 2023 06:10:05 GMT, Daniel Jeliński wrote: >> Julian Waters has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Revert wrong Copyright >> - Copyright > > src/java.desktop/windows/native/libawt/windows/awt_Menu.h line 76: >

Re: RFR: 8308780: Fix the Java Integer types on Windows [v11]

2023-06-23 Thread Alexey Ivanov
On Fri, 23 Jun 2023 14:24:44 GMT, Alexey Ivanov wrote: >> src/java.desktop/windows/native/libawt/windows/awt_Menu.h line 76: >> >>> 74: /*for multifont menu */ >>> 75: BOOL IsTopMenu(); >>> 76: virtual AwtMenuItem* GetItem(jobject target, int index); >> >> Hi @aivanov-jdk are you OK

Re: RFR: 8308780: Fix the Java Integer types on Windows [v11]

2023-06-23 Thread Julian Waters
On Fri, 23 Jun 2023 14:28:51 GMT, Alexey Ivanov wrote: >> The declaration and implementation have to match. > > To minimise the number of changes, we can go for using `jint` in > `AwtMenu::GetItem`. > > What do you thing, @djelinski and @TheShermanTanker? Hmm, I lean towards jint as I feel it

Re: RFR: 8308780: Fix the Java Integer types on Windows [v11]

2023-06-23 Thread Alexey Ivanov
On Fri, 23 Jun 2023 14:30:49 GMT, Julian Waters wrote: >> To minimise the number of changes, we can go for using `jint` in >> `AwtMenu::GetItem`. >> >> What do you thing, @djelinski and @TheShermanTanker? > > Hmm, I lean towards jint as I feel it conveys the fact that it is a Java > parameter

Re: RFR: 8308780: Fix the Java Integer types on Windows [v11]

2023-06-23 Thread Julian Waters
On Fri, 23 Jun 2023 16:53:01 GMT, Alexey Ivanov wrote: >> Hmm, I lean towards jint as I feel it conveys the fact that it is a Java >> parameter clearer, intuitively to me it makes sense that a Java integer type >> would still work in a C++ for loop in native code > > You're right… it gives a hi

Re: RFR: 8308780: Fix the Java Integer types on Windows [v11]

2023-06-23 Thread Julian Waters
On Fri, 23 Jun 2023 02:38:13 GMT, Julian Waters 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