summaryrefslogtreecommitdiffstats
path: root/vendor/modernc.org/libc/ccgo.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/modernc.org/libc/ccgo.go')
-rw-r--r--vendor/modernc.org/libc/ccgo.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/modernc.org/libc/ccgo.go b/vendor/modernc.org/libc/ccgo.go
index ab1a78e6..2dad0cbb 100644
--- a/vendor/modernc.org/libc/ccgo.go
+++ b/vendor/modernc.org/libc/ccgo.go
@@ -1082,6 +1082,13 @@ func BoolUint64(b bool) uint64 {
return 0
}
+func BoolUintptr(b bool) uintptr {
+ if b {
+ return 1
+ }
+ return 0
+}
+
func SetBitFieldPtr8Int8(p uintptr, v int8, off int, mask uint8) {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
}