RFR: 8326716: JVMTI spec: clarify what nullptr means for C/C++ developers
Alan Bateman
alanb at openjdk.org
Thu May 16 08:01:05 UTC 2024
On Thu, 16 May 2024 02:37:40 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
> The following RFE was fixed recently:
> [8324680](https://bugs.openjdk.org/browse/JDK-8324680): Replace NULL with nullptr in JVMTI generated code
>
> It replaced all the `NULL`'s in the generated spec with`nullptr`. JVMTI agents can be developed in C or C++.
> This update is to make it clear that `nullptr` is C programming language `null` pointer.
>
> I think we do not need a CSR for this fix.
>
> Testing: N/A (not needed)
src/hotspot/share/prims/jvmti.xml line 1008:
> 1006: function descriptions. Empty lists, arrays, sequences, etc are
> 1007: returned as <code>nullptr</code> which is C programming language
> 1008: <code>null</code> pointer.
Shouldn't this be "NULL"? In any case, I think it would be helpful to expand this a bit to make it clear that usages of "nullptr" in parameter and error descriptions should be read or treated as "NULL" when developing an agent in C rather than C++.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19257#discussion_r1602803174
More information about the hotspot-dev
mailing list