On this page
  1. ctypes.pointer
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

ctypes.pointer

Prev: ctypes.memset | Up: ctypes | Next: ctypes.resize
Rel: ctypes.addressof, ctypes.alignment, ctypes.ArgumentError, ctypes.Array
Ref: docs.python.org — ctypes.pointer
Tags: #public #python3 #stdlib #ctypes


Import

import ctypes
from ctypes import pointer

Signature & Overview

ctypes.pointer(obj)

Create a new pointer instance, pointing to 'obj'.

Usage

import ctypes

x = ctypes.c_int(99)
p = ctypes.pointer(x)
assert p.contents.value == 99

Gotchas

REPL Inspect

from ctypes import pointer
help(pointer)

Linked from

Related notes