Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47393 )
Change subject: lib/gnat/i-c.ads: Add `uintptr_t` type ......................................................................
lib/gnat/i-c.ads: Add `uintptr_t` type
While Ada makes pointers harder to use, it is still useful to provide a pointer type for use in C interfaces.
Change-Id: I3a30ef0147a459ba82c79a1f85a3d3fb97b0f3a1 Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/47393 Reviewed-by: Nico Huber nico.h@gmx.de Reviewed-by: Arthur Heymans arthur@aheymans.xyz Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/lib/gnat/i-c.ads 1 file changed, 3 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Arthur Heymans: Looks good to me, approved
diff --git a/src/lib/gnat/i-c.ads b/src/lib/gnat/i-c.ads index 1403fce..7e90a60 100644 --- a/src/lib/gnat/i-c.ads +++ b/src/lib/gnat/i-c.ads @@ -59,6 +59,9 @@
type size_t is mod 2 ** System.Parameters.ptr_bits;
+ -- For convenience, also provide an uintptr_t type + type uintptr_t is mod 2 ** System.Parameters.ptr_bits; + ---------------------------- -- Characters and Strings -- ----------------------------