Commit Graph

3 Commits

Author SHA1 Message Date
Sven Anderson 3210885d21 ptrguard: simplify pointer size assert
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 06:58:23 +00:00
Sven Anderson 014a3f6308 ptrguard: assert pointer and uintptr have same size
Uintptr are guaranteed to be at least of the size of a pointer.  However, in
theory it could be larger.  Since the code of PtrGuard assumes both have the
same size and to be on the safe side, this change adds a compile-time check,
that the sizes of uintptr and pointers are the same.

Signed-off-by: Sven Anderson <sven@anderson.de>
2021-03-26 11:41:14 +00:00
Sven Anderson 0451edaf71 cutil: add PtrGuard for storing Go pointers in C memory
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-02-08 14:50:56 +00:00