pyctypes

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Supported = true

Whether this build can load shared libraries

Variables

This section is empty.

Functions

func AddDLLDirectory

func AddDLLDirectory(path string) (func(), error)

The DLL search path exists only on Windows, elsewhere nothing is added and the close does nothing

func CString

func CString(s string) []byte

NUL terminated copy of a string for a char pointer argument

func FindLibrary

func FindLibrary(name string) string

Library name or path the platform loader resolves for a bare name, empty when none is installed

func GoString

func GoString(p uintptr) string

Bytes of the NUL terminated C string at an address, empty for a null pointer

func PointerAt

func PointerAt(array uintptr, i int) uintptr

Pointer sized value at index i of a C array of pointers

func RegisterFunc

func RegisterFunc(fptr any, addr uintptr)

Binds a Go function variable to a C function address

Types

type AttributeError

type AttributeError struct{ Msg string }

The error ctypes raises when a loaded library lacks a symbol

func (*AttributeError) Error

func (e *AttributeError) Error() string

type CDLL

type CDLL struct {
	Name string
	// contains filtered or unexported fields
}

One loaded shared library

func LoadLibrary

func LoadLibrary(path string, global bool) (*CDLL, error)

Loads a shared library the way ctypes CDLL does, RTLD_NOW with local or global symbol scope

func (*CDLL) Symbol

func (l *CDLL) Symbol(name string) (uintptr, error)

Address of an exported symbol, an AttributeError carrying the loader message when absent

type OSError

type OSError struct{ Msg string }

The error ctypes raises when a shared library cannot be loaded

func (*OSError) Error

func (e *OSError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL