On this page
ctypes.c_bool
Prev: ctypes.byref | Up: ctypes | Next: ctypes.c_buffer
Rel: ctypes.addressof, ctypes.alignment, ctypes.ArgumentError, ctypes.Array
Ref: docs.python.org — ctypes.c_bool
Tags: #public #python3 #stdlib #ctypes
Import
import ctypes
from ctypes import c_bool
Signature & Overview
ctypes.c_bool(...)
ctypes.c_bool class.
Usage
import ctypes
b = ctypes.c_bool(True)
assert b.value is True and ctypes.sizeof(b) == 1
Gotchas
- Maps to C99
_Bool(1 byte).
REPL Inspect
from ctypes import c_bool
help(c_bool)
Linked from
Related notes
- tuts/python3/stdlib_module/ctypes/byref Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_buffer Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ctypes/addressof Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/alignment Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/ArgumentError Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/Array Linked here; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianStructure shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianUnion shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_byte shared tags: #ctypes, #stdlib