diff options
| author | Volker Hilsheimer <[email protected]> | 2023-09-12 11:37:37 +0200 |
|---|---|---|
| committer | Volker Hilsheimer <[email protected]> | 2023-09-23 07:24:26 +0200 |
| commit | 941f49b0188c6f396a6dd6174c791029a0bed6ab (patch) | |
| tree | 20ce23d388d44d4ab7626e273733a92cf193b5cb /util/cmake/helper.py | |
| parent | 9965630aaf00d81c656baff5072dda9477544d97 (diff) | |
JNI: treat enums as their underlying types
Android APIs use integer constants like enum values, so they are mapped
to one of the integeral types (jint, jshort, jlong etc) on the C++ side.
Enable C++ code to declare an equivalent enum (scoped or unscoped), and
to use that enum as a type in JNI calls by treating it as the underlying
type in the signature() generator.
Add a helper type trait that maps enums to their underlying type and
other integral types to themselves (we can't use std::underlying_type_t
on a non-enum type). Add tests.
Note: Java Enums are special classes with fields; this change does not
add any special support for those.
Change-Id: Iec430a1553152dcf7a24209aaebbeceb1c6e38a8
Reviewed-by: Petri Virkkunen <[email protected]>
Reviewed-by: Zoltan Gera <[email protected]>
Reviewed-by: Juha Vuolle <[email protected]>
Diffstat (limited to 'util/cmake/helper.py')
0 files changed, 0 insertions, 0 deletions
