On this page
ctypes.alignment
Prev: ctypes.addressof | Up: ctypes | Next: ctypes.ArgumentError
Rel: ctypes.addressof, ctypes.ArgumentError, ctypes.Array, ctypes.BigEndianStructure
Ref: docs.python.org — ctypes.alignment
Tags: #public #python3 #stdlib #ctypes
Import
import ctypes
from ctypes import alignment
Signature & Overview
ctypes.alignment(object, /)
alignment(C instance) -> integer Return the alignment requirements of a C instance
Usage
import ctypes
assert ctypes.alignment(ctypes.c_int32) == 4
Gotchas
- Returns C ABI byte alignment for a
ctypestype or instance.
REPL Inspect
from ctypes import alignment
help(alignment)
Linked from
- tuts/python3/stdlib_module/ctypes
- tuts/python3/stdlib_module/ctypes/addressof
- tuts/python3/stdlib_module/ctypes/ArgumentError
- tuts/python3/stdlib_module/ctypes/Array
- tuts/python3/stdlib_module/ctypes/BigEndianStructure
- tuts/python3/stdlib_module/ctypes/BigEndianUnion
- tuts/python3/stdlib_module/ctypes/byref
- tuts/python3/stdlib_module/ctypes/c_bool
- tuts/python3/stdlib_module/ctypes/c_buffer
- tuts/python3/stdlib_module/ctypes/c_byte
- tuts/python3/stdlib_module/ctypes/c_char
- tuts/python3/stdlib_module/ctypes/c_char_p
- tuts/python3/stdlib_module/ctypes/c_double
- tuts/python3/stdlib_module/ctypes/c_double_complex
- tuts/python3/stdlib_module/ctypes/c_float
- tuts/python3/stdlib_module/ctypes/c_float_complex
- tuts/python3/stdlib_module/ctypes/c_int
- tuts/python3/stdlib_module/ctypes/c_int16
- tuts/python3/stdlib_module/ctypes/c_int32
- tuts/python3/stdlib_module/ctypes/c_int64
- tuts/python3/stdlib_module/ctypes/c_int8
- tuts/python3/stdlib_module/ctypes/c_long
- tuts/python3/stdlib_module/ctypes/c_longdouble
- tuts/python3/stdlib_module/ctypes/c_longdouble_complex
- tuts/python3/stdlib_module/ctypes/cast
- tuts/python3/stdlib_module/ctypes/create_string_buffer
- tuts/python3/stdlib_module/ctypes/create_unicode_buffer
- tuts/python3/stdlib_module/ctypes/get_errno
- tuts/python3/stdlib_module/ctypes/memmove
- tuts/python3/stdlib_module/ctypes/memoryview_at
- tuts/python3/stdlib_module/ctypes/memset
- tuts/python3/stdlib_module/ctypes/pointer
- tuts/python3/stdlib_module/ctypes/resize
- tuts/python3/stdlib_module/ctypes/set_errno
- tuts/python3/stdlib_module/ctypes/SetPointerType
- tuts/python3/stdlib_module/ctypes/sizeof
- tuts/python3/stdlib_module/ctypes/string_at
- tuts/python3/stdlib_module/ctypes/wstring_at
Related notes
- tuts/python3/stdlib_module/ctypes/addressof Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/ArgumentError Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/Array Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianStructure 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/BigEndianUnion links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/byref links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_bool links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_buffer links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_byte links to this page; shared tags: #ctypes, #stdlib