On Tue, 6 Dec 2022 15:20:26 GMT, Matthias Baesken wrote:
> We have a number of places in the codebase where a macro could help when we
> check an exception and afterwrads free something and return.
okay, if keeping the block in the code that contains free and return, we
probably just stay
On Fri, 9 Dec 2022 12:23:04 GMT, Matthias Baesken wrote:
> Hi Roger , the new proposed version JNU_CHECK_EXCEPTION_DO is now almost as
> lengthy as the original coding, Is it really worth it introducing a macro
> when it gets so lengthy ?
Its easier to understand the flow and cleanup being
On Tue, 6 Dec 2022 15:20:26 GMT, Matthias Baesken wrote:
> We have a number of places in the codebase where a macro could help when we
> check an exception and afterwrads free something and return.
Hi Roger , the new proposed version JNU_CHECK_EXCEPTION_DO is now almost as
lengthy as the
On Wed, 7 Dec 2022 16:27:43 GMT, Roger Riggs wrote:
>
> Good idea, though perhaps the return (and value if any) could be explicit in
> the macro invocation, instead of implicit (plus arg). A single macro would
> suffice, instead of multiples.
>
> Usage Example:
>
> ```
>
On Tue, 6 Dec 2022 15:20:26 GMT, Matthias Baesken wrote:
> We have a number of places in the codebase where a macro could help when we
> check an exception and afterwrads free something and return.
Good idea, though perhaps the return (and value if any) could be explicit in
the macro
On Tue, 6 Dec 2022 20:40:34 GMT, Roger Riggs wrote:
> The existing code more obviously handles memory deallocation.
Thomas Stuefe suggested something like this
JNU_CHECK_EXCEPTION_DO(env, action)
JNU_CHECK_EXCEPTION_DO_AND_RETURN(env, action, retval)
usage example:
On Tue, 6 Dec 2022 15:20:26 GMT, Matthias Baesken wrote:
> We have a number of places in the codebase where a macro could help when we
> check an exception and afterwrads free something and return.
The existing (and new) macro naming doesn't make clear that it always returns
from the
On Tue, 6 Dec 2022 15:20:26 GMT, Matthias Baesken wrote:
> We have a number of places in the codebase where a macro could help when we
> check an exception and afterwrads free something and return.
I'm OK with the idea and the specific desktop change.
I'll leave the rest to the appropriate
We have a number of places in the codebase where a macro could help when we
check an exception and afterwrads free something and return.
-
Commit messages:
- JDK-8298170
Changes: https://git.openjdk.org/jdk/pull/11539/files
Webrev: https://webrevs.openjdk.org/?repo=jdk=11539=00