summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-11-10 12:35:18 +0100
committerPatrick Georgi <pgeorgi@google.com>2020-11-16 12:13:31 +0000
commit81f5bf301710911a5381084aba9ff99b8e575a46 (patch)
treeb72d41ccb516492e8da0852c9139dfd6b1a5ecdc /src/lib
parent14ca7407196e34505cd4054117a1c2ed56746a32 (diff)
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>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/gnat/i-c.ads3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/gnat/i-c.ads b/src/lib/gnat/i-c.ads
index 1403fcec80..7e90a60e65 100644
--- a/src/lib/gnat/i-c.ads
+++ b/src/lib/gnat/i-c.ads
@@ -59,6 +59,9 @@ package Interfaces.C is
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 --
----------------------------