py

package module
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 4 Imported by: ? 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.

README

py

GoDoc GitHub release LLGo XGo

LLGo bindings for the Python/C API, enabling XGo/Go programs to embed a Python interpreter, execute Python code, and exchange objects between host and script.

Documentation

Index

Constants

View Source
const (
	FVC_MASK      = 3
	FVC_NONE      = 0
	FVC_STR       = 1
	FVC_REPR      = 2
	FVC_ASCII     = 3
	FVS_MASK      = 4
	FVS_HAVE_SPEC = 4
)

Masks and values used by FORMAT_VALUE opcode.

View Source
const (
	CO_OPTIMIZED   = 1
	CO_NEWLOCALS   = 2
	CO_VARARGS     = 4
	CO_VARKEYWORDS = 8
	CO_NESTED      = 16
	CO_GENERATOR   = 32
)

Masks for co_flags above

View Source
const (
	CO_COROUTINE          = 128
	CO_ITERABLE_COROUTINE = 256
	CO_ASYNC_GENERATOR    = 512
)

The CO_COROUTINE flag is set for coroutine functions (defined with “async def“ keywords)

View Source
const (
	CO_FUTURE_DIVISION = 131072
	// do absolute imports by default
	CO_FUTURE_ABSOLUTE_IMPORT  = 262144
	CO_FUTURE_WITH_STATEMENT   = 524288
	CO_FUTURE_PRINT_FUNCTION   = 1048576
	CO_FUTURE_UNICODE_LITERALS = 2097152
)

bpo-39562: These constant values are changed in Python 3.9 to prevent collision with compiler flags. CO_FUTURE_ and PyCF_ constants must be kept unique. PyCF_ constants can use bits from 0x0100 to 0x10000. CO_FUTURE_ constants use bits starting at 0x20000.

View Source
const (
	CO_FUTURE_BARRY_AS_BDFL  = 4194304
	CO_FUTURE_GENERATOR_STOP = 8388608
	CO_FUTURE_ANNOTATIONS    = 16777216
)
View Source
const (
	SingleInput   = 256
	FileInput     = 257
	EvalInput     = 258
	FuncTypeInput = 345
)

These definitions must match corresponding definitions in graminit.h.

View Source
const (
	CF_MASK          = 33423360
	CF_MASK_OBSOLETE = 16
)

Public interface

View Source
const (
	CF_SOURCE_IS_UTF8         = 256
	CF_DONT_IMPLY_DEDENT      = 512
	CF_ONLY_AST               = 1024
	CF_IGNORE_COOKIE          = 2048
	CF_TYPE_COMMENTS          = 4096
	CF_ALLOW_TOP_LEVEL_AWAIT  = 8192
	CF_ALLOW_INCOMPLETE_INPUT = 16384
	CF_OPTIMIZED_AST          = 33792
	CF_COMPILE_MASK           = 62976
)

bpo-39562: CO_FUTURE_ and PyCF_ constants must be kept unique. PyCF_ constants can use bits from 0x0100 to 0x10000. CO_FUTURE_ constants use bits starting at 0x20000.

View Source
const (
	FUTURE_NESTED_SCOPES    = "nested_scopes"
	FUTURE_GENERATORS       = "generators"
	FUTURE_DIVISION         = "division"
	FUTURE_ABSOLUTE_IMPORT  = "absolute_import"
	FUTURE_WITH_STATEMENT   = "with_statement"
	FUTURE_PRINT_FUNCTION   = "print_function"
	FUTURE_UNICODE_LITERALS = "unicode_literals"
	FUTURE_BARRY_AS_BDFL    = "barry_as_FLUFL"
	FUTURE_GENERATOR_STOP   = "generator_stop"
	FUTURE_ANNOTATIONS      = "annotations"
)
View Source
const (
	T_SHORT  = 0
	T_INT    = 1
	T_LONG   = 2
	T_FLOAT  = 3
	T_DOUBLE = 4
	T_STRING = 5
	// Deprecated, use Py_T_OBJECT_EX instead
	X_T_OBJECT = 6
)

Types

View Source
const (
	T_CHAR = 7
	// 8-bit signed int
	T_BYTE = 8
)

the ordering here is weird for binary compatibility

View Source
const (
	T_UBYTE  = 9
	T_USHORT = 10
	T_UINT   = 11
	T_ULONG  = 12
)

unsigned variants:

View Source
const (
	T_OBJECT_EX = 16
	T_LONGLONG  = 17
	T_ULONGLONG = 18
)
View Source
const (
	// Py_ssize_t
	T_PYSSIZET = 19
	// Deprecated. Value is always None.
	X_T_NONE = 20
)
View Source
const (
	READONLY = 1
	// Added in 3.10, harmless no-op before that
	AUDIT_READ = 2
	// Deprecated, no-op. Do not reuse the value.
	X_WRITE_RESTRICTED = 4
	RELATIVE_OFFSET    = 8
)

Flags

View Source
const (
	X_Status_TYPE_OK    _llcppg_anon_5 = 0
	X_Status_TYPE_ERROR _llcppg_anon_5 = 1
	X_Status_TYPE_EXIT  _llcppg_anon_5 = 2
)
View Source
const (
	X_UNLOCKED = 0
	X_LOCKED   = 1
)
View Source
const (
	Long_SHIFT = 30
	// max(e such that 10**e fits in a digit)
	X_Long_DECIMAL_SHIFT = 9
)
View Source
const (
	X_Long_SIGN_MASK     = 3
	X_Long_NON_SIZE_BITS = 3
)
View Source
const (
	ASNATIVEBYTES_DEFAULTS        = -1
	ASNATIVEBYTES_BIG_ENDIAN      = 0
	ASNATIVEBYTES_LITTLE_ENDIAN   = 1
	ASNATIVEBYTES_NATIVE_ENDIAN   = 3
	ASNATIVEBYTES_UNSIGNED_BUFFER = 4
	ASNATIVEBYTES_REJECT_NEGATIVE = 8
	ASNATIVEBYTES_ALLOW_INDEX     = 16
)
View Source
const (
	X_PARSE_INTPTR  = "l"
	X_PARSE_UINTPTR = "k"
)
View Source
const (
	X_MANAGED_BUFFER_RELEASED = 1
	// free format
	X_MANAGED_BUFFER_FREE_FORMAT = 2
)

The structs are declared here so that macros can work, but they shouldn't be considered public. Don't access their fields directly, use the macros and functions instead!

View Source
const (
	X_MEMORYVIEW_RELEASED = 1
	// C-contiguous layout
	X_MEMORYVIEW_C = 2
	// Fortran contiguous layout
	X_MEMORYVIEW_FORTRAN = 4
	// scalar: ndim = 0
	X_MEMORYVIEW_SCALAR = 8
	// PIL-style layout
	X_MEMORYVIEW_PIL = 16
	// Disallow new references to the memoryview's buffer
	X_MEMORYVIEW_RESTRICTED = 32
)

memoryview state flags

View Source
const (
	METH_VARARGS = 1
	// METH_NOARGS and METH_O must not be combined with the flags above.
	METH_KEYWORDS = 2
)

#define METH_OLDARGS 0x0000 -- unsupported now

View Source
const (
	METH_NOARGS = 4
	METH_O      = 8
)

METH_NOARGS and METH_O must not be combined with the flags above.

View Source
const (
	METH_CLASS  = 16
	METH_STATIC = 32
)

METH_CLASS and METH_STATIC are a little different; these control the construction of methods for a class. These cannot be used for functions in modules.

View Source
const (
	API_VERSION = 1013
	API_STRING  = "1013"
)

The API version is maintained (independently from the Python version) so we can detect mismatches between the interpreter and dynamically loaded modules. These are diagnosed by an error message but the module is still loaded (because the mismatch can only be tested after loading the module). The error message is intended to explain the core dump a few seconds later.

The symbol PYTHON_API_STRING defines the same value as a string literal. *** PLEASE MAKE SURE THE DEFINITIONS MATCH. ***

Please add a line or two to the top of this log for each API version change:

22-Feb-2006 MvL 1013 PEP 353 - long indices for sequence lengths

19-Aug-2002 GvR 1012 Changes to string object struct for interning changes, saving 3 bytes.

17-Jul-2001 GvR 1011 Descr-branch, just to be on the safe side

25-Jan-2001 FLD 1010 Parameters added to PyCode_New() and PyFrame_New(); Python 2.1a2

14-Mar-2000 GvR 1009 Unicode API added

3-Jan-1999 GvR 1007 Decided to change back! (Don't reuse 1008!)

3-Dec-1998 GvR 1008 Python 1.5.2b1

18-Jan-1997 GvR 1007 string interning and other speedups

11-Oct-1996 GvR renamed Py_Ellipses to Py_Ellipsis :-(

30-Jul-1996 GvR Slice and ellipses syntax added

23-Jul-1996 GvR For 1.4 -- better safe than sorry this time :-)

7-Nov-1995 GvR Keyword arguments (should've been done at 1.3 :-( )

10-Jan-1995 GvR Renamed globals to new naming scheme

9-Jan-1995 GvR Initial version (incompatible with older API)

View Source
const (
	ABI_VERSION = 3
	ABI_STRING  = "3"
)

The PYTHON_ABI_VERSION is introduced in PEP 384. For the lifetime of Python 3, it will stay at the value of 3; changes to the limited API must be performed in a strictly backwards-compatible manner.

View Source
const (
	ModCreate = 1
	ModExec   = 2
)
View Source
const (
	MONITORING_EVENT_PY_START       = 0
	MONITORING_EVENT_PY_RESUME      = 1
	MONITORING_EVENT_PY_RETURN      = 2
	MONITORING_EVENT_PY_YIELD       = 3
	MONITORING_EVENT_CALL           = 4
	MONITORING_EVENT_LINE           = 5
	MONITORING_EVENT_INSTRUCTION    = 6
	MONITORING_EVENT_JUMP           = 7
	MONITORING_EVENT_BRANCH_LEFT    = 8
	MONITORING_EVENT_BRANCH_RIGHT   = 9
	MONITORING_EVENT_STOP_ITERATION = 10
)
View Source
const (
	MONITORING_EVENT_RAISE             = 11
	MONITORING_EVENT_EXCEPTION_HANDLED = 12
	MONITORING_EVENT_PY_UNWIND         = 13
	MONITORING_EVENT_PY_THROW          = 14
	MONITORING_EVENT_RERAISE           = 15
)
View Source
const (
	MONITORING_EVENT_C_RETURN = 16
	MONITORING_EVENT_C_RAISE  = 17
	MONITORING_EVENT_BRANCH   = 18
)
View Source
const (
	CONSTANT_NONE            = 0
	CONSTANT_FALSE           = 1
	CONSTANT_TRUE            = 2
	CONSTANT_ELLIPSIS        = 3
	CONSTANT_NOT_IMPLEMENTED = 4
	CONSTANT_ZERO            = 5
	CONSTANT_ONE             = 6
	CONSTANT_EMPTY_STR       = 7
	CONSTANT_EMPTY_BYTES     = 8
	CONSTANT_EMPTY_TUPLE     = 9
)
View Source
const (
	LT = 0
	LE = 1
	EQ = 2
	NE = 3
	GT = 4
	GE = 5
)

Rich comparison opcodes

View Source
const (
	RELEASE_LEVEL_ALPHA = 10
	RELEASE_LEVEL_BETA  = 11
	// For release candidates
	RELEASE_LEVEL_GAMMA = 12
	// Serial should be 0 here
	RELEASE_LEVEL_FINAL = 15
)

Values for PY_RELEASE_LEVEL

View Source
const (
	MAJOR_VERSION  = 3
	MINOR_VERSION  = 14
	MICRO_VERSION  = 8
	RELEASE_LEVEL  = 15
	RELEASE_SERIAL = 0
)

--start constants--

View Source
const (
	BUF_SIMPLE   = 0
	BUF_WRITABLE = 1
)

Flags for getting buffers. Keep these in sync with inspect.BufferFlags.

View Source
const (
	BUF_FORMAT         = 4
	BUF_ND             = 8
	BUF_STRIDES        = 24
	BUF_C_CONTIGUOUS   = 56
	BUF_F_CONTIGUOUS   = 88
	BUF_ANY_CONTIGUOUS = 152
	BUF_INDIRECT       = 280
)
View Source
const (
	BUF_CONTIG    = 9
	BUF_CONTIG_RO = 8
)
View Source
const (
	BUF_STRIDED    = 25
	BUF_STRIDED_RO = 24
)
View Source
const (
	BUF_RECORDS    = 29
	BUF_RECORDS_RO = 28
)
View Source
const (
	BUF_FULL    = 285
	BUF_FULL_RO = 284
)
View Source
const (
	BUF_READ  = 256
	BUF_WRITE = 512
)
View Source
const (
	CTF_LOWER  = 1
	CTF_UPPER  = 2
	CTF_ALPHA  = 3
	CTF_DIGIT  = 4
	CTF_ALNUM  = 7
	CTF_SPACE  = 8
	CTF_XDIGIT = 16
)
View Source
const (
	Unstable_EXECUTABLE_KIND_SKIP              = 0
	Unstable_EXECUTABLE_KIND_PY_FUNCTION       = 1
	Unstable_EXECUTABLE_KIND_BUILTIN_FUNCTION  = 3
	Unstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR = 4
	Unstable_EXECUTABLE_KINDS                  = 5
)
View Source
const (
	HASH_EXTERNAL  = 0
	HASH_SIPHASH24 = 1
	HASH_FNV       = 2
	HASH_SIPHASH13 = 3
)

Hash algorithm selection

The values for Py_HASH_* are hard-coded in the configure script.

- FNV and SIPHASH* are available on all platforms and architectures. - With EXTERNAL embedders can provide an alternative implementation with::

PyHash_FuncDef PyHash_Func = {...};

XXX: Figure out __declspec() for extern PyHash_FuncDef.

View Source
const (
	X_HASH_BITS = 61
	X_HASH_INF  = 314159
)

Aliases kept for backward compatibility with Python 3.12

View Source
const (
	InterpreterConfig_DEFAULT_GIL = 0
	InterpreterConfig_SHARED_GIL  = 1
	InterpreterConfig_OWN_GIL     = 2
)
View Source
const (
	BIG_ENDIAN    = 0
	LITTLE_ENDIAN = 1
)
View Source
const (
	Trace_CALL        = 0
	Trace_EXCEPTION   = 1
	Trace_LINE        = 2
	Trace_RETURN      = 3
	Trace_C_CALL      = 4
	Trace_C_EXCEPTION = 5
	Trace_C_RETURN    = 6
	Trace_OPCODE      = 7
)

The following values are used for 'what' for tracefunc functions

To add a new kind of trace event, also update "trace_init" in Python/sysmodule.c to define the Python level event name

View Source
const (
	DTSF_SIGN = 1
	// if the result is an integer add ".0"
	DTSF_ADD_DOT_0 = 2
	// "alternate" formatting. it's format_code
	// specific
	DTSF_ALT = 4
)

PyOS_double_to_string's "flags" parameter can be set to 0 or more of:

View Source
const (
	DTST_FINITE   = 0
	DTST_INFINITE = 1
	DTST_NAN      = 2
)

PyOS_double_to_string's "type", if non-NULL, will be set to one of:

View Source
const (
	WAIT_LOCK   = 1
	NOWAIT_LOCK = 0
)
View Source
const (
	X_STATICALLY_ALLOCATED_FLAG = 4
	X_IMMORTAL_FLAGS            = 1
)
View Source
const (
	BfGetbuffer             = 1
	BfReleasebuffer         = 2
	MpAssSubscript          = 3
	MpLength                = 4
	MpSubscript             = 5
	NbAbsolute              = 6
	NbAdd                   = 7
	NbAnd                   = 8
	NbBool                  = 9
	NbDivmod                = 10
	NbFloat                 = 11
	NbFloorDivide           = 12
	NbIndex                 = 13
	NbInplaceAdd            = 14
	NbInplaceAnd            = 15
	NbInplaceFloorDivide    = 16
	NbInplaceLshift         = 17
	NbInplaceMultiply       = 18
	NbInplaceOr             = 19
	NbInplacePower          = 20
	NbInplaceRemainder      = 21
	NbInplaceRshift         = 22
	NbInplaceSubtract       = 23
	NbInplaceTrueDivide     = 24
	NbInplaceXor            = 25
	NbInt                   = 26
	NbInvert                = 27
	NbLshift                = 28
	NbMultiply              = 29
	NbNegative              = 30
	NbOr                    = 31
	NbPositive              = 32
	NbPower                 = 33
	NbRemainder             = 34
	NbRshift                = 35
	NbSubtract              = 36
	NbTrueDivide            = 37
	NbXor                   = 38
	SqAssItem               = 39
	SqConcat                = 40
	SqContains              = 41
	SqInplaceConcat         = 42
	SqInplaceRepeat         = 43
	SqItem                  = 44
	SqLength                = 45
	SqRepeat                = 46
	TpAlloc                 = 47
	TpBase                  = 48
	TpBases                 = 49
	TpCall                  = 50
	TpClear                 = 51
	TpDealloc               = 52
	TpDel                   = 53
	TpDescrGet              = 54
	TpDescrSet              = 55
	TpDoc                   = 56
	TpGetattr               = 57
	TpGetattro              = 58
	TpHash                  = 59
	TpInit                  = 60
	TpIsGc                  = 61
	TpIter                  = 62
	TpIternext              = 63
	TpMethods               = 64
	TpNew                   = 65
	TpRepr                  = 66
	TpRichcompare           = 67
	TpSetattr               = 68
	TpSetattro              = 69
	TpStr                   = 70
	TpTraverse              = 71
	TpMembers               = 72
	TpGetset                = 73
	TpFree                  = 74
	NbMatrixMultiply        = 75
	NbInplaceMatrixMultiply = 76
	AmAwait                 = 77
	AmAiter                 = 78
	AmAnext                 = 79
)

Do not renumber the file; these numbers are part of the stable ABI.

View Source
const (
	SSTATE_NOT_INTERNED             = 0
	SSTATE_INTERNED_MORTAL          = 1
	SSTATE_INTERNED_IMMORTAL        = 2
	SSTATE_INTERNED_IMMORTAL_STATIC = 3
)

Interning state.

View Source
const ALIGNOF_LONG = 8

The normal alignment of 'long', in bytes.

View Source
const ALIGNOF_MAX_ALIGN_T = 8

The normal alignment of 'max_align_t', in bytes.

View Source
const ALIGNOF_SIZE_T = 8

The normal alignment of 'size_t', in bytes.

View Source
const AmSend = 81

New in 3.10

View Source
const BUF_MAX_NDIM = 64

Maximum number of dimensions

View Source
const BUF_WRITEABLE = 1

we used to include an E, backwards compatible alias

View Source
const BUILTIN_HASHLIB_HASHES = "md5,sha1,sha2,sha3,blake2"

enabled builtin hash modules

View Source
const CAN_START_THREADS = 1
View Source
const CLEANUP_SUPPORTED = 131072
View Source
const COERCE_C_LOCALE = 1

Define if you want to coerce the C locale to a UTF-8 based locale

View Source
const CO_HAS_DOCSTRING = 67108864

Whether the code object has a docstring, If so, it will be the first item in co_consts

View Source
const CO_MAXBLOCKS = 21

Max static block nesting within a function

View Source
const CO_METHOD = 134217728

A function defined in class scope

View Source
const CO_NO_MONITORING_EVENTS = 33554432
View Source
const DOUBLE_IS_LITTLE_ENDIAN_IEEE754 = 1

Define if C doubles are 64-bit IEEE 754 binary format, stored with the least significant byte first

View Source
const DTSF_NO_NEG_0 = 8

negative zero result is coerced to 0

View Source
const ENABLE_IPV6 = 1

Define if --enable-ipv6 is specified

View Source
const FORMAT_SIZE_T = "z"
View Source
const HASH_ALGORITHM = 3
View Source
const HASH_BITS = 61
View Source
const HASH_CUTOFF = 0
View Source
const HASH_INF = 314159
View Source
const HAVE_ACCEPT = 1

Define if you have the 'accept' function.

View Source
const HAVE_ACOSH = 1

Define to 1 if you have the 'acosh' function.

View Source
const HAVE_ADDRINFO = 1

struct addrinfo (netdb.h)

View Source
const HAVE_ALARM = 1

Define to 1 if you have the 'alarm' function.

View Source
const HAVE_ALLOCA_H = 1

Define to 1 if you have the <alloca.h> header file.

View Source
const HAVE_ASINH = 1

Define to 1 if you have the 'asinh' function.

View Source
const HAVE_ATANH = 1

Define to 1 if you have the 'atanh' function.

View Source
const HAVE_BACKTRACE = 1

Define to 1 if you have the 'backtrace' function.

View Source
const HAVE_BIND = 1

Define if you have the 'bind' function.

View Source
const HAVE_BROKEN_SEM_GETVALUE = 1

define to 1 if your sem_getvalue is broken.

View Source
const HAVE_BUILTIN_ATOMIC = 1

Has builtin __atomic_load_n() and __atomic_store_n() functions

View Source
const HAVE_CHFLAGS = 1

Define to 1 if you have the 'chflags' function.

View Source
const HAVE_CHMOD = 1

Define to 1 if you have the 'chmod' function.

View Source
const HAVE_CHOWN = 1

Define to 1 if you have the 'chown' function.

View Source
const HAVE_CHROOT = 1

Define if you have the 'chroot' function.

View Source
const HAVE_CLOCK = 1

Define to 1 if you have the 'clock' function.

View Source
const HAVE_CLOCK_GETRES = 1

Define to 1 if you have the 'clock_getres' function.

View Source
const HAVE_CLOCK_GETTIME = 1

Define to 1 if you have the 'clock_gettime' function.

View Source
const HAVE_CLOCK_SETTIME = 1

Define to 1 if you have the 'clock_settime' function.

View Source
const HAVE_CLOCK_T = 1

Define to 1 if the system has the type 'clock_t'.

View Source
const HAVE_COMPUTED_GOTOS = 1

Define if the C compiler supports computed gotos.

View Source
const HAVE_CONFSTR = 1

Define to 1 if you have the 'confstr' function.

View Source
const HAVE_CONNECT = 1

Define if you have the 'connect' function.

View Source
const HAVE_CTERMID = 1

Define to 1 if you have the 'ctermid' function.

View Source
const HAVE_CTERMID_R = 1

Define if you have the 'ctermid_r' function.

View Source
const HAVE_CURSES_ESCDELAY = 1

Define if you have the 'ESCDELAY' variable.

View Source
const HAVE_CURSES_FILTER = 1

Define if you have the 'filter' function.

View Source
const HAVE_CURSES_GETMOUSE = 1

Define if you have the 'getmouse' function with the X/Open signature.

View Source
const HAVE_CURSES_H = 1

Define to 1 if you have the <curses.h> header file.

View Source
const HAVE_CURSES_HAS_KEY = 1

Define if you have the 'has_key' function.

View Source
const HAVE_CURSES_IMMEDOK = 1

Define if you have the 'immedok' function.

View Source
const HAVE_CURSES_IS_PAD = 1

Define if you have the 'is_pad' function.

View Source
const HAVE_CURSES_IS_TERM_RESIZED = 1

Define if you have the 'is_term_resized' function.

View Source
const HAVE_CURSES_RESIZETERM = 1

Define if you have the 'resizeterm' function.

View Source
const HAVE_CURSES_RESIZE_TERM = 1

Define if you have the 'resize_term' function.

View Source
const HAVE_CURSES_SET_ESCDELAY = 1

Define if you have the 'set_escdelay' function.

View Source
const HAVE_CURSES_SET_TABSIZE = 1

Define if you have the 'set_tabsize' function.

View Source
const HAVE_CURSES_SYNCOK = 1

Define if you have the 'syncok' function.

View Source
const HAVE_CURSES_TABSIZE = 1

Define if you have the 'TABSIZE' variable.

View Source
const HAVE_CURSES_TYPEAHEAD = 1

Define if you have the 'typeahead' function.

View Source
const HAVE_CURSES_USE_ENV = 1

Define if you have the 'use_env' function.

View Source
const HAVE_CURSES_WCHGAT = 1

Define if you have the 'wchgat' function.

View Source
const HAVE_DB_H = 1

Define to 1 if you have the <db.h> header file.

View Source
const HAVE_DECL_RTLD_DEEPBIND = 0

Define to 1 if you have the declaration of 'RTLD_DEEPBIND', and to 0 if you don't.

View Source
const HAVE_DECL_RTLD_GLOBAL = 1

Define to 1 if you have the declaration of 'RTLD_GLOBAL', and to 0 if you don't.

View Source
const HAVE_DECL_RTLD_LAZY = 1

Define to 1 if you have the declaration of 'RTLD_LAZY', and to 0 if you don't.

View Source
const HAVE_DECL_RTLD_LOCAL = 1

Define to 1 if you have the declaration of 'RTLD_LOCAL', and to 0 if you don't.

View Source
const HAVE_DECL_RTLD_MEMBER = 0

Define to 1 if you have the declaration of 'RTLD_MEMBER', and to 0 if you don't.

View Source
const HAVE_DECL_RTLD_NODELETE = 1

Define to 1 if you have the declaration of 'RTLD_NODELETE', and to 0 if you don't.

View Source
const HAVE_DECL_RTLD_NOLOAD = 1

Define to 1 if you have the declaration of 'RTLD_NOLOAD', and to 0 if you don't.

View Source
const HAVE_DECL_RTLD_NOW = 1

Define to 1 if you have the declaration of 'RTLD_NOW', and to 0 if you don't.

View Source
const HAVE_DECL_UT_NAMESIZE = 1

Define to 1 if you have the declaration of 'UT_NAMESIZE', and to 0 if you don't.

View Source
const HAVE_DEVICE_MACROS = 1

Define to 1 if you have the device macros.

View Source
const HAVE_DEV_PTMX = 1

Define to 1 if you have the /dev/ptmx device file.

View Source
const HAVE_DIRENT_D_TYPE = 1

Define to 1 if the dirent structure has a d_type field

View Source
const HAVE_DIRENT_H = 1

Define to 1 if you have the <dirent.h> header file, and it defines 'DIR'.

View Source
const HAVE_DIRFD = 1

Define if you have the 'dirfd' function or macro.

View Source
const HAVE_DLADDR = 1

Define to 1 if you have the 'dladdr' function.

View Source
const HAVE_DLFCN_H = 1

Define to 1 if you have the <dlfcn.h> header file.

View Source
const HAVE_DLOPEN = 1

Define to 1 if you have the 'dlopen' function.

View Source
const HAVE_DUP = 1

Define to 1 if you have the 'dup' function.

View Source
const HAVE_DUP2 = 1

Define to 1 if you have the 'dup2' function.

View Source
const HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH = 1

Define if you have the '_dyld_shared_cache_contains_path' function.

View Source
const HAVE_DYNAMIC_LOADING = 1

Defined when any dynamic module loading is enabled.

View Source
const HAVE_ERF = 1

Define to 1 if you have the 'erf' function.

View Source
const HAVE_ERFC = 1

Define to 1 if you have the 'erfc' function.

View Source
const HAVE_ERRNO_H = 1

Define to 1 if you have the <errno.h> header file.

View Source
const HAVE_EXECINFO_H = 1

Define to 1 if you have the <execinfo.h> header file.

View Source
const HAVE_EXECV = 1

Define to 1 if you have the 'execv' function.

View Source
const HAVE_EXPM1 = 1

Define to 1 if you have the 'expm1' function.

View Source
const HAVE_FACCESSAT = 1

Define to 1 if you have the 'faccessat' function.

View Source
const HAVE_FCHDIR = 1

Define if you have the 'fchdir' function.

View Source
const HAVE_FCHMOD = 1

Define to 1 if you have the 'fchmod' function.

View Source
const HAVE_FCHMODAT = 1

Define to 1 if you have the 'fchmodat' function.

View Source
const HAVE_FCHOWN = 1

Define to 1 if you have the 'fchown' function.

View Source
const HAVE_FCHOWNAT = 1

Define to 1 if you have the 'fchownat' function.

View Source
const HAVE_FCNTL_H = 1

Define to 1 if you have the <fcntl.h> header file.

View Source
const HAVE_FDOPENDIR = 1

Define to 1 if you have the 'fdopendir' function.

View Source
const HAVE_FFI_CLOSURE_ALLOC = 1

Define if you have the 'ffi_closure_alloc' function.

View Source
const HAVE_FFI_PREP_CIF_VAR = 1

Define if you have the 'ffi_prep_cif_var' function.

View Source
const HAVE_FFI_PREP_CLOSURE_LOC = 1

Define if you have the 'ffi_prep_closure_loc' function.

View Source
const HAVE_FLOCK = 1

Define to 1 if you have the 'flock' function.

View Source
const HAVE_FORK = 1

Define to 1 if you have the 'fork' function.

View Source
const HAVE_FORKPTY = 1

Define to 1 if you have the 'forkpty' function.

View Source
const HAVE_FPATHCONF = 1

Define to 1 if you have the 'fpathconf' function.

View Source
const HAVE_FSEEKO = 1

Define to 1 if you have the 'fseeko' function.

View Source
const HAVE_FSTATAT = 1

Define to 1 if you have the 'fstatat' function.

View Source
const HAVE_FSTATVFS = 1

Define to 1 if you have the 'fstatvfs' function.

View Source
const HAVE_FSYNC = 1

Define if you have the 'fsync' function.

View Source
const HAVE_FTELLO = 1

Define to 1 if you have the 'ftello' function.

View Source
const HAVE_FTIME = 1

Define to 1 if you have the 'ftime' function.

View Source
const HAVE_FTRUNCATE = 1

Define to 1 if you have the 'ftruncate' function.

View Source
const HAVE_FUTIMENS = 1

Define to 1 if you have the 'futimens' function.

View Source
const HAVE_FUTIMES = 1

Define to 1 if you have the 'futimes' function.

View Source
const HAVE_GAI_STRERROR = 1

Define to 1 if you have the 'gai_strerror' function.

View Source
const HAVE_GCC_UINT128_T = 1

Define if your compiler provides __uint128_t

View Source
const HAVE_GETADDRINFO = 1

Define if you have the getaddrinfo function.

View Source
const HAVE_GETC_UNLOCKED = 1

Define this if you have flockfile(), getc_unlocked(), and funlockfile()

View Source
const HAVE_GETEGID = 1

Define to 1 if you have the 'getegid' function.

View Source
const HAVE_GETENTROPY = 1

Define to 1 if you have the 'getentropy' function.

View Source
const HAVE_GETEUID = 1

Define to 1 if you have the 'geteuid' function.

View Source
const HAVE_GETGID = 1

Define to 1 if you have the 'getgid' function.

View Source
const HAVE_GETGRENT = 1

Define to 1 if you have the 'getgrent' function.

View Source
const HAVE_GETGRGID = 1

Define to 1 if you have the 'getgrgid' function.

View Source
const HAVE_GETGRGID_R = 1

Define to 1 if you have the 'getgrgid_r' function.

View Source
const HAVE_GETGRNAM_R = 1

Define to 1 if you have the 'getgrnam_r' function.

View Source
const HAVE_GETGROUPLIST = 1

Define to 1 if you have the 'getgrouplist' function.

View Source
const HAVE_GETGROUPS = 1

Define to 1 if you have the 'getgroups' function.

View Source
const HAVE_GETHOSTBYADDR = 1

Define if you have the 'gethostbyaddr' function.

View Source
const HAVE_GETHOSTBYNAME = 1

Define to 1 if you have the 'gethostbyname' function.

View Source
const HAVE_GETHOSTNAME = 1

Define to 1 if you have the 'gethostname' function.

View Source
const HAVE_GETITIMER = 1

Define to 1 if you have the 'getitimer' function.

View Source
const HAVE_GETLOADAVG = 1

Define to 1 if you have the 'getloadavg' function.

View Source
const HAVE_GETLOGIN = 1

Define to 1 if you have the 'getlogin' function.

View Source
const HAVE_GETLOGIN_R = 1

Define to 1 if you have the 'getlogin_r' function.

View Source
const HAVE_GETNAMEINFO = 1

Define to 1 if you have the 'getnameinfo' function.

View Source
const HAVE_GETPAGESIZE = 1

Define if you have the 'getpagesize' function.

View Source
const HAVE_GETPEERNAME = 1

Define if you have the 'getpeername' function.

View Source
const HAVE_GETPGID = 1

Define to 1 if you have the 'getpgid' function.

View Source
const HAVE_GETPGRP = 1

Define to 1 if you have the 'getpgrp' function.

View Source
const HAVE_GETPID = 1

Define to 1 if you have the 'getpid' function.

View Source
const HAVE_GETPPID = 1

Define to 1 if you have the 'getppid' function.

View Source
const HAVE_GETPRIORITY = 1

Define to 1 if you have the 'getpriority' function.

View Source
const HAVE_GETPROTOBYNAME = 1

Define if you have the 'getprotobyname' function.

View Source
const HAVE_GETPWENT = 1

Define to 1 if you have the 'getpwent' function.

View Source
const HAVE_GETPWNAM_R = 1

Define to 1 if you have the 'getpwnam_r' function.

View Source
const HAVE_GETPWUID = 1

Define to 1 if you have the 'getpwuid' function.

View Source
const HAVE_GETPWUID_R = 1

Define to 1 if you have the 'getpwuid_r' function.

View Source
const HAVE_GETRUSAGE = 1

Define to 1 if you have the 'getrusage' function.

View Source
const HAVE_GETSERVBYNAME = 1

Define if you have the 'getservbyname' function.

View Source
const HAVE_GETSERVBYPORT = 1

Define if you have the 'getservbyport' function.

View Source
const HAVE_GETSID = 1

Define to 1 if you have the 'getsid' function.

View Source
const HAVE_GETSOCKNAME = 1

Define if you have the 'getsockname' function.

View Source
const HAVE_GETUID = 1

Define to 1 if you have the 'getuid' function.

View Source
const HAVE_GETWD = 1

Define to 1 if you have the 'getwd' function.

View Source
const HAVE_GRANTPT = 1

Define to 1 if you have the 'grantpt' function.

View Source
const HAVE_GRP_H = 1

Define to 1 if you have the <grp.h> header file.

View Source
const HAVE_HSTRERROR = 1

Define if you have the 'hstrerror' function.

View Source
const HAVE_IF_NAMEINDEX = 1

Define to 1 if you have the 'if_nameindex' function.

View Source
const HAVE_INET_ATON = 1

Define if you have the 'inet_aton' function.

View Source
const HAVE_INET_NTOA = 1

Define if you have the 'inet_ntoa' function.

View Source
const HAVE_INET_PTON = 1

Define if you have the 'inet_pton' function.

View Source
const HAVE_INITGROUPS = 1

Define to 1 if you have the 'initgroups' function.

View Source
const HAVE_INTTYPES_H = 1

Define to 1 if you have the <inttypes.h> header file.

View Source
const HAVE_KILL = 1

Define to 1 if you have the 'kill' function.

View Source
const HAVE_KILLPG = 1

Define to 1 if you have the 'killpg' function.

View Source
const HAVE_KQUEUE = 1

Define if you have the 'kqueue' function.

View Source
const HAVE_LANGINFO_H = 1

Define to 1 if you have the <langinfo.h> header file.

View Source
const HAVE_LCHFLAGS = 1

Define to 1 if you have the 'lchflags' function.

View Source
const HAVE_LCHMOD = 1

Define to 1 if you have the 'lchmod' function.

View Source
const HAVE_LCHOWN = 1

Define to 1 if you have the 'lchown' function.

View Source
const HAVE_LIBDL = 1

Define to 1 if you have the 'dl' library (-ldl).

View Source
const HAVE_LIBSQLITE3 = 1

Define to 1 if you have the 'sqlite3' library (-lsqlite3).

View Source
const HAVE_LINK = 1

Define if you have the 'link' function.

View Source
const HAVE_LINKAT = 1

Define to 1 if you have the 'linkat' function.

View Source
const HAVE_LISTEN = 1

Define if you have the 'listen' function.

View Source
const HAVE_LOCKF = 1

Define to 1 if you have the 'lockf' function.

View Source
const HAVE_LOG1P = 1

Define to 1 if you have the 'log1p' function.

View Source
const HAVE_LOG2 = 1

Define to 1 if you have the 'log2' function.

View Source
const HAVE_LOGIN_TTY = 1

Define to 1 if you have the `login_tty' function.

View Source
const HAVE_LONG_DOUBLE = 1

Define to 1 if the system has the type 'long double'.

View Source
const HAVE_LONG_LONG = 1
View Source
const HAVE_LSTAT = 1

Define to 1 if you have the 'lstat' function.

View Source
const HAVE_LUTIMES = 1

Define to 1 if you have the 'lutimes' function.

View Source
const HAVE_MADVISE = 1

Define to 1 if you have the 'madvise' function.

View Source
const HAVE_MAKEDEV = 1

Define this if you have the makedev macro.

View Source
const HAVE_MAXLOGNAME = 1

Define if you have the 'MAXLOGNAME' constant.

View Source
const HAVE_MBRTOWC = 1

Define to 1 if you have the 'mbrtowc' function.

View Source
const HAVE_MKDIRAT = 1

Define to 1 if you have the 'mkdirat' function.

View Source
const HAVE_MKFIFO = 1

Define to 1 if you have the 'mkfifo' function.

View Source
const HAVE_MKFIFOAT = 1

Define to 1 if you have the 'mkfifoat' function.

View Source
const HAVE_MKNOD = 1

Define to 1 if you have the 'mknod' function.

View Source
const HAVE_MKNODAT = 1

Define to 1 if you have the 'mknodat' function.

View Source
const HAVE_MKTIME = 1

Define to 1 if you have the 'mktime' function.

View Source
const HAVE_MMAP = 1

Define to 1 if you have the 'mmap' function.

View Source
const HAVE_NANOSLEEP = 1

Define to 1 if you have the 'nanosleep' function.

View Source
const HAVE_NCURSESW = 1

Define if you have the 'ncursesw' library

View Source
const HAVE_NCURSES_H = 1

Define to 1 if you have the <ncurses.h> header file.

View Source
const HAVE_NDBM_H = 1

Define to 1 if you have the <ndbm.h> header file.

View Source
const HAVE_NETDB_H = 1

Define to 1 if you have the <netdb.h> header file.

View Source
const HAVE_NETINET_IN_H = 1

Define to 1 if you have the <netinet/in.h> header file.

View Source
const HAVE_NET_ETHERNET_H = 1

Define to 1 if you have the <net/ethernet.h> header file.

View Source
const HAVE_NET_IF_H = 1

Define to 1 if you have the <net/if.h> header file.

View Source
const HAVE_NICE = 1

Define to 1 if you have the 'nice' function.

View Source
const HAVE_OPENAT = 1

Define to 1 if you have the 'openat' function.

View Source
const HAVE_OPENDIR = 1

Define to 1 if you have the 'opendir' function.

View Source
const HAVE_OPENPTY = 1

Define to 1 if you have the 'openpty' function.

View Source
const HAVE_PANEL_H = 1

Define to 1 if you have the <panel.h> header file.

View Source
const HAVE_PATHCONF = 1

Define to 1 if you have the 'pathconf' function.

View Source
const HAVE_PAUSE = 1

Define to 1 if you have the 'pause' function.

View Source
const HAVE_PIPE = 1

Define to 1 if you have the 'pipe' function.

View Source
const HAVE_POLL = 1

Define to 1 if you have the 'poll' function.

View Source
const HAVE_POLL_H = 1

Define to 1 if you have the <poll.h> header file.

View Source
const HAVE_POSIX_OPENPT = 1

Define to 1 if you have the 'posix_openpt' function.

View Source
const HAVE_POSIX_SPAWN = 1

Define to 1 if you have the 'posix_spawn' function.

View Source
const HAVE_POSIX_SPAWNP = 1

Define to 1 if you have the 'posix_spawnp' function.

View Source
const HAVE_PREAD = 1

Define to 1 if you have the 'pread' function.

View Source
const HAVE_PREADV = 1

Define to 1 if you have the 'preadv' function.

View Source
const HAVE_PROTOTYPES = 1

Define if your compiler supports function prototype

View Source
const HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP = 1

Define to 1 if you have the 'pthread_cond_timedwait_relative_np' function.

View Source
const HAVE_PTHREAD_GETNAME_NP = 1

Define to 1 if you have the 'pthread_getname_np' function.

View Source
const HAVE_PTHREAD_H = 1

Define to 1 if you have the <pthread.h> header file.

View Source
const HAVE_PTHREAD_KILL = 1

Define to 1 if you have the 'pthread_kill' function.

View Source
const HAVE_PTHREAD_SETNAME_NP = 1

Define to 1 if you have the 'pthread_setname_np' function.

View Source
const HAVE_PTHREAD_SIGMASK = 1

Define to 1 if you have the 'pthread_sigmask' function.

View Source
const HAVE_PTSNAME = 1

Define to 1 if you have the 'ptsname' function.

View Source
const HAVE_PTSNAME_R = 1

Define to 1 if you have the 'ptsname_r' function.

View Source
const HAVE_PWRITE = 1

Define to 1 if you have the 'pwrite' function.

View Source
const HAVE_PWRITEV = 1

Define to 1 if you have the 'pwritev' function.

View Source
const HAVE_READLINK = 1

Define to 1 if you have the 'readlink' function.

View Source
const HAVE_READLINKAT = 1

Define to 1 if you have the 'readlinkat' function.

View Source
const HAVE_READV = 1

Define to 1 if you have the 'readv' function.

View Source
const HAVE_REALPATH = 1

Define to 1 if you have the 'realpath' function.

View Source
const HAVE_RECVFROM = 1

Define if you have the 'recvfrom' function.

View Source
const HAVE_RENAMEAT = 1

Define to 1 if you have the 'renameat' function.

View Source
const HAVE_RL_COMPLETION_APPEND_CHARACTER = 1

Define if you have readline 2.2

View Source
const HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK = 1

Define if you have readline 4.0

View Source
const HAVE_RL_COMPLETION_MATCHES = 1

Define if you have readline 4.2

View Source
const HAVE_RL_PRE_INPUT_HOOK = 1

Define if you have readline 4.0

View Source
const HAVE_SCHED_GET_PRIORITY_MAX = 1

Define to 1 if you have the 'sched_get_priority_max' function.

View Source
const HAVE_SCHED_H = 1

Define to 1 if you have the <sched.h> header file.

View Source
const HAVE_SEM_GETVALUE = 1

Define to 1 if you have the 'sem_getvalue' function.

View Source
const HAVE_SEM_OPEN = 1

Define to 1 if you have the 'sem_open' function.

View Source
const HAVE_SEM_UNLINK = 1

Define to 1 if you have the 'sem_unlink' function.

View Source
const HAVE_SENDFILE = 1

Define to 1 if you have the 'sendfile' function.

View Source
const HAVE_SENDTO = 1

Define if you have the 'sendto' function.

View Source
const HAVE_SETEGID = 1

Define to 1 if you have the 'setegid' function.

View Source
const HAVE_SETEUID = 1

Define to 1 if you have the 'seteuid' function.

View Source
const HAVE_SETGID = 1

Define to 1 if you have the 'setgid' function.

View Source
const HAVE_SETGROUPS = 1

Define if you have the 'setgroups' function.

View Source
const HAVE_SETHOSTNAME = 1

Define to 1 if you have the 'sethostname' function.

View Source
const HAVE_SETITIMER = 1

Define to 1 if you have the 'setitimer' function.

View Source
const HAVE_SETJMP_H = 1

Define to 1 if you have the <setjmp.h> header file.

View Source
const HAVE_SETLOCALE = 1

Define to 1 if you have the 'setlocale' function.

View Source
const HAVE_SETPGID = 1

Define to 1 if you have the 'setpgid' function.

View Source
const HAVE_SETPGRP = 1

Define to 1 if you have the 'setpgrp' function.

View Source
const HAVE_SETPRIORITY = 1

Define to 1 if you have the 'setpriority' function.

View Source
const HAVE_SETREGID = 1

Define to 1 if you have the 'setregid' function.

View Source
const HAVE_SETREUID = 1

Define to 1 if you have the 'setreuid' function.

View Source
const HAVE_SETSID = 1

Define to 1 if you have the 'setsid' function.

View Source
const HAVE_SETSOCKOPT = 1

Define if you have the 'setsockopt' function.

View Source
const HAVE_SETUID = 1

Define to 1 if you have the 'setuid' function.

View Source
const HAVE_SETVBUF = 1

Define to 1 if you have the 'setvbuf' function.

View Source
const HAVE_SHM_OPEN = 1

Define to 1 if you have the 'shm_open' function.

View Source
const HAVE_SHM_UNLINK = 1

Define to 1 if you have the 'shm_unlink' function.

View Source
const HAVE_SHUTDOWN = 1

Define to 1 if you have the 'shutdown' function.

View Source
const HAVE_SIGACTION = 1

Define to 1 if you have the 'sigaction' function.

View Source
const HAVE_SIGALTSTACK = 1

Define to 1 if you have the 'sigaltstack' function.

View Source
const HAVE_SIGFILLSET = 1

Define to 1 if you have the 'sigfillset' function.

View Source
const HAVE_SIGINFO_T_SI_BAND = 1

Define to 1 if 'si_band' is a member of 'siginfo_t'.

View Source
const HAVE_SIGINTERRUPT = 1

Define to 1 if you have the 'siginterrupt' function.

View Source
const HAVE_SIGNAL_H = 1

Define to 1 if you have the <signal.h> header file.

View Source
const HAVE_SIGPENDING = 1

Define to 1 if you have the 'sigpending' function.

View Source
const HAVE_SIGRELSE = 1

Define to 1 if you have the 'sigrelse' function.

View Source
const HAVE_SIGWAIT = 1

Define to 1 if you have the 'sigwait' function.

View Source
const HAVE_SNPRINTF = 1

Define to 1 if you have the 'snprintf' function.

View Source
const HAVE_SOCKADDR_SA_LEN = 1

Define if sockaddr has sa_len member

View Source
const HAVE_SOCKADDR_STORAGE = 1

struct sockaddr_storage (sys/socket.h)

View Source
const HAVE_SOCKET = 1

Define if you have the 'socket' function.

View Source
const HAVE_SOCKETPAIR = 1

Define if you have the 'socketpair' function.

View Source
const HAVE_SOCKLEN_T = 1

Define to 1 if the system has the type 'socklen_t'.

View Source
const HAVE_SPAWN_H = 1

Define to 1 if you have the <spawn.h> header file.

View Source
const HAVE_SSIZE_T = 1

Define to 1 if the system has the type 'ssize_t'.

View Source
const HAVE_STATVFS = 1

Define to 1 if you have the 'statvfs' function.

View Source
const HAVE_STAT_TV_NSEC2 = 1

Define if you have struct stat.st_mtimensec

View Source
const HAVE_STDINT_H = 1

Define to 1 if you have the <stdint.h> header file.

View Source
const HAVE_STDIO_H = 1

Define to 1 if you have the <stdio.h> header file.

View Source
const HAVE_STDLIB_H = 1

Define to 1 if you have the <stdlib.h> header file.

View Source
const HAVE_STD_ATOMIC = 1

Has stdatomic.h with atomic_int and atomic_uintptr_t

View Source
const HAVE_STRFTIME = 1

Define to 1 if you have the 'strftime' function.

View Source
const HAVE_STRINGS_H = 1

Define to 1 if you have the <strings.h> header file.

View Source
const HAVE_STRING_H = 1

Define to 1 if you have the <string.h> header file.

View Source
const HAVE_STRLCPY = 1

Define to 1 if you have the 'strlcpy' function.

View Source
const HAVE_STRSIGNAL = 1

Define to 1 if you have the 'strsignal' function.

View Source
const HAVE_STRUCT_PASSWD_PW_GECOS = 1

Define to 1 if 'pw_gecos' is a member of 'struct passwd'.

View Source
const HAVE_STRUCT_PASSWD_PW_PASSWD = 1

Define to 1 if 'pw_passwd' is a member of 'struct passwd'.

View Source
const HAVE_STRUCT_STAT_ST_BIRTHTIME = 1

Define to 1 if 'st_birthtime' is a member of 'struct stat'.

View Source
const HAVE_STRUCT_STAT_ST_BLKSIZE = 1

Define to 1 if 'st_blksize' is a member of 'struct stat'.

View Source
const HAVE_STRUCT_STAT_ST_BLOCKS = 1

Define to 1 if 'st_blocks' is a member of 'struct stat'.

View Source
const HAVE_STRUCT_STAT_ST_FLAGS = 1

Define to 1 if 'st_flags' is a member of 'struct stat'.

View Source
const HAVE_STRUCT_STAT_ST_GEN = 1

Define to 1 if 'st_gen' is a member of 'struct stat'.

View Source
const HAVE_STRUCT_STAT_ST_RDEV = 1

Define to 1 if 'st_rdev' is a member of 'struct stat'.

View Source
const HAVE_STRUCT_TM_TM_ZONE = 1

Define to 1 if 'tm_zone' is a member of 'struct tm'.

View Source
const HAVE_SYMLINK = 1

Define if you have the 'symlink' function.

View Source
const HAVE_SYMLINKAT = 1

Define to 1 if you have the 'symlinkat' function.

View Source
const HAVE_SYNC = 1

Define to 1 if you have the 'sync' function.

View Source
const HAVE_SYSCONF = 1

Define to 1 if you have the 'sysconf' function.

View Source
const HAVE_SYSCTLBYNAME = 1

Define to 1 if you have the 'sysctlbyname' function.

View Source
const HAVE_SYSEXITS_H = 1

Define to 1 if you have the <sysexits.h> header file.

View Source
const HAVE_SYSLOG_H = 1

Define to 1 if you have the <syslog.h> header file.

View Source
const HAVE_SYSTEM = 1

Define to 1 if you have the 'system' function.

View Source
const HAVE_SYS_EVENT_H = 1

Define to 1 if you have the <sys/event.h> header file.

View Source
const HAVE_SYS_FILE_H = 1

Define to 1 if you have the <sys/file.h> header file.

View Source
const HAVE_SYS_IOCTL_H = 1

Define to 1 if you have the <sys/ioctl.h> header file.

View Source
const HAVE_SYS_KERN_CONTROL_H = 1

Define to 1 if you have the <sys/kern_control.h> header file.

View Source
const HAVE_SYS_LOCK_H = 1

Define to 1 if you have the <sys/lock.h> header file.

View Source
const HAVE_SYS_MMAN_H = 1

Define to 1 if you have the <sys/mman.h> header file.

View Source
const HAVE_SYS_PARAM_H = 1

Define to 1 if you have the <sys/param.h> header file.

View Source
const HAVE_SYS_POLL_H = 1

Define to 1 if you have the <sys/poll.h> header file.

View Source
const HAVE_SYS_RANDOM_H = 1

Define to 1 if you have the <sys/random.h> header file.

View Source
const HAVE_SYS_RESOURCE_H = 1

Define to 1 if you have the <sys/resource.h> header file.

View Source
const HAVE_SYS_SELECT_H = 1

Define to 1 if you have the <sys/select.h> header file.

View Source
const HAVE_SYS_SOCKET_H = 1

Define to 1 if you have the <sys/socket.h> header file.

View Source
const HAVE_SYS_STATVFS_H = 1

Define to 1 if you have the <sys/statvfs.h> header file.

View Source
const HAVE_SYS_STAT_H = 1

Define to 1 if you have the <sys/stat.h> header file.

View Source
const HAVE_SYS_SYSCALL_H = 1

Define to 1 if you have the <sys/syscall.h> header file.

View Source
const HAVE_SYS_SYSCTL_H = 1

Define to 1 if you have the <sys/sysctl.h> header file.

View Source
const HAVE_SYS_SYS_DOMAIN_H = 1

Define to 1 if you have the <sys/sys_domain.h> header file.

View Source
const HAVE_SYS_TIMES_H = 1

Define to 1 if you have the <sys/times.h> header file.

View Source
const HAVE_SYS_TIME_H = 1

Define to 1 if you have the <sys/time.h> header file.

View Source
const HAVE_SYS_TYPES_H = 1

Define to 1 if you have the <sys/types.h> header file.

View Source
const HAVE_SYS_UIO_H = 1

Define to 1 if you have the <sys/uio.h> header file.

View Source
const HAVE_SYS_UN_H = 1

Define to 1 if you have the <sys/un.h> header file.

View Source
const HAVE_SYS_UTSNAME_H = 1

Define to 1 if you have the <sys/utsname.h> header file.

View Source
const HAVE_SYS_WAIT_H = 1

Define to 1 if you have the <sys/wait.h> header file.

View Source
const HAVE_SYS_XATTR_H = 1

Define to 1 if you have the <sys/xattr.h> header file.

View Source
const HAVE_TCGETPGRP = 1

Define to 1 if you have the 'tcgetpgrp' function.

View Source
const HAVE_TCSETPGRP = 1

Define to 1 if you have the 'tcsetpgrp' function.

View Source
const HAVE_TEMPNAM = 1

Define to 1 if you have the 'tempnam' function.

View Source
const HAVE_TERMIOS_H = 1

Define to 1 if you have the <termios.h> header file.

View Source
const HAVE_TERM_H = 1

Define to 1 if you have the <term.h> header file.

View Source
const HAVE_TIMEGM = 1

Define to 1 if you have the 'timegm' function.

View Source
const HAVE_TIMES = 1

Define to 1 if you have the 'times' function.

View Source
const HAVE_TMPFILE = 1

Define to 1 if you have the 'tmpfile' function.

View Source
const HAVE_TMPNAM = 1

Define to 1 if you have the 'tmpnam' function.

View Source
const HAVE_TM_ZONE = 1

Define to 1 if your 'struct tm' has 'tm_zone'. Deprecated, use 'HAVE_STRUCT_TM_TM_ZONE' instead.

View Source
const HAVE_TRUNCATE = 1

Define to 1 if you have the 'truncate' function.

View Source
const HAVE_TTYNAME_R = 1

Define to 1 if you have the 'ttyname_r' function.

View Source
const HAVE_UMASK = 1

Define to 1 if you have the 'umask' function.

View Source
const HAVE_UNAME = 1

Define to 1 if you have the 'uname' function.

View Source
const HAVE_UNISTD_H = 1

Define to 1 if you have the <unistd.h> header file.

View Source
const HAVE_UNLINKAT = 1

Define to 1 if you have the 'unlinkat' function.

View Source
const HAVE_UNLOCKPT = 1

Define to 1 if you have the 'unlockpt' function.

View Source
const HAVE_UTIL_H = 1

Define to 1 if you have the <util.h> header file.

View Source
const HAVE_UTIMENSAT = 1

Define to 1 if you have the 'utimensat' function.

View Source
const HAVE_UTIMES = 1

Define to 1 if you have the 'utimes' function.

View Source
const HAVE_UTIME_H = 1

Define to 1 if you have the <utime.h> header file.

View Source
const HAVE_UTMP_H = 1

Define to 1 if you have the <utmp.h> header file.

View Source
const HAVE_UT_NAMESIZE = 1

Define if you have the 'HAVE_UT_NAMESIZE' constant.

View Source
const HAVE_UUID_UUID_H = 1

Define to 1 if you have the <uuid/uuid.h> header file.

View Source
const HAVE_VFORK = 1

Define to 1 if you have the 'vfork' function.

View Source
const HAVE_WAIT = 1

Define to 1 if you have the 'wait' function.

View Source
const HAVE_WAIT3 = 1

Define to 1 if you have the 'wait3' function.

View Source
const HAVE_WAIT4 = 1

Define to 1 if you have the 'wait4' function.

View Source
const HAVE_WAITID = 1

Define to 1 if you have the 'waitid' function.

View Source
const HAVE_WAITPID = 1

Define to 1 if you have the 'waitpid' function.

View Source
const HAVE_WCHAR_H = 1

Define if the compiler provides a wchar.h header file.

View Source
const HAVE_WCSCOLL = 1

Define to 1 if you have the 'wcscoll' function.

View Source
const HAVE_WCSFTIME = 1

Define to 1 if you have the 'wcsftime' function.

View Source
const HAVE_WCSXFRM = 1

Define to 1 if you have the 'wcsxfrm' function.

View Source
const HAVE_WMEMCMP = 1

Define to 1 if you have the 'wmemcmp' function.

View Source
const HAVE_WORKING_TZSET = 1

Define if tzset() actually switches the local timezone in a meaningful way.

View Source
const HAVE_WRITEV = 1

Define to 1 if you have the 'writev' function.

View Source
const HAVE_ZLIB_COPY = 1

Define if the zlib library has inflateCopy

View Source
const HAVE___UINT128_T = 1

Define to 1 if the system has the type '__uint128_t'.

View Source
const LLGoPackage = "link: $LLGO_LIB_PYTHON; $(pkg-config --libs python3-embed)"
View Source
const MATH_E = 2.718281828459045
View Source
const MATH_PI = 3.141592653589793
View Source
const MAX_CO_EXTRA_USERS = 255

This limitation is for performance and simplicity. If needed it can be removed (with effort).

View Source
const METH_COEXIST = 64
View Source
const METH_FASTCALL = 128
View Source
const METH_METHOD = 512
View Source
const METH_STACKLESS = 0
View Source
const MVWDELCH_IS_EXPRESSION = 1

Define if mvwdelch in curses.h is an expression.

View Source
const ModGil = 4
View Source
const ModMultipleInterpreters = 3
View Source
const PRINT_RAW = 1

Flag bits for printing:

View Source
const PTHREAD_SYSTEM_SCHED_SUPPORTED = 1

Defined if PTHREAD_SCOPE_SYSTEM supported.

View Source
const PYLONG_BITS_IN_DIGIT = 30
View Source
const REMOTE_DEBUG = 1

Define if you want to enable remote debugging support.

View Source
const RL_STARTUP_HOOK_TAKES_ARGS = 1

Define if rl_startup_hook takes arguments

View Source
const SIZEOF_DOUBLE = 8

The size of 'double', as computed by sizeof.

View Source
const SIZEOF_FLOAT = 4

The size of 'float', as computed by sizeof.

View Source
const SIZEOF_FPOS_T = 8

The size of 'fpos_t', as computed by sizeof.

View Source
const SIZEOF_INT = 4

The size of 'int', as computed by sizeof.

View Source
const SIZEOF_LONG = 8

The size of 'long', as computed by sizeof.

View Source
const SIZEOF_LONG_DOUBLE = 8

The size of 'long double', as computed by sizeof.

View Source
const SIZEOF_LONG_LONG = 8

The size of 'long long', as computed by sizeof.

View Source
const SIZEOF_OFF_T = 8

The size of 'off_t', as computed by sizeof.

View Source
const SIZEOF_PID_T = 4

The size of 'pid_t', as computed by sizeof.

View Source
const SIZEOF_PTHREAD_KEY_T = 8

The size of 'pthread_key_t', as computed by sizeof.

View Source
const SIZEOF_PTHREAD_T = 8

The size of 'pthread_t', as computed by sizeof.

View Source
const SIZEOF_PY_HASH_T = 8

Py_hash_t is the same size as a pointer.

View Source
const SIZEOF_PY_UHASH_T = 8

Py_uhash_t is the unsigned equivalent needed to calculate numeric hash.

View Source
const SIZEOF_SHORT = 2

The size of 'short', as computed by sizeof.

View Source
const SIZEOF_SIZE_T = 8

The size of 'size_t', as computed by sizeof.

View Source
const SIZEOF_TIME_T = 8

The size of 'time_t', as computed by sizeof.

View Source
const SIZEOF_UINTPTR_T = 8

The size of 'uintptr_t', as computed by sizeof.

View Source
const SIZEOF_VOID_P = 8

The size of 'void *', as computed by sizeof.

View Source
const SIZEOF_WCHAR_T = 4

The size of 'wchar_t', as computed by sizeof.

View Source
const SIZEOF__BOOL = 1

The size of '_Bool', as computed by sizeof.

View Source
const SQLITE_ENABLE_LOAD_EXTENSION = 1

Define to 1 to build the sqlite module with loadable extensions support.

View Source
const SQLITE_HAVE_SERIALIZE = 1

Define if SQLite was compiled with the serialize API

View Source
const SSL_DEFAULT_CIPHERS = 1

Default cipher suites list for ssl module. 1: Python's preferred selection, 2: leave OpenSSL defaults untouched, 0: custom string

View Source
const STDC_HEADERS = 1

Define to 1 if you have the ANSI C header files.

View Source
const STDIOTEXTMODE = "b"
View Source
const SUPPORT_TIER = 1

PEP 11 Support tier (1, 2, 3 or 0 for unsupported)

View Source
const SYS_SELECT_WITH_SYS_TIME = 1

Define if you can safely include both <sys/select.h> and <sys/time.h> (which you can't on SCO ODT 3.0).

View Source
const Set_MINSIZE = 8
View Source
const THREAD_STACK_SIZE = 16777216

Custom thread stack size depending on chosen sanitizer runtimes.

View Source
const TPFLAGS_DEFAULT = 0
View Source
const TPFLAGS_HAVE_STACKLESS_EXTENSION = 0
View Source
const TPFLAGS_INLINE_VALUES = 4

The values array is placed inline directly after the rest of the object. Implies Py_TPFLAGS_HAVE_GC.

View Source
const TPFLAGS_MANAGED_DICT = 16

Placement of dict (and values) pointers are managed by the VM, not by the type. The VM will automatically set tp_dictoffset. Implies Py_TPFLAGS_HAVE_GC.

View Source
const TPFLAGS_MANAGED_WEAKREF = 8

Placement of weakref pointers are managed by the VM, not by the type. The VM will automatically set tp_weaklistoffset.

View Source
const TPFLAGS_MAPPING = 64

Set if instances of the type object are treated as mappings for pattern matching

View Source
const TPFLAGS_PREHEADER = 24
View Source
const TPFLAGS_SEQUENCE = 32

Set if instances of the type object are treated as sequences for pattern matching

View Source
const T_BOOL = 14

Added by Lillo: bools contained in the structure (assumed char)

View Source
const T_STRING_INPLACE = 13

Added by Jack: strings contained in the structure

View Source
const TpFinalize = 80

New in 3.5

View Source
const TpToken = 83

New in 3.14

View Source
const TpVectorcall = 82

New in 3.14

View Source
const UNICODE_SIZE = 4
View Source
const VERSION = "3.14.8"

Version as a string

View Source
const WINDOW_HAS_FLAGS = 1

Define if WINDOW in curses.h offers a field _flags.

View Source
const WITH_DECIMAL_CONTEXTVAR = 1

Define if you want build the _decimal module using a coroutine-local rather than a thread-local context

View Source
const WITH_DOC_STRINGS = 1

Define if you want documentation strings in extension modules

View Source
const WITH_DTRACE = 1

Define if you want to compile in DTrace support

View Source
const WITH_DYLD = 1

Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic linker (dyld) instead of the old-style (NextStep) dynamic linker (rld). Dyld is necessary to support frameworks.

View Source
const WITH_EDITLINE = 1

Define to build the readline module against libedit.

View Source
const WITH_MIMALLOC = 1

Define if you want to compile in mimalloc memory allocator.

View Source
const WITH_NEXT_FRAMEWORK = 1

Define if you want to produce an OpenStep/Rhapsody framework (shared library plus accessory files).

View Source
const WITH_PYMALLOC = 1

Define if you want to compile in Python-specific mallocs

View Source
const WrapperFlag_KEYWORDS = 1

Flags for above struct

View Source
const XGoPackage = true
View Source
const X_ALL_SOURCE = 1
View Source
const X_ATTR_CACHE_UNUSED = 30000

(see tp_versions_used)

View Source
const X_DARWIN_C_SOURCE = 1
View Source
const X_DATA_STACK_CHUNK_SIZE = 16384

Minimum size of data stack chunk

View Source
const X_FFI_SUPPORT_C_COMPLEX = 1

Defined if _Complex C type can be used with libffi.

View Source
const X_FILE_OFFSET_BITS = 64

This must be set to 64 on some systems to enable large file support.

View Source
const X_GNU_SOURCE = 1
View Source
const X_HPUX_ALT_XOPEN_SOCKET_API = 1
View Source
const X_InterpreterConfig_LEGACY_CHECK_MULTI_INTERP_EXTENSIONS = 0
View Source
const X_LARGEFILE_SOURCE = 1

This must be defined on some systems to enable large file support.

View Source
const X_MAX_SCRIPT_PATH_SIZE = 512

Remote debugger support

View Source
const X_NETBSD_SOURCE = 1
View Source
const X_OPENBSD_SOURCE = 1
View Source
const X_PARSE_PID = "i"
View Source
const X_POSIX_PTHREAD_SEMANTICS = 1
View Source
const X_PYTHONFRAMEWORK = "Python"

framework name

View Source
const X_PYTHREAD_NAME_MAXLEN = 63

Maximum length in bytes of a thread name

View Source
const X_REENTRANT = 1

Define to force use of thread-safe errno, h_errno, and other functions

View Source
const X_STACK_GROWS_DOWN = 1

Define to 1 if the machine stack grows down (default); 0 if it grows up.

View Source
const X_TANDEM_SOURCE = 1
View Source
const X_TPFLAGS_STATIC_BUILTIN = 2

Track types initialized using _PyStaticType_InitBuiltin().

View Source
const X_USE_GCC_BUILTIN_ATOMICS = 1
View Source
const X__BSD_VISIBLE = 1

Define on FreeBSD to activate all library features

View Source
const X__EXTENSIONS__ = 1
View Source
const X__STDC_WANT_IEC_60559_ATTRIBS_EXT__ = 1
View Source
const X__STDC_WANT_IEC_60559_BFP_EXT__ = 1
View Source
const X__STDC_WANT_IEC_60559_DFP_EXT__ = 1
View Source
const X__STDC_WANT_IEC_60559_EXT__ = 1
View Source
const X__STDC_WANT_IEC_60559_FUNCS_EXT__ = 1
View Source
const X__STDC_WANT_IEC_60559_TYPES_EXT__ = 1
View Source
const X__STDC_WANT_LIB_EXT2__ = 1
View Source
const X__STDC_WANT_MATH_SPEC_FUNCS__ = 1
View Source
const X_modLAST_SLOT = 4

Variables

View Source
var BytesWarningFlag c.Int
View Source
var DebugFlag c.Int
View Source
var DontWriteBytecodeFlag c.Int
View Source
var FileSystemDefaultEncodeErrors *c.Char
View Source
var FileSystemDefaultEncoding *c.Char

The default encoding used by the platform file system APIs If non-NULL, this is different than the default encoding for strings

View Source
var FrozenFlag c.Int
View Source
var HasFileSystemDefaultEncoding c.Int
View Source
var HashRandomizationFlag c.Int
View Source
var Hexdigits *c.Char
View Source
var IgnoreEnvironmentFlag c.Int
View Source
var InspectFlag c.Int
View Source
var InteractiveFlag c.Int
View Source
var IsolatedFlag c.Int
View Source
var NoSiteFlag c.Int
View Source
var NoUserSiteDirectory c.Int
View Source
var OS_InputHook func() c.Int

Stuff with no proper home (yet)

View Source
var OS_ReadlineFunctionPointer func(_llcppg_param1 *c.FILE, _llcppg_param2 *c.FILE, _llcppg_param3 *c.Char) *c.Char
View Source
var OptimizeFlag c.Int
View Source
var QuietFlag c.Int
View Source
var StructSequenceUnnamedField *c.Char
View Source
var TIMEOUT_MAX c.LongLong

PY_TIMEOUT_MAX is the highest usable value (in microseconds) of PY_TIMEOUT_T type, and depends on the system threading API.

NOTE: this isn't the same value as `_thread.TIMEOUT_MAX`. The _thread module exposes a higher-level API, with timeouts expressed in seconds and floating-point numbers allowed.

View Source
var UTF8Mode c.Int
View Source
var UnbufferedStdioFlag c.Int
View Source
var VerboseFlag c.Int
View Source
var Version c.Ulong
View Source
var X_ByteArrayEmptyString *c.Char
View Source
var X_asciiWhitespace *uint8

Helper array used by Py_UNICODE_ISSPACE().

View Source
var X_ctypeTable [256]c.Uint
View Source
var X_ctypeTolower [256]uint8
View Source
var X_ctypeToupper [256]uint8

Functions

func AIterCheck added in v0.2.1

func AIterCheck(_llcppg_param1 *Object) c.Int

Returns non-zero if the object 'obj' provides AsyncIterator protocols, and 0 otherwise.

This function always succeeds.

func AddPendingCall added in v0.2.0

func AddPendingCall(func_ func(_llcppg_param1 unsafe.Pointer) c.Int, arg unsafe.Pointer) c.Int

func ArgParse added in v0.2.1

func ArgParse(_llcppg_param1 *Object, _llcppg_param2 *c.Char, __llgo_va_list ...any) c.Int

func ArgParseTuple added in v0.2.1

func ArgParseTuple(_llcppg_param1 *Object, _llcppg_param2 *c.Char, __llgo_va_list ...any) c.Int

func ArgParseTupleAndKeywords added in v0.2.1

func ArgParseTupleAndKeywords(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *c.Char, _llcppg_param4 **c.Char, __llgo_va_list ...any) c.Int

func ArgUnpackTuple added in v0.2.1

func ArgUnpackTuple(_llcppg_param1 *Object, _llcppg_param2 *c.Char, _llcppg_param3 SsizeT, _llcppg_param4 SsizeT, __llgo_va_list ...any) c.Int

func ArgVaParse added in v0.2.1

func ArgVaParse(_llcppg_param1 *Object, _llcppg_param2 *c.Char, _llcppg_param3 c.VaList) c.Int

func ArgVaParseTupleAndKeywords added in v0.2.1

func ArgVaParseTupleAndKeywords(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *c.Char, _llcppg_param4 **c.Char, _llcppg_param5 c.VaList) c.Int

func ArgValidateKeywordArguments added in v0.2.1

func ArgValidateKeywordArguments(_llcppg_param1 *Object) c.Int

func AtExit added in v0.2.0

func AtExit(func_ func()) c.Int

Py_PyAtExit is for the atexit module, Py_AtExit is for low-level exit functions.

func BufferFillContiguousStrides added in v0.2.0

func BufferFillContiguousStrides(ndims c.Int, shape *SsizeT, strides *SsizeT, itemsize c.Int, fort c.Char)

Fill the strides array with byte-strides of a contiguous (Fortran-style if fort is 'F' or C-style otherwise) array of the given shape with the given number of bytes per element.

func BufferFromContiguous added in v0.2.3

func BufferFromContiguous(view *Buffer, buf unsafe.Pointer, len SsizeT, order c.Char) c.Int

func BufferToContiguous added in v0.2.0

func BufferToContiguous(buf unsafe.Pointer, view *Buffer, len SsizeT, order c.Char) c.Int

Implementation in memoryobject.c

func BytesConcat added in v0.2.0

func BytesConcat(_llcppg_param1 **Object, _llcppg_param2 *Object)

func BytesConcatAndDel added in v0.2.0

func BytesConcatAndDel(_llcppg_param1 **Object, _llcppg_param2 *Object)

func BytesMain added in v0.2.0

func BytesMain(argc c.Int, argv **c.Char) c.Int

func CallableCheck added in v0.2.3

func CallableCheck(_llcppg_param1 *Object) c.Int

func CapsuleGetContext added in v0.2.3

func CapsuleGetContext(capsule *Object) unsafe.Pointer

func CapsuleGetName added in v0.2.3

func CapsuleGetName(capsule *Object) *c.Char

func CapsuleGetPointer added in v0.2.3

func CapsuleGetPointer(capsule *Object, name *c.Char) unsafe.Pointer

func CapsuleImport added in v0.2.0

func CapsuleImport(name *c.Char, no_block c.Int) unsafe.Pointer

func CapsuleIsValid added in v0.2.3

func CapsuleIsValid(capsule *Object, name *c.Char) c.Int

func CapsuleSetContext added in v0.2.3

func CapsuleSetContext(capsule *Object, context unsafe.Pointer) c.Int

func CapsuleSetDestructor added in v0.2.3

func CapsuleSetDestructor(capsule *Object, destructor CapsuleDestructor) c.Int

func CapsuleSetName added in v0.2.3

func CapsuleSetName(capsule *Object, name *c.Char) c.Int

func CapsuleSetPointer added in v0.2.3

func CapsuleSetPointer(capsule *Object, pointer unsafe.Pointer) c.Int

func CodeAddWatcher added in v0.2.0

func CodeAddWatcher(callback CodeWatchCallback) c.Int

Register a per-interpreter callback that will be invoked for code object lifecycle events.

Returns a handle that may be passed to PyCode_ClearWatcher on success, or -1 and sets an error if no more handles are available.

func CodeClearWatcher added in v0.2.0

func CodeClearWatcher(watcher_id c.Int) c.Int

Clear the watcher associated with the watcher_id handle.

Returns 0 on success or -1 if no watcher exists for the provided id.

func CodecKnownEncoding added in v0.2.0

func CodecKnownEncoding(encoding *c.Char) c.Int

func CodecRegister added in v0.2.3

func CodecRegister(search_function *Object) c.Int

func CodecRegisterError added in v0.2.0

func CodecRegisterError(name *c.Char, error *Object) c.Int

Register the error handling callback function error under the given name. This function will be called by the codec when it encounters unencodable characters/undecodable bytes and doesn't know the callback name, when name is specified as the error parameter in the call to the encode/decode function. Return 0 on success, -1 on error

func CodecUnregister added in v0.2.3

func CodecUnregister(search_function *Object) c.Int

func CompileOpcodeStackEffect added in v0.2.0

func CompileOpcodeStackEffect(opcode c.Int, oparg c.Int) c.Int

func CompileOpcodeStackEffectWithJump added in v0.2.0

func CompileOpcodeStackEffectWithJump(opcode c.Int, oparg c.Int, jump c.Int) c.Int

func ConfigGetInt added in v0.2.0

func ConfigGetInt(name *c.Char, value *c.Int) c.Int

func ConfigSet added in v0.2.0

func ConfigSet(name *c.Char, value *Object) c.Int

func ContextAddWatcher added in v0.2.0

func ContextAddWatcher(callback ContextWatchCallback) c.Int

Register a per-interpreter callback that will be invoked for context object enter/exit events.

Returns a handle that may be passed to PyContext_ClearWatcher on success, or -1 and sets and error if no more handles are available.

func ContextClearWatcher added in v0.2.0

func ContextClearWatcher(watcher_id c.Int) c.Int

Clear the watcher associated with the watcher_id handle.

Returns 0 on success or -1 if no watcher exists for the provided id.

func DecRef added in v0.2.0

func DecRef(_llcppg_param1 *Object)

func DecodeLocale added in v0.2.0

func DecodeLocale(arg *c.Char, size *c.SizeT) *c.WcharT

func DictAddWatcher added in v0.2.0

func DictAddWatcher(callback DictWatchCallback) c.Int

Register/unregister a dict-watcher callback

func DictClearWatcher added in v0.2.0

func DictClearWatcher(watcher_id c.Int) c.Int

func DictUnwatch added in v0.2.0

func DictUnwatch(watcher_id c.Int, dict *Object) c.Int

func DictWatch added in v0.2.0

func DictWatch(watcher_id c.Int, dict *Object) c.Int

Mark given dictionary as "watched" (callback will be called if it is modified)

func EncodeLocale added in v0.2.0

func EncodeLocale(text *c.WcharT, error_pos *c.SizeT) *c.Char

func EndInterpreter added in v0.2.0

func EndInterpreter(_llcppg_param1 *ThreadState)

func EnterRecursiveCall added in v0.2.0

func EnterRecursiveCall(where *c.Char) c.Int

func ErrBadArgument added in v0.2.0

func ErrBadArgument() c.Int

func ErrBadInternalCall added in v0.2.0

func ErrBadInternalCall()

Export the old function so that the existing API remains available:

func ErrCheckSignals added in v0.2.0

func ErrCheckSignals() c.Int

In signalmodule.c

func ErrClear added in v0.2.0

func ErrClear()

func ErrDisplay added in v0.2.1

func ErrDisplay(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object)

func ErrDisplayException added in v0.2.1

func ErrDisplayException(_llcppg_param1 *Object)

func ErrExceptionMatches added in v0.2.1

func ErrExceptionMatches(_llcppg_param1 *Object) c.Int

func ErrFetch added in v0.2.0

func ErrFetch(_llcppg_param1 **Object, _llcppg_param2 **Object, _llcppg_param3 **Object)

func ErrFormatUnraisable added in v0.2.0

func ErrFormatUnraisable(_llcppg_param1 *c.Char, __llgo_va_list ...any)

func ErrGetExcInfo added in v0.2.0

func ErrGetExcInfo(_llcppg_param1 **Object, _llcppg_param2 **Object, _llcppg_param3 **Object)

func ErrGivenExceptionMatches added in v0.2.1

func ErrGivenExceptionMatches(_llcppg_param1 *Object, _llcppg_param2 *Object) c.Int

Error testing and normalization

func ErrNormalizeException added in v0.2.0

func ErrNormalizeException(_llcppg_param1 **Object, _llcppg_param2 **Object, _llcppg_param3 **Object)

func ErrPrint added in v0.2.0

func ErrPrint()

func ErrPrintEx added in v0.2.0

func ErrPrintEx(_llcppg_param1 c.Int)

func ErrRangedSyntaxLocationObject added in v0.2.1

func ErrRangedSyntaxLocationObject(filename *Object, lineno c.Int, col_offset c.Int, end_lineno c.Int, end_col_offset c.Int)

func ErrResourceWarning added in v0.2.1

func ErrResourceWarning(source *Object, stack_level SsizeT, format *c.Char, __llgo_va_list ...any) c.Int

Emit a ResourceWarning warning

func ErrRestore added in v0.2.1

func ErrRestore(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object)

func ErrSetExcInfo added in v0.2.1

func ErrSetExcInfo(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object)

func ErrSetHandledException added in v0.2.1

func ErrSetHandledException(_llcppg_param1 *Object)

func ErrSetInterrupt added in v0.2.0

func ErrSetInterrupt()

func ErrSetInterruptEx added in v0.2.0

func ErrSetInterruptEx(signum c.Int) c.Int

func ErrSetNone added in v0.2.1

func ErrSetNone(_llcppg_param1 *Object)

func ErrSetObject added in v0.2.1

func ErrSetObject(_llcppg_param1 *Object, _llcppg_param2 *Object)

func ErrSetRaisedException added in v0.2.1

func ErrSetRaisedException(_llcppg_param1 *Object)

func ErrSetString added in v0.2.1

func ErrSetString(exception *Object, string *c.Char)

func ErrSyntaxLocation added in v0.2.0

func ErrSyntaxLocation(filename *c.Char, lineno c.Int)

Support for adding program text to SyntaxErrors

func ErrSyntaxLocationEx added in v0.2.0

func ErrSyntaxLocationEx(filename *c.Char, lineno c.Int, col_offset c.Int)

func ErrSyntaxLocationObject added in v0.2.1

func ErrSyntaxLocationObject(filename *Object, lineno c.Int, col_offset c.Int)

func ErrWarnEx added in v0.2.1

func ErrWarnEx(category *Object, message *c.Char, stack_level SsizeT) c.Int

func ErrWarnExplicit added in v0.2.1

func ErrWarnExplicit(category *Object, message *c.Char, filename *c.Char, lineno c.Int, module *c.Char, registry *Object) c.Int

func ErrWarnExplicitFormat added in v0.2.1

func ErrWarnExplicitFormat(category *Object, filename *c.Char, lineno c.Int, module *c.Char, registry *Object, format *c.Char, __llgo_va_list ...any) c.Int

func ErrWarnExplicitObject added in v0.2.1

func ErrWarnExplicitObject(category *Object, message *Object, filename *Object, lineno c.Int, module *Object, registry *Object) c.Int

func ErrWarnFormat added in v0.2.1

func ErrWarnFormat(category *Object, stack_level SsizeT, format *c.Char, __llgo_va_list ...any) c.Int

func ErrWriteUnraisable added in v0.2.1

func ErrWriteUnraisable(_llcppg_param1 *Object)

func EvalAcquireThread added in v0.2.1

func EvalAcquireThread(tstate *ThreadState)

func EvalGetFuncDesc added in v0.2.1

func EvalGetFuncDesc(_llcppg_param1 *Object) *c.Char

func EvalGetFuncName added in v0.2.1

func EvalGetFuncName(_llcppg_param1 *Object) *c.Char

func EvalInitThreads added in v0.2.0

func EvalInitThreads()

func EvalMergeCompilerFlags added in v0.2.1

func EvalMergeCompilerFlags(cf *CompilerFlags) c.Int

Look at the current frame's (if any) code's co_flags, and turn on the corresponding compiler flags in cf->cf_flags. Return 1 if any flag was set, else return 0.

func EvalReleaseThread added in v0.2.1

func EvalReleaseThread(tstate *ThreadState)

func EvalRestoreThread added in v0.2.1

func EvalRestoreThread(_llcppg_param1 *ThreadState)

func EvalSetProfile added in v0.2.0

func EvalSetProfile(_llcppg_param1 Tracefunc, _llcppg_param2 *Object)

func EvalSetProfileAllThreads added in v0.2.0

func EvalSetProfileAllThreads(_llcppg_param1 Tracefunc, _llcppg_param2 *Object)

func EvalSetTrace added in v0.2.0

func EvalSetTrace(_llcppg_param1 Tracefunc, _llcppg_param2 *Object)

func EvalSetTraceAllThreads added in v0.2.0

func EvalSetTraceAllThreads(_llcppg_param1 Tracefunc, _llcppg_param2 *Object)

func ExceptionClassName added in v0.2.3

func ExceptionClassName(_llcppg_param1 *Object) *c.Char

func ExceptionSetArgs added in v0.2.3

func ExceptionSetArgs(_llcppg_param1 *Object, _llcppg_param2 *Object)

func ExceptionSetCause added in v0.2.3

func ExceptionSetCause(_llcppg_param1 *Object, _llcppg_param2 *Object)

func ExceptionSetContext added in v0.2.3

func ExceptionSetContext(_llcppg_param1 *Object, _llcppg_param2 *Object)

func ExceptionSetTraceback added in v0.2.3

func ExceptionSetTraceback(_llcppg_param1 *Object, _llcppg_param2 *Object) c.Int

Traceback manipulation (PEP 3134)

func Exit added in v0.2.0

func Exit(_llcppg_param1 c.Int)

func ExitStatusException added in v0.2.0

func ExitStatusException(err Status)

func FatalError added in v0.2.0

func FatalError(message *c.Char)

Defined in Python/pylifecycle.c

The Py_FatalError() function is replaced with a macro which logs automatically the name of the current function, unless the Py_LIMITED_API macro is defined.

func Fclose added in v0.2.0

func Fclose(file *c.FILE) c.Int

func FdIsInteractive added in v0.2.0

func FdIsInteractive(_llcppg_param1 *c.FILE, _llcppg_param2 *c.Char) c.Int

func FileSetOpenCodeHook added in v0.2.0

func FileSetOpenCodeHook(hook OpenCodeHookFunction, userData unsafe.Pointer) c.Int

func FileWriteObject added in v0.2.3

func FileWriteObject(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 c.Int) c.Int

func FileWriteString added in v0.2.0

func FileWriteString(_llcppg_param1 *c.Char, _llcppg_param2 *Object) c.Int

func Finalize added in v0.2.0

func Finalize()

func FinalizeEx added in v0.2.0

func FinalizeEx() c.Int

func FloatGetMax added in v0.2.0

func FloatGetMax() c.Double

func FloatGetMin added in v0.2.0

func FloatGetMin() c.Double

func FloatPack2 added in v0.2.0

func FloatPack2(x c.Double, p *c.Char, le c.Int) c.Int

func FloatPack4 added in v0.2.0

func FloatPack4(x c.Double, p *c.Char, le c.Int) c.Int

func FloatPack8 added in v0.2.0

func FloatPack8(x c.Double, p *c.Char, le c.Int) c.Int

func FloatUnpack2 added in v0.2.0

func FloatUnpack2(p *c.Char, le c.Int) c.Double

func FloatUnpack4 added in v0.2.0

func FloatUnpack4(p *c.Char, le c.Int) c.Double

func FloatUnpack8 added in v0.2.0

func FloatUnpack8(p *c.Char, le c.Int) c.Double

func Fopen added in v0.2.0

func Fopen(path *Object, mode *c.Char) *c.FILE

func FrozenMain added in v0.2.0

func FrozenMain(argc c.Int, argv **c.Char) c.Int

Py_FrozenMain is kept out of the Limited API until documented and present in all builds of Python

func FunctionAddWatcher added in v0.2.0

func FunctionAddWatcher(callback FunctionWatchCallback) c.Int

Register a per-interpreter callback that will be invoked for function lifecycle events.

Returns a handle that may be passed to PyFunction_ClearWatcher on success, or -1 and sets an error if no more handles are available.

func FunctionClearWatcher added in v0.2.0

func FunctionClearWatcher(watcher_id c.Int) c.Int

Clear the watcher associated with the watcher_id handle.

Returns 0 on success or -1 if no watcher exists for the supplied id.

func GC_Disable added in v0.2.0

func GC_Disable() c.Int

func GC_Enable added in v0.2.0

func GC_Enable() c.Int

C API for controlling the state of the garbage collector

func GC_IsEnabled added in v0.2.0

func GC_IsEnabled() c.Int

func GETENV added in v0.2.0

func GETENV(name *c.Char) *c.Char

this is a wrapper around getenv() that pays attention to Py_IgnoreEnvironmentFlag. It should be used for getting variables like PYTHONPATH and PYTHONHOME from the environment

func GILStateCheck added in v0.2.0

func GILStateCheck() c.Int

Helper/diagnostic function - return 1 if the current thread currently holds the GIL, 0 otherwise.

The function returns 1 if _PyGILState_check_enabled is non-zero.

func GILStateRelease added in v0.2.3

func GILStateRelease(_llcppg_param1 GILState_STATE)

Release any resources previously acquired. After this call, Python's state will be the same as it was prior to the corresponding PyGILState_Ensure() call (but generally this state will be unknown to the caller, hence the use of the GILState API.)

Every call to PyGILState_Ensure must be matched by a call to PyGILState_Release on the same thread.

func GetArgcArgv added in v0.2.0

func GetArgcArgv(argc *c.Int, argv ***c.WcharT)

Get the original command line arguments, before Python modified them.

See also PyConfig.orig_argv.

func GetBuildInfo added in v0.2.0

func GetBuildInfo() *c.Char

func GetCompiler added in v0.2.0

func GetCompiler() *c.Char

func GetCopyright added in v0.2.0

func GetCopyright() *c.Char

func GetExecPrefix added in v0.2.0

func GetExecPrefix() *c.WcharT

func GetPath added in v0.2.0

func GetPath() *c.WcharT

func GetPlatform added in v0.2.0

func GetPlatform() *c.Char

func GetPrefix added in v0.2.0

func GetPrefix() *c.WcharT

func GetProgramFullPath added in v0.2.0

func GetProgramFullPath() *c.WcharT

func GetProgramName added in v0.2.0

func GetProgramName() *c.WcharT

func GetPythonHome added in v0.2.0

func GetPythonHome() *c.WcharT

func GetRecursionLimit added in v0.2.0

func GetRecursionLimit() c.Int

func GetVersion added in v0.2.0

func GetVersion() *c.Char

In their own files

func ImportAppendInittab added in v0.2.0

func ImportAppendInittab(name *c.Char, initfunc func() *Object) c.Int

func ImportGetMagicNumber added in v0.2.0

func ImportGetMagicNumber() c.Long

func ImportGetMagicTag added in v0.2.0

func ImportGetMagicTag() *c.Char

func ImportImportFrozenModule added in v0.2.0

func ImportImportFrozenModule(name *c.Char) c.Int

func IncRef added in v0.2.0

func IncRef(_llcppg_param1 *Object)

These are provided as conveniences to Python runtime embedders, so that they can have object code that is not dependent on Python compilation flags.

func IndexCheck added in v0.2.3

func IndexCheck(_llcppg_param1 *Object) c.Int

Returns 1 if obj is an index integer (has the nb_index slot of the tp_as_number structure filled in), and 0 otherwise.

func InitConfigFreeStrList added in v0.2.0

func InitConfigFreeStrList(length c.SizeT, items **c.Char)

func Initialize added in v0.2.0

func Initialize()

Initialization and finalization

func InitializeEx added in v0.2.0

func InitializeEx(_llcppg_param1 c.Int)

func InitializeFromInitConfig added in v0.2.0

func InitializeFromInitConfig(config *InitConfig) c.Int

func Is added in v0.2.0

func Is(x *Object, y *Object) c.Int

Test if the 'x' object is the 'y' object, the same as "x is y" in Python.

func IsFalse added in v0.2.0

func IsFalse(x *Object) c.Int

Test if an object is the False singleton, the same as "x is False" in Python.

func IsFinalizing added in v0.2.0

func IsFinalizing() c.Int

func IsInitialized added in v0.2.0

func IsInitialized() c.Int

func IsNone added in v0.2.0

func IsNone(x *Object) c.Int

Test if an object is the None singleton, the same as "x is None" in Python.

func IsTrue added in v0.2.0

func IsTrue(x *Object) c.Int

Test if an object is the True singleton, the same as "x is True" in Python.

func IterCheck added in v0.2.3

func IterCheck(_llcppg_param1 *Object) c.Int

Returns non-zero if the object 'obj' provides iterator protocols, and 0 otherwise.

This function always succeeds.

func IterNextItem added in v0.2.3

func IterNextItem(iter *Object, item **Object) c.Int

Return 1 and set 'item' to the next item of 'iter' on success. Return 0 and set 'item' to NULL when there are no remaining values. Return -1, set 'item' to NULL and set an exception on error.

func LeaveRecursiveCall added in v0.2.0

func LeaveRecursiveCall()

func Main added in v0.2.0

func Main(argc c.Int, argv **c.WcharT) c.Int

Bootstrap __main__ (defined in Modules/main.c)

func MakePendingCalls added in v0.2.0

func MakePendingCalls() c.Int

func MappingCheck added in v0.2.3

func MappingCheck(o *Object) c.Int

Return 1 if the object provides mapping protocol, and 0 otherwise.

This function always succeeds.

func MappingGetOptionalItem added in v0.2.3

func MappingGetOptionalItem(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 **Object) c.Int

func MappingGetOptionalItemString added in v0.2.3

func MappingGetOptionalItemString(_llcppg_param1 *Object, _llcppg_param2 *c.Char, _llcppg_param3 **Object) c.Int

func MappingHasKey added in v0.2.3

func MappingHasKey(o *Object, key *Object) c.Int

Return 1 if the mapping object has the key 'key', and 0 otherwise.

This is equivalent to the Python expression: key in o.

This function always succeeds.

func MappingHasKeyString added in v0.2.3

func MappingHasKeyString(o *Object, key *c.Char) c.Int

On success, return 1 if the mapping object 'o' has the key 'key', and 0 otherwise.

This is equivalent to the Python expression: key in o.

This function always succeeds.

func MappingHasKeyStringWithError added in v0.2.3

func MappingHasKeyStringWithError(o *Object, key *c.Char) c.Int

func MappingHasKeyWithError added in v0.2.3

func MappingHasKeyWithError(o *Object, key *Object) c.Int

func MappingSetItemString added in v0.2.3

func MappingSetItemString(o *Object, key *c.Char, value *Object) c.Int

Map the string 'key' to the value 'v' in the mapping 'o'. Returns -1 on failure.

This is the equivalent of the Python statement: o[key]=v.

func MemCalloc added in v0.2.0

func MemCalloc(nelem c.SizeT, elsize c.SizeT) unsafe.Pointer

func MemFree added in v0.2.0

func MemFree(ptr unsafe.Pointer)

func MemGetAllocator added in v0.2.3

func MemGetAllocator(domain MemAllocatorDomain, allocator *MemAllocatorEx)

Get the memory block allocator of the specified domain.

func MemMalloc added in v0.2.0

func MemMalloc(size c.SizeT) unsafe.Pointer

func MemRawCalloc added in v0.2.0

func MemRawCalloc(nelem c.SizeT, elsize c.SizeT) unsafe.Pointer

func MemRawFree added in v0.2.0

func MemRawFree(ptr unsafe.Pointer)

func MemRawMalloc added in v0.2.0

func MemRawMalloc(size c.SizeT) unsafe.Pointer

Memory allocator which doesn't require the GIL to be held. Usually, it's just a thin wrapper to functions of the standard C library: malloc(), calloc(), realloc() and free(). The difference is that tracemalloc can track these memory allocations.

func MemRawRealloc added in v0.2.0

func MemRawRealloc(ptr unsafe.Pointer, new_size c.SizeT) unsafe.Pointer

func MemRealloc added in v0.2.0

func MemRealloc(ptr unsafe.Pointer, new_size c.SizeT) unsafe.Pointer

func MemSetAllocator added in v0.2.3

func MemSetAllocator(domain MemAllocatorDomain, allocator *MemAllocatorEx)

Set the memory block allocator of the specified domain.

The new allocator must return a distinct non-NULL pointer when requesting zero bytes.

For the PYMEM_DOMAIN_RAW domain, the allocator must be thread-safe: the GIL is not held when the allocator is called.

If the new allocator is not a hook (don't call the previous allocator), the PyMem_SetupDebugHooks() function must be called to reinstall the debug hooks on top on the new allocator.

func MemSetupDebugHooks added in v0.2.0

func MemSetupDebugHooks()

Setup hooks to detect bugs in the following Python memory allocator functions:

- PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree() - PyMem_Malloc(), PyMem_Realloc(), PyMem_Free() - PyObject_Malloc(), PyObject_Realloc() and PyObject_Free()

Newly allocated memory is filled with the byte 0xCB, freed memory is filled with the byte 0xDB. Additional checks:

- detect API violations, ex: PyObject_Free() called on a buffer allocated by PyMem_Malloc() - detect write before the start of the buffer (buffer underflow) - detect write after the end of the buffer (buffer overflow)

The function does nothing if Python is not compiled is debug mode.

func MemberSetOne added in v0.2.0

func MemberSetOne(_llcppg_param1 *c.Char, _llcppg_param2 *MemberDef, _llcppg_param3 *Object) c.Int

func ModuleAdd added in v0.2.3

func ModuleAdd(mod *Object, name *c.Char, value *Object) c.Int

Similar to PyModule_AddObjectRef() but steal a reference to 'value'.

func ModuleAddFunctions added in v0.2.3

func ModuleAddFunctions(_llcppg_param1 *Object, _llcppg_param2 *MethodDef) c.Int

func ModuleAddIntConstant added in v0.2.3

func ModuleAddIntConstant(_llcppg_param1 *Object, _llcppg_param2 *c.Char, _llcppg_param3 c.Long) c.Int

func ModuleAddObject added in v0.2.3

func ModuleAddObject(mod *Object, _llcppg_param2 *c.Char, value *Object) c.Int

Similar to PyModule_AddObjectRef() and PyModule_Add() but steal a reference to 'value' on success and only on success. Errorprone. Should not be used in new code.

func ModuleAddObjectRef added in v0.2.3

func ModuleAddObjectRef(mod *Object, name *c.Char, value *Object) c.Int

Add an attribute with name 'name' and value 'obj' to the module 'mod. On success, return 0. On error, raise an exception and return -1.

func ModuleAddStringConstant added in v0.2.3

func ModuleAddStringConstant(_llcppg_param1 *Object, _llcppg_param2 *c.Char, _llcppg_param3 *c.Char) c.Int

func ModuleAddType added in v0.2.3

func ModuleAddType(module *Object, type_ *TypeObject) c.Int

New in 3.9

func ModuleExecDef added in v0.2.3

func ModuleExecDef(module *Object, def *ModuleDef) c.Int

func ModuleGetFilename added in v0.2.3

func ModuleGetFilename(_llcppg_param1 *Object) *c.Char

func ModuleGetName added in v0.2.3

func ModuleGetName(_llcppg_param1 *Object) *c.Char

func ModuleGetState added in v0.2.3

func ModuleGetState(_llcppg_param1 *Object) unsafe.Pointer

func ModuleSetDocString added in v0.2.3

func ModuleSetDocString(_llcppg_param1 *Object, _llcppg_param2 *c.Char) c.Int

New in 3.5

func MonitoringEnterScope added in v0.2.3

func MonitoringEnterScope(state_array *MonitoringState, version *c.Uint64T, event_types *c.Uint8T, length SsizeT) c.Int

func MonitoringExitScope added in v0.2.0

func MonitoringExitScope() c.Int

func NumberCheck added in v0.2.3

func NumberCheck(o *Object) c.Int

Returns 1 if the object 'o' provides numeric protocols, and 0 otherwise.

This function always succeeds.

func OSDoubleToString added in v0.2.0

func OSDoubleToString(val c.Double, format_code c.Char, precision c.Int, flags c.Int, type_ *c.Int) *c.Char

The caller is responsible for calling PyMem_Free to free the buffer that's is returned.

func OSMystricmp added in v0.2.0

func OSMystricmp(_llcppg_param1 *c.Char, _llcppg_param2 *c.Char) c.Int

func OSMystrnicmp added in v0.2.0

func OSMystrnicmp(_llcppg_param1 *c.Char, _llcppg_param2 *c.Char, _llcppg_param3 SsizeT) c.Int

func OSSnprintf added in v0.2.0

func OSSnprintf(str *c.Char, size c.SizeT, format *c.Char, __llgo_va_list ...any) c.Int

func OSStringToDouble added in v0.2.0

func OSStringToDouble(str *c.Char, endptr **c.Char, overflow_exception *Object) c.Double

func OSStrtol added in v0.2.0

func OSStrtol(_llcppg_param1 *c.Char, _llcppg_param2 **c.Char, _llcppg_param3 c.Int) c.Long

func OSStrtoul added in v0.2.0

func OSStrtoul(_llcppg_param1 *c.Char, _llcppg_param2 **c.Char, _llcppg_param3 c.Int) c.Ulong

These aren't really part of the int object, but they're handy. The functions are in Python/mystrtoul.c.

func OSVsnprintf added in v0.2.0

func OSVsnprintf(str *c.Char, size c.SizeT, format *c.Char, va c.VaList) c.Int

func OS_AfterFork added in v0.2.0

func OS_AfterFork()

Deprecated, please use PyOS_AfterFork_Child() instead

func OS_AfterFork_Child added in v0.2.0

func OS_AfterFork_Child()

func OS_AfterFork_Parent added in v0.2.0

func OS_AfterFork_Parent()

func OS_BeforeFork added in v0.2.0

func OS_BeforeFork()

func OS_InterruptOccurred added in v0.2.0

func OS_InterruptOccurred() c.Int

func OS_Readline added in v0.2.0

func OS_Readline(_llcppg_param1 *c.FILE, _llcppg_param2 *c.FILE, _llcppg_param3 *c.Char) *c.Char

Stuff with no proper home (yet)

func ObjectCalloc added in v0.2.0

func ObjectCalloc(nelem c.SizeT, elsize c.SizeT) unsafe.Pointer

func ObjectFree added in v0.2.0

func ObjectFree(ptr unsafe.Pointer)

func ObjectGetArenaAllocator added in v0.3.0

func ObjectGetArenaAllocator(allocator *ObjectArenaAllocator)

Get the arena allocator.

func ObjectMalloc added in v0.2.0

func ObjectMalloc(size c.SizeT) unsafe.Pointer

Functions to call the same malloc/realloc/free as used by Python's object allocator. If WITH_PYMALLOC is enabled, these may differ from the platform malloc/realloc/free. The Python object allocator is designed for fast, cache-conscious allocation of many "small" objects, and with low hidden memory overhead.

PyObject_Malloc(0) returns a unique non-NULL pointer if possible.

PyObject_Realloc(NULL, n) acts like PyObject_Malloc(n). PyObject_Realloc(p != NULL, 0) does not return NULL, or free the memory at p.

Returned pointers must be checked for NULL explicitly; no action is performed on failure other than to return NULL (no warning it printed, no exception is set, etc).

For allocating objects, use PyObject_{New, NewVar} instead whenever possible. The PyObject_{Malloc, Realloc, Free} family is exposed so that you can exploit Python's small-block allocator for non-object uses. If you must use these routines to allocate object memory, make sure the object gets initialized via PyObject_{Init, InitVar} after obtaining the raw memory.

func ObjectRealloc added in v0.2.0

func ObjectRealloc(ptr unsafe.Pointer, new_size c.SizeT) unsafe.Pointer

func ObjectSetArenaAllocator added in v0.3.0

func ObjectSetArenaAllocator(allocator *ObjectArenaAllocator)

Set the arena allocator.

func Object_GC_Del added in v0.2.0

func Object_GC_Del(_llcppg_param1 unsafe.Pointer)

func Object_GC_Track added in v0.2.0

func Object_GC_Track(_llcppg_param1 unsafe.Pointer)

Tell the GC to track this object.

See also private _PyObject_GC_TRACK() macro.

func Object_GC_UnTrack added in v0.2.0

func Object_GC_UnTrack(_llcppg_param1 unsafe.Pointer)

Tell the GC to stop tracking this object.

See also private _PyObject_GC_UNTRACK() macro.

func PACK_FULL_VERSION added in v0.2.0

func PACK_FULL_VERSION(x c.Int, y c.Int, z c.Int, level c.Int, serial c.Int) c.Uint32T

Version helpers. These are primarily macros, but have exported equivalents.

func PACK_VERSION added in v0.2.0

func PACK_VERSION(x c.Int, y c.Int) c.Uint32T

func PickleBufferRelease added in v0.2.3

func PickleBufferRelease(_llcppg_param1 *Object) c.Int

Release the PickleBuffer. Returns 0 on success, -1 on error.

func RefTracerSetTracer added in v0.2.0

func RefTracerSetTracer(tracer RefTracer, data unsafe.Pointer) c.Int

func ReprEnter added in v0.2.0

func ReprEnter(_llcppg_param1 *Object) c.Int

Helpers for printing recursive container types

func ReprLeave added in v0.2.0

func ReprLeave(_llcppg_param1 *Object)

func RunAnyFile added in v0.2.0

func RunAnyFile(fp *c.FILE, name *c.Char) c.Int

func RunAnyFileEx added in v0.2.0

func RunAnyFileEx(fp *c.FILE, name *c.Char, closeit c.Int) c.Int

func RunAnyFileExFlags added in v0.2.0

func RunAnyFileExFlags(fp *c.FILE, filename *c.Char, closeit c.Int, flags *CompilerFlags) c.Int

func RunAnyFileFlags added in v0.2.0

func RunAnyFileFlags(_llcppg_param1 *c.FILE, _llcppg_param2 *c.Char, _llcppg_param3 *CompilerFlags) c.Int

func RunInteractiveLoop added in v0.2.0

func RunInteractiveLoop(f *c.FILE, p *c.Char) c.Int

func RunInteractiveLoopFlags added in v0.2.0

func RunInteractiveLoopFlags(fp *c.FILE, filename *c.Char, flags *CompilerFlags) c.Int

func RunInteractiveOne added in v0.2.0

func RunInteractiveOne(f *c.FILE, p *c.Char) c.Int

func RunInteractiveOneFlags added in v0.2.0

func RunInteractiveOneFlags(fp *c.FILE, filename *c.Char, flags *CompilerFlags) c.Int

func RunInteractiveOneObject added in v0.2.0

func RunInteractiveOneObject(fp *c.FILE, filename *Object, flags *CompilerFlags) c.Int

func RunMain added in v0.2.0

func RunMain() c.Int

func RunSimpleFile added in v0.2.0

func RunSimpleFile(f *c.FILE, p *c.Char) c.Int

func RunSimpleFileEx added in v0.2.0

func RunSimpleFileEx(f *c.FILE, p *c.Char, c c.Int) c.Int

func RunSimpleFileExFlags added in v0.2.0

func RunSimpleFileExFlags(fp *c.FILE, filename *c.Char, closeit c.Int, flags *CompilerFlags) c.Int

func RunSimpleString added in v0.2.0

func RunSimpleString(s *c.Char) c.Int

func RunSimpleStringFlags added in v0.2.0

func RunSimpleStringFlags(_llcppg_param1 *c.Char, _llcppg_param2 *CompilerFlags) c.Int

func SequenceCheck added in v0.2.3

func SequenceCheck(o *Object) c.Int

Return 1 if the object provides sequence protocol, and zero otherwise.

This function always succeeds.

func SequenceContains added in v0.2.3

func SequenceContains(seq *Object, ob *Object) c.Int

Return 1 if 'ob' is in the sequence 'seq'; 0 if 'ob' is not in the sequence 'seq'; -1 on error.

Use __contains__ if possible, else _PySequence_IterSearch().

func SequenceDelItem added in v0.2.3

func SequenceDelItem(o *Object, i SsizeT) c.Int

Delete the 'i'-th element of the sequence 'v'. Returns -1 on failure.

This is the equivalent of the Python statement: del o[i].

func SequenceDelSlice added in v0.2.3

func SequenceDelSlice(o *Object, i1 SsizeT, i2 SsizeT) c.Int

Delete the slice in sequence object 'o' from 'i1' to 'i2'. Returns -1 on failure.

This is the equivalent of the Python statement: del o[i1:i2].

func SequenceIn added in v0.2.3

func SequenceIn(o *Object, value *Object) c.Int

Determine if the sequence 'o' contains 'value'. If an item in 'o' is equal to 'value', return 1, otherwise return 0. On error, return -1.

This is equivalent to the Python expression: value in o.

func SequenceSetItem added in v0.2.3

func SequenceSetItem(o *Object, i SsizeT, v *Object) c.Int

Assign object 'v' to the ith element of the sequence 'o'. Raise an exception and return -1 on failure; return 0 on success.

This is the equivalent of the Python statement o[i] = v.

func SequenceSetSlice added in v0.2.3

func SequenceSetSlice(o *Object, i1 SsizeT, i2 SsizeT, v *Object) c.Int

Assign the sequence object 'v' to the slice in sequence object 'o', from 'i1' to 'i2'. Returns -1 on failure.

This is the equivalent of the Python statement: o[i1:i2] = v.

func SetProgramName added in v0.2.0

func SetProgramName(_llcppg_param1 *c.WcharT)

In pathconfig.c

func SetPythonHome added in v0.2.0

func SetPythonHome(_llcppg_param1 *c.WcharT)

func SetRecursionLimit added in v0.2.0

func SetRecursionLimit(_llcppg_param1 c.Int)

Protection against deeply nested recursive calls

In Python 3.0, this protection has two levels: normal anti-recursion protection is triggered when the recursion level exceeds the current recursion limit. It raises a RecursionError, and sets the "overflowed" flag in the thread state structure. This flag temporarily *disables* the normal protection; this allows cleanup code to potentially outgrow the recursion limit while processing the RecursionError. "last chance" anti-recursion protection is triggered when the recursion level exceeds "current recursion limit + 50". By construction, this protection can only be triggered when the "overflowed" flag is set. It means the cleanup code has itself gone into an infinite loop, or the RecursionError has been mistakenly ignored. When this protection is triggered, the interpreter aborts with a Fatal Error.

In addition, the "overflowed" flag is automatically reset when the recursion level drops below "current recursion limit - 50". This heuristic is meant to ensure that the normal anti-recursion protection doesn't get disabled too long.

Please note: this scheme has its own limitations. See: http://mail.python.org/pipermail/python-dev/2008-August/082106.html for some observations.

func SignalSetWakeupFd added in v0.2.0

func SignalSetWakeupFd(fd c.Int) c.Int

func StateAddModule added in v0.2.3

func StateAddModule(_llcppg_param1 *Object, _llcppg_param2 *ModuleDef) c.Int

New in 3.3

func StateRemoveModule added in v0.2.3

func StateRemoveModule(_llcppg_param1 *ModuleDef) c.Int

func SysAddAuditHook added in v0.2.0

func SysAddAuditHook(_llcppg_param1 AuditHookFunction, _llcppg_param2 unsafe.Pointer) c.Int

func SysAudit added in v0.2.0

func SysAudit(event *c.Char, argFormat *c.Char, __llgo_va_list ...any) c.Int

func SysAuditTuple added in v0.2.0

func SysAuditTuple(event *c.Char, args *Object) c.Int

func SysFormatStderr added in v0.2.0

func SysFormatStderr(format *c.Char, __llgo_va_list ...any)

func SysFormatStdout added in v0.2.0

func SysFormatStdout(format *c.Char, __llgo_va_list ...any)

func SysResetWarnOptions added in v0.2.0

func SysResetWarnOptions()

func SysSetArgv added in v0.2.0

func SysSetArgv(_llcppg_param1 c.Int, _llcppg_param2 **c.WcharT)

func SysSetArgvEx added in v0.2.0

func SysSetArgvEx(_llcppg_param1 c.Int, _llcppg_param2 **c.WcharT, _llcppg_param3 c.Int)

func SysSetObject added in v0.2.0

func SysSetObject(_llcppg_param1 *c.Char, _llcppg_param2 *Object) c.Int

func SysWriteStderr added in v0.2.0

func SysWriteStderr(format *c.Char, __llgo_va_list ...any)

func SysWriteStdout added in v0.2.0

func SysWriteStdout(format *c.Char, __llgo_va_list ...any)

func ThreadAcquireLock added in v0.2.3

func ThreadAcquireLock(_llcppg_param1 ThreadTypeLock, _llcppg_param2 c.Int) c.Int

func ThreadCreateKey added in v0.2.0

func ThreadCreateKey() c.Int

Thread Local Storage (TLS) API TLS API is DEPRECATED. Use Thread Specific Storage (TSS) API.

The existing TLS API has used int to represent TLS keys across all platforms, but it is not POSIX-compliant. Therefore, the new TSS API uses opaque data type to represent TSS keys to be compatible (see PEP 539).

func ThreadDeleteKey added in v0.2.0

func ThreadDeleteKey(key c.Int)

func ThreadDeleteKeyValue added in v0.2.0

func ThreadDeleteKeyValue(key c.Int)

func ThreadExitThread added in v0.2.0

func ThreadExitThread()

Terminates the current thread. Considered unsafe.

WARNING: This function is only safe to call if all functions in the full call stack are written to safely allow it. Additionally, the behavior is platform-dependent. This function should be avoided, and is no longer called by Python itself. It is retained only for compatibility with existing C extension code.

With pthreads, calls `pthread_exit` causes some libcs (glibc?) to attempt to unwind the stack and call C++ destructors; if a `noexcept` function is reached, they may terminate the process. Others (macOS) do unwinding.

On Windows, calls `_endthreadex` which kills the thread without calling C++ destructors.

In either case there is a risk of invalid references remaining to data on the thread stack.

func ThreadFreeLock added in v0.2.3

func ThreadFreeLock(_llcppg_param1 ThreadTypeLock)

func ThreadGetKeyValue added in v0.2.0

func ThreadGetKeyValue(key c.Int) unsafe.Pointer

func ThreadGetStacksize added in v0.2.0

func ThreadGetStacksize() c.SizeT

func ThreadGetThreadIdent added in v0.2.0

func ThreadGetThreadIdent() c.Ulong

func ThreadGetThreadNativeId added in v0.2.0

func ThreadGetThreadNativeId() c.Ulong

func ThreadInitThread added in v0.2.0

func ThreadInitThread()

func ThreadReleaseLock added in v0.2.3

func ThreadReleaseLock(_llcppg_param1 ThreadTypeLock)

func ThreadSetKeyValue added in v0.2.0

func ThreadSetKeyValue(key c.Int, value unsafe.Pointer) c.Int

func ThreadSetStacksize added in v0.2.0

func ThreadSetStacksize(_llcppg_param1 c.SizeT) c.Int

func ThreadStartNewThread added in v0.2.0

func ThreadStartNewThread(_llcppg_param1 func(_llcppg_param1 unsafe.Pointer), _llcppg_param2 unsafe.Pointer) c.Ulong

Terminates the current thread. Considered unsafe.

WARNING: This function is only safe to call if all functions in the full call stack are written to safely allow it. Additionally, the behavior is platform-dependent. This function should be avoided, and is no longer called by Python itself. It is retained only for compatibility with existing C extension code.

With pthreads, calls `pthread_exit` causes some libcs (glibc?) to attempt to unwind the stack and call C++ destructors; if a `noexcept` function is reached, they may terminate the process. Others (macOS) do unwinding.

On Windows, calls `_endthreadex` which kills the thread without calling C++ destructors.

In either case there is a risk of invalid references remaining to data on the thread stack.

func ThreadStateDeleteCurrent added in v0.2.0

func ThreadStateDeleteCurrent()

func ThreadStateSetAsyncExc added in v0.2.0

func ThreadStateSetAsyncExc(_llcppg_param1 c.Ulong, _llcppg_param2 *Object) c.Int

func Thread_ReInitTLS added in v0.2.0

func Thread_ReInitTLS()

Cleanup after a fork

func TimeAsSecondsDouble added in v0.2.0

func TimeAsSecondsDouble(t TimeT) c.Double

func TimeMonotonic added in v0.2.0

func TimeMonotonic(result *TimeT) c.Int

func TimeMonotonicRaw added in v0.2.0

func TimeMonotonicRaw(result *TimeT) c.Int

func TimePerfCounter added in v0.2.0

func TimePerfCounter(result *TimeT) c.Int

func TimePerfCounterRaw added in v0.2.0

func TimePerfCounterRaw(result *TimeT) c.Int

func TimeTime added in v0.2.0

func TimeTime(result *TimeT) c.Int

func TimeTimeRaw added in v0.2.0

func TimeTimeRaw(result *TimeT) c.Int

func TraceBackHere added in v0.2.3

func TraceBackHere(_llcppg_param1 *FrameObject) c.Int

func TraceBackPrint added in v0.2.3

func TraceBackPrint(_llcppg_param1 *Object, _llcppg_param2 *Object) c.Int

func TraceMallocTrack added in v0.2.0

func TraceMallocTrack(domain c.Uint, ptr c.UintptrT, size c.SizeT) c.Int

Track an allocated memory block in the tracemalloc module. Return 0 on success, return -1 on error (failed to allocate memory to store the trace).

Return -2 if tracemalloc is disabled.

If memory block is already tracked, update the existing trace.

func TraceMallocUntrack added in v0.2.0

func TraceMallocUntrack(domain c.Uint, ptr c.UintptrT) c.Int

Untrack an allocated memory block in the tracemalloc module. Do nothing if the block was not tracked.

Return -2 if tracemalloc is disabled, otherwise return 0.

func TypeAddWatcher added in v0.2.0

func TypeAddWatcher(callback TypeWatchCallback) c.Int

func TypeClearCache added in v0.2.0

func TypeClearCache() c.Uint

func TypeClearWatcher added in v0.2.0

func TypeClearWatcher(watcher_id c.Int) c.Int

func TypeUnwatch added in v0.2.0

func TypeUnwatch(watcher_id c.Int, type_ *Object) c.Int

func TypeWatch added in v0.2.0

func TypeWatch(watcher_id c.Int, type_ *Object) c.Int

func UnicodeAppend added in v0.2.0

func UnicodeAppend(pleft **Object, right *Object)

func UnicodeAppendAndDel added in v0.2.0

func UnicodeAppendAndDel(pleft **Object, right *Object)

func UnicodeDecodeErrorGetEnd added in v0.2.3

func UnicodeDecodeErrorGetEnd(_llcppg_param1 *Object, _llcppg_param2 *SsizeT) c.Int

func UnicodeDecodeErrorGetStart added in v0.2.3

func UnicodeDecodeErrorGetStart(_llcppg_param1 *Object, _llcppg_param2 *SsizeT) c.Int

func UnicodeDecodeErrorSetEnd added in v0.2.3

func UnicodeDecodeErrorSetEnd(_llcppg_param1 *Object, _llcppg_param2 SsizeT) c.Int

func UnicodeDecodeErrorSetReason added in v0.2.3

func UnicodeDecodeErrorSetReason(exc *Object, reason *c.Char) c.Int

func UnicodeDecodeErrorSetStart added in v0.2.3

func UnicodeDecodeErrorSetStart(_llcppg_param1 *Object, _llcppg_param2 SsizeT) c.Int

func UnicodeEncodeErrorGetEnd added in v0.2.3

func UnicodeEncodeErrorGetEnd(_llcppg_param1 *Object, _llcppg_param2 *SsizeT) c.Int

get the value of the end attribute (the int *may not be NULL) return 0 on success, -1 on failure

func UnicodeEncodeErrorGetStart added in v0.2.3

func UnicodeEncodeErrorGetStart(_llcppg_param1 *Object, _llcppg_param2 *SsizeT) c.Int

get the value of the start attribute (the int * may not be NULL) return 0 on success, -1 on failure

func UnicodeEncodeErrorSetEnd added in v0.2.3

func UnicodeEncodeErrorSetEnd(_llcppg_param1 *Object, _llcppg_param2 SsizeT) c.Int

assign a new value to the end attribute return 0 on success, -1 on failure

func UnicodeEncodeErrorSetReason added in v0.2.3

func UnicodeEncodeErrorSetReason(exc *Object, reason *c.Char) c.Int

assign a new value to the reason attribute return 0 on success, -1 on failure

func UnicodeEncodeErrorSetStart added in v0.2.3

func UnicodeEncodeErrorSetStart(_llcppg_param1 *Object, _llcppg_param2 SsizeT) c.Int

assign a new value to the start attribute return 0 on success, -1 on failure

func UnicodeGetDefaultEncoding added in v0.2.0

func UnicodeGetDefaultEncoding() *c.Char

Returns "utf-8".

func UnicodeInternInPlace added in v0.2.0

func UnicodeInternInPlace(_llcppg_param1 **Object)

func UnicodeResize added in v0.2.0

func UnicodeResize(unicode **Object, length SsizeT) c.Int

func UnicodeTranslateErrorGetEnd added in v0.2.3

func UnicodeTranslateErrorGetEnd(_llcppg_param1 *Object, _llcppg_param2 *SsizeT) c.Int

func UnicodeTranslateErrorGetStart added in v0.2.3

func UnicodeTranslateErrorGetStart(_llcppg_param1 *Object, _llcppg_param2 *SsizeT) c.Int

func UnicodeTranslateErrorSetEnd added in v0.2.3

func UnicodeTranslateErrorSetEnd(_llcppg_param1 *Object, _llcppg_param2 SsizeT) c.Int

func UnicodeTranslateErrorSetReason added in v0.2.3

func UnicodeTranslateErrorSetReason(exc *Object, reason *c.Char) c.Int

func UnicodeTranslateErrorSetStart added in v0.2.3

func UnicodeTranslateErrorSetStart(_llcppg_param1 *Object, _llcppg_param2 SsizeT) c.Int

func UniversalNewlineFgets added in v0.2.0

func UniversalNewlineFgets(_llcppg_param1 *c.Char, _llcppg_param2 c.Int, _llcppg_param3 *c.FILE, _llcppg_param4 *Object) *c.Char

func UnstableAtExit added in v0.2.3

func UnstableAtExit(_llcppg_param1 *InterpreterState, _llcppg_param2 AtexitDatacallbackfunc, _llcppg_param3 unsafe.Pointer) c.Int

func UnstableCodeGetExtra added in v0.2.3

func UnstableCodeGetExtra(code *Object, index SsizeT, extra *unsafe.Pointer) c.Int

func UnstableCodeSetExtra added in v0.2.3

func UnstableCodeSetExtra(code *Object, index SsizeT, extra unsafe.Pointer) c.Int

Old names -- remove when this API changes:

func UnstableCopyPerfMapFile added in v0.2.0

func UnstableCopyPerfMapFile(parent_filename *c.Char) c.Int

func UnstableEnableTryIncRef added in v0.2.3

func UnstableEnableTryIncRef(_llcppg_param1 *Object)

func UnstableInterpreterFrameGetLasti added in v0.2.3

func UnstableInterpreterFrameGetLasti(frame *X_InterpreterFrame) c.Int

Returns a byte offset into the last executed instruction. Does not raise an exception.

func UnstableInterpreterFrameGetLine added in v0.2.3

func UnstableInterpreterFrameGetLine(frame *X_InterpreterFrame) c.Int

Returns the currently executing line number, or -1 if there is no line number. Does not raise an exception.

func UnstableIsImmortal added in v0.2.3

func UnstableIsImmortal(_llcppg_param1 *Object) c.Int

Check whether the object is immortal. This cannot fail.

func UnstableLongIsCompact added in v0.2.3

func UnstableLongIsCompact(op *LongObject) c.Int

func UnstableObjectClearWeakRefsNoCallbacks added in v0.2.3

func UnstableObjectClearWeakRefsNoCallbacks(_llcppg_param1 *Object)

func UnstableObjectEnableDeferredRefcount added in v0.2.3

func UnstableObjectEnableDeferredRefcount(_llcppg_param1 *Object) c.Int

Enable PEP-703 deferred reference counting on the object.

Returns 1 if deferred reference counting was successfully enabled, and 0 if the runtime ignored it. This function cannot fail.

func UnstableObjectIsUniqueReferencedTemporary added in v0.2.3

func UnstableObjectIsUniqueReferencedTemporary(_llcppg_param1 *Object) c.Int

Determine if the object exists as a unique temporary variable on the topmost frame of the interpreter.

func UnstableObjectIsUniquelyReferenced added in v0.2.3

func UnstableObjectIsUniquelyReferenced(_llcppg_param1 *Object) c.Int

func UnstablePerfMapStateFini added in v0.2.0

func UnstablePerfMapStateFini()

func UnstablePerfMapStateInit added in v0.2.0

func UnstablePerfMapStateInit() c.Int

func UnstablePerfTrampolineCompileCode added in v0.2.3

func UnstablePerfTrampolineCompileCode(_llcppg_param1 *CodeObject) c.Int

func UnstablePerfTrampolineSetPersistAfterFork added in v0.2.0

func UnstablePerfTrampolineSetPersistAfterFork(enable c.Int) c.Int

func UnstableThreadStateResetStackProtection added in v0.2.3

func UnstableThreadStateResetStackProtection(tstate *ThreadState)

Reset the stack protection start address and stack protection size of a Python thread state

func UnstableThreadStateSetStackProtection added in v0.2.3

func UnstableThreadStateSetStackProtection(tstate *ThreadState, stack_start_addr unsafe.Pointer, stack_size c.SizeT) c.Int

Set the stack protection start address and stack protection size of a Python thread state

func UnstableTryIncRef added in v0.2.3

func UnstableTryIncRef(_llcppg_param1 *Object) c.Int

Increments the reference count of the object, if it's not zero. PyUnstable_EnableTryIncRef() should be called on the object before calling this function in order to avoid spurious failures.

func UnstableTypeAssignVersionTag added in v0.2.3

func UnstableTypeAssignVersionTag(type_ *TypeObject) c.Int

Attempt to assign a version tag to the given type.

Returns 1 if the type already had a valid version tag or a new one was assigned, or 0 if a new tag could not be assigned.

func UnstableWritePerfMapEntry added in v0.2.0

func UnstableWritePerfMapEntry(code_addr unsafe.Pointer, code_size c.Uint, entry_name *c.Char) c.Int

func Unstable_GC_VisitObjects added in v0.2.0

func Unstable_GC_VisitObjects(callback GcvisitobjectsT, arg unsafe.Pointer)

func WeakrefGetRef added in v0.2.3

func WeakrefGetRef(ref *Object, pobj **Object) c.Int

func WeakrefIsDead added in v0.2.3

func WeakrefIsDead(ref *Object) c.Int

Test if a weak reference is dead.

func X_ArgParseTupleAndKeywordsFast added in v0.2.0

func X_ArgParseTupleAndKeywordsFast(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *X_ArgParser, __llgo_va_list ...any) c.Int

func X_BreakPoint added in v0.2.0

func X_BreakPoint()

func X_BytesResize added in v0.2.0

func X_BytesResize(_llcppg_param1 **Object, _llcppg_param2 SsizeT) c.Int

func X_CodeCheckLineNumber added in v0.2.0

func X_CodeCheckLineNumber(lasti c.Int, bounds *CodeAddressRange) c.Int

Update *bounds to describe the first and one-past-the-last instructions in the same line as lasti. Return the number of that line.

func X_Dealloc added in v0.2.0

func X_Dealloc(_llcppg_param1 *Object)

func X_DecRef added in v0.2.0

func X_DecRef(_llcppg_param1 *Object)

func X_ErrBadInternalCall added in v0.2.0

func X_ErrBadInternalCall(filename *c.Char, lineno c.Int)

Mask the old API with a call to the new API for code compiled under Python 2.0:

func X_ErrChainExceptions1 added in v0.2.0

func X_ErrChainExceptions1(_llcppg_param1 *Object)

func X_EvalSliceIndex added in v0.2.0

func X_EvalSliceIndex(_llcppg_param1 *Object, _llcppg_param2 *SsizeT) c.Int

func X_EvalSliceIndexNotNone added in v0.2.0

func X_EvalSliceIndexNotNone(_llcppg_param1 *Object, _llcppg_param2 *SsizeT) c.Int

func X_FatalErrorFunc added in v0.2.0

func X_FatalErrorFunc(func_ *c.Char, message *c.Char)

func X_ForgetReference added in v0.2.0

func X_ForgetReference(op *Object)

func X_IncRef added in v0.2.0

func X_IncRef(_llcppg_param1 *Object)

Similar to Py_IncRef() and Py_DecRef() but the argument must be non-NULL. Private functions used by Py_INCREF() and Py_DECREF().

func X_InterpreterStateRequireIDRef added in v0.2.0

func X_InterpreterStateRequireIDRef(_llcppg_param1 *InterpreterState, _llcppg_param2 c.Int)

func X_InterpreterStateRequiresIDRef added in v0.2.0

func X_InterpreterStateRequiresIDRef(_llcppg_param1 *InterpreterState) c.Int

func X_InterpreterStateSetEvalFrameFunc added in v0.2.0

func X_InterpreterStateSetEvalFrameFunc(interp *InterpreterState, eval_frame X_FrameEvalFunction)

func X_LongAsByteArray added in v0.2.0

func X_LongAsByteArray(v *LongObject, bytes *uint8, n c.SizeT, little_endian c.Int, is_signed c.Int, with_exceptions c.Int) c.Int

_PyLong_AsByteArray: Convert the least-significant 8*n bits of long v to a base-256 integer, stored in array bytes. Normally return 0, return -1 on error. If little_endian is 1/true, store the MSB at bytes[n-1] and the LSB at bytes[0]; else (little_endian is 0/false) store the MSB at bytes[0] and the LSB at bytes[n-1]. If is_signed is 0/false, it's an error if v < 0; else (v >= 0) n bytes are filled and there's nothing special about bit 0x80 of the MSB. If is_signed is 1/true, bytes is filled with the 2's-complement representation of v's value. Bit 0x80 of the MSB is the sign bit. Error returns (-1): + is_signed is 0 and v < 0. TypeError is set in this case, and bytes isn't altered. + n isn't big enough to hold the full mathematical value of v. For example, if is_signed is 0 and there are more digits in the v than fit in n; or if is_signed is 1, v < 0, and n is just 1 bit shy of being large enough to hold a sign bit. OverflowError is set in this case, but bytes holds the least-significant n bytes of the true value.

func X_LongNumBits added in v0.2.0

func X_LongNumBits(v *Object) c.Int64T

_PyLong_NumBits. Return the number of bits needed to represent the absolute value of a long. For example, this returns 1 for 1 and -1, 2 for 2 and -2, and 2 for 3 and -3. It returns 0 for 0. v must not be NULL, and must be a normalized long. Always successful.

func X_LongSign added in v0.2.0

func X_LongSign(v *Object) c.Int

func X_MonitoringFireBranchEvent added in v0.2.0

func X_MonitoringFireBranchEvent(state *MonitoringState, codelike *Object, offset c.Int32T, target_offset *Object) c.Int

func X_MonitoringFireBranchLeftEvent added in v0.2.0

func X_MonitoringFireBranchLeftEvent(state *MonitoringState, codelike *Object, offset c.Int32T, target_offset *Object) c.Int

func X_MonitoringFireBranchRightEvent added in v0.2.0

func X_MonitoringFireBranchRightEvent(state *MonitoringState, codelike *Object, offset c.Int32T, target_offset *Object) c.Int

func X_MonitoringFireCRaiseEvent added in v0.2.0

func X_MonitoringFireCRaiseEvent(state *MonitoringState, codelike *Object, offset c.Int32T) c.Int

func X_MonitoringFireCReturnEvent added in v0.2.0

func X_MonitoringFireCReturnEvent(state *MonitoringState, codelike *Object, offset c.Int32T, retval *Object) c.Int

func X_MonitoringFireCallEvent added in v0.2.0

func X_MonitoringFireCallEvent(state *MonitoringState, codelike *Object, offset c.Int32T, callable *Object, arg0 *Object) c.Int

func X_MonitoringFireExceptionHandledEvent added in v0.2.0

func X_MonitoringFireExceptionHandledEvent(state *MonitoringState, codelike *Object, offset c.Int32T) c.Int

func X_MonitoringFireJumpEvent added in v0.2.0

func X_MonitoringFireJumpEvent(state *MonitoringState, codelike *Object, offset c.Int32T, target_offset *Object) c.Int

func X_MonitoringFireLineEvent added in v0.2.0

func X_MonitoringFireLineEvent(state *MonitoringState, codelike *Object, offset c.Int32T, lineno c.Int) c.Int

func X_MonitoringFirePyResumeEvent added in v0.2.0

func X_MonitoringFirePyResumeEvent(state *MonitoringState, codelike *Object, offset c.Int32T) c.Int

func X_MonitoringFirePyReturnEvent added in v0.2.0

func X_MonitoringFirePyReturnEvent(state *MonitoringState, codelike *Object, offset c.Int32T, retval *Object) c.Int

func X_MonitoringFirePyStartEvent added in v0.2.0

func X_MonitoringFirePyStartEvent(state *MonitoringState, codelike *Object, offset c.Int32T) c.Int

func X_MonitoringFirePyThrowEvent added in v0.2.0

func X_MonitoringFirePyThrowEvent(state *MonitoringState, codelike *Object, offset c.Int32T) c.Int

func X_MonitoringFirePyUnwindEvent added in v0.2.0

func X_MonitoringFirePyUnwindEvent(state *MonitoringState, codelike *Object, offset c.Int32T) c.Int

func X_MonitoringFirePyYieldEvent added in v0.2.0

func X_MonitoringFirePyYieldEvent(state *MonitoringState, codelike *Object, offset c.Int32T, retval *Object) c.Int

func X_MonitoringFireRaiseEvent added in v0.2.0

func X_MonitoringFireRaiseEvent(state *MonitoringState, codelike *Object, offset c.Int32T) c.Int

func X_MonitoringFireReraiseEvent added in v0.2.0

func X_MonitoringFireReraiseEvent(state *MonitoringState, codelike *Object, offset c.Int32T) c.Int

func X_MonitoringFireStopIterationEvent added in v0.2.0

func X_MonitoringFireStopIterationEvent(state *MonitoringState, codelike *Object, offset c.Int32T, value *Object) c.Int

func X_NewReference added in v0.2.0

func X_NewReference(op *Object)

func X_NewReferenceNoTotal added in v0.2.0

func X_NewReferenceNoTotal(op *Object)

func X_ObjectAssertFailed added in v0.2.0

func X_ObjectAssertFailed(obj *Object, expr *c.Char, msg *c.Char, file *c.Char, line c.Int, function *c.Char)

Declare and define _PyObject_AssertFailed() even when NDEBUG is defined, to avoid causing compiler/linker errors when building extensions without NDEBUG against a Python built with NDEBUG defined.

msg, expr and function can be NULL.

func X_ObjectDump added in v0.2.0

func X_ObjectDump(_llcppg_param1 *Object)

func X_ObjectGenericSetAttrWithDict added in v0.2.0

func X_ObjectGenericSetAttrWithDict(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object, _llcppg_param4 *Object) c.Int

func X_ObjectSetManagedDict added in v0.2.0

func X_ObjectSetManagedDict(obj *Object, new_dict *Object) c.Int

func X_ReachedRecursionLimitWithMargin added in v0.2.0

func X_ReachedRecursionLimitWithMargin(tstate *ThreadState, margin_count c.Int) c.Int

func X_ResurrectReference added in v0.2.0

func X_ResurrectReference(op *Object)

func X_SetRefcnt added in v0.2.0

func X_SetRefcnt(ob *Object, refcnt SsizeT)

Py_SET_REFCNT() implementation for stable ABI

func X_SliceGetLongIndices added in v0.2.0

func X_SliceGetLongIndices(self *SliceObject, length *Object, start_ptr **Object, stop_ptr **Object, step_ptr **Object) c.Int

func X_TrashThreadDepositObject added in v0.2.0

func X_TrashThreadDepositObject(tstate *ThreadState, op *Object)

func X_TrashThreadDestroyChain added in v0.2.0

func X_TrashThreadDestroyChain(tstate *ThreadState)

func X_TupleResize added in v0.2.0

func X_TupleResize(_llcppg_param1 **Object, _llcppg_param2 SsizeT) c.Int

func X_TypeName added in v0.2.0

func X_TypeName(_llcppg_param1 *TypeObject) *c.Char

func X_UnicodeIsAlpha added in v0.2.0

func X_UnicodeIsAlpha(ch UCS4) c.Int

func X_UnicodeIsDecimalDigit added in v0.2.0

func X_UnicodeIsDecimalDigit(ch UCS4) c.Int

func X_UnicodeIsDigit added in v0.2.0

func X_UnicodeIsDigit(ch UCS4) c.Int

func X_UnicodeIsLinebreak added in v0.2.0

func X_UnicodeIsLinebreak(ch UCS4) c.Int

func X_UnicodeIsLowercase added in v0.2.0

func X_UnicodeIsLowercase(ch UCS4) c.Int

func X_UnicodeIsNumeric added in v0.2.0

func X_UnicodeIsNumeric(ch UCS4) c.Int

func X_UnicodeIsPrintable added in v0.2.0

func X_UnicodeIsPrintable(ch UCS4) c.Int

func X_UnicodeIsTitlecase added in v0.2.0

func X_UnicodeIsTitlecase(ch UCS4) c.Int

func X_UnicodeIsUppercase added in v0.2.0

func X_UnicodeIsUppercase(ch UCS4) c.Int

func X_UnicodeIsWhitespace added in v0.2.0

func X_UnicodeIsWhitespace(ch UCS4) c.Int

func X_UnicodeToDecimalDigit added in v0.2.0

func X_UnicodeToDecimalDigit(ch UCS4) c.Int

func X_UnicodeToDigit added in v0.2.0

func X_UnicodeToDigit(ch UCS4) c.Int

func X_UnicodeToNumeric added in v0.2.0

func X_UnicodeToNumeric(ch UCS4) c.Double

func X_UnicodeWriterDealloc added in v0.2.0

func X_UnicodeWriterDealloc(writer *X_UnicodeWriter)

Deallocate memory of a writer (clear its internal buffer).

func X_UnicodeWriterInit added in v0.2.0

func X_UnicodeWriterInit(writer *X_UnicodeWriter)

Initialize a Unicode writer.

By default, the minimum buffer size is 0 character and overallocation is disabled. Set min_length, min_char and overallocate attributes to control the allocation of the buffer.

func X_UnicodeWriterPrepareInternal added in v0.2.0

func X_UnicodeWriterPrepareInternal(writer *X_UnicodeWriter, length SsizeT, maxchar UCS4) c.Int

Don't call this function directly, use the _PyUnicodeWriter_Prepare() macro instead.

func X_UnicodeWriterPrepareKindInternal added in v0.2.0

func X_UnicodeWriterPrepareKindInternal(writer *X_UnicodeWriter, kind c.Int) c.Int

Don't call this function directly, use the _PyUnicodeWriter_PrepareKind() macro instead.

func X_UnicodeWriterWriteASCIIString added in v0.2.0

func X_UnicodeWriterWriteASCIIString(writer *X_UnicodeWriter, str *c.Char, len SsizeT) c.Int

Append an ASCII-encoded byte string. Return 0 on success, raise an exception and return -1 on error.

func X_UnicodeWriterWriteChar added in v0.2.0

func X_UnicodeWriterWriteChar(writer *X_UnicodeWriter, ch UCS4) c.Int

Append a Unicode character. Return 0 on success, raise an exception and return -1 on error.

func X_UnicodeWriterWriteLatin1String added in v0.2.0

func X_UnicodeWriterWriteLatin1String(writer *X_UnicodeWriter, str *c.Char, len SsizeT) c.Int

Append a latin1-encoded byte string. Return 0 on success, raise an exception and return -1 on error.

func X_UnicodeWriterWriteStr added in v0.2.0

func X_UnicodeWriterWriteStr(writer *X_UnicodeWriter, str *Object) c.Int

Append a Unicode string. Return 0 on success, raise an exception and return -1 on error.

func X_UnicodeWriterWriteSubstring added in v0.2.0

func X_UnicodeWriterWriteSubstring(writer *X_UnicodeWriter, str *Object, start SsizeT, end SsizeT) c.Int

Append a substring of a Unicode string. Return 0 on success, raise an exception and return -1 on error.

func X_WeakrefClearRef added in v0.2.0

func X_WeakrefClearRef(self *WeakReference)

func X_cAbs added in v0.2.0

func X_cAbs(_llcppg_param1 Complex) c.Double

Types

type ASCIIObject added in v0.2.0

type ASCIIObject struct {
	ObBase Object
	Length SsizeT
	Hash   HashT
	State  _llcppg_anon_3
}

ASCII-only strings created through PyUnicode_New use the PyASCIIObject structure. state.ascii and state.compact are set, and the data immediately follow the structure. utf8_length can be found in the length field; the utf8 pointer is equal to the data pointer.

type Allocfunc

type Allocfunc = func(_llcppg_param1 *TypeObject, _llcppg_param2 SsizeT) *Object

llgo:type C

type AsyncGenObject added in v0.2.0

type AsyncGenObject = X_AsyncGenObject

type AsyncMethods added in v0.2.0

type AsyncMethods struct {
	AmAwait Unaryfunc
	AmAiter Unaryfunc
	AmAnext Unaryfunc
	AmSend  Sendfunc
}

type AtexitDatacallbackfunc

type AtexitDatacallbackfunc = func(_llcppg_param1 unsafe.Pointer)

llgo:type C

type AttributeErrorObject added in v0.2.0

type AttributeErrorObject struct {
	ObBase          Object
	Dict            *Object
	Args            *Object
	Notes           *Object
	Traceback       *Object
	Context         *Object
	Cause           *Object
	SuppressContext c.Char
	Obj             *Object
	Name            *Object
}

type AuditHookFunction added in v0.2.0

type AuditHookFunction = func(_llcppg_param1 *c.Char, _llcppg_param2 *Object, _llcppg_param3 unsafe.Pointer) c.Int

llgo:type C

type BaseExceptionGroupObject added in v0.2.0

type BaseExceptionGroupObject struct {
	ObBase          Object
	Dict            *Object
	Args            *Object
	Notes           *Object
	Traceback       *Object
	Context         *Object
	Cause           *Object
	SuppressContext c.Char
	Msg             *Object
	Excs            *Object
	ExcsStr         *Object
}

type BaseExceptionObject added in v0.2.0

type BaseExceptionObject struct {
	ObBase          Object
	Dict            *Object
	Args            *Object
	Notes           *Object
	Traceback       *Object
	Context         *Object
	Cause           *Object
	SuppressContext c.Char
}

type Binaryfunc

type Binaryfunc = func(_llcppg_param1 *Object, _llcppg_param2 *Object) *Object

llgo:type C

type Buffer added in v0.2.0

type Buffer struct {
	Buf        unsafe.Pointer
	Obj        *Object
	Len        SsizeT
	Itemsize   SsizeT
	Readonly   c.Int
	Ndim       c.Int
	Format     *c.Char
	Shape      *SsizeT
	Strides    *SsizeT
	Suboffsets *SsizeT
	Internal   unsafe.Pointer
}

func PickleBufferGetBuffer added in v0.2.3

func PickleBufferGetBuffer(_llcppg_param1 *Object) *Buffer

Get the PickleBuffer's underlying view to the original object (NULL if released)

func (*Buffer) FillInfo added in v0.2.0

func (self *Buffer) FillInfo(o *Object, buf unsafe.Pointer, len SsizeT, readonly c.Int, flags c.Int) c.Int

Fills in a buffer-info structure correctly for an exporter that can only share a contiguous chunk of memory of "unsigned bytes" of the given length.

Returns 0 on success and -1 (with raising an error) on error.

llgo:link (*Buffer).FillInfo C.PyBuffer_FillInfo

func (*Buffer) IsContiguous added in v0.2.0

func (self *Buffer) IsContiguous(fort c.Char) c.Int

Copy the data from the src buffer to the buffer of destination.

llgo:link (*Buffer).IsContiguous C.PyBuffer_IsContiguous

func (*Buffer) Pointer added in v0.2.0

func (self *Buffer) Pointer(indices *SsizeT) unsafe.Pointer

Get the memory area pointed to by the indices for the buffer given. Note that view->ndim is the assumed size of indices.

llgo:link (*Buffer).Pointer C.PyBuffer_GetPointer

func (*Buffer) Release added in v0.2.0

func (self *Buffer) Release()

Releases a Py_buffer obtained from getbuffer ParseTuple's "s*".

llgo:link (*Buffer).Release C.PyBuffer_Release

type BufferProcs added in v0.2.0

type BufferProcs struct {
	BfGetbuffer     Getbufferproc
	BfReleasebuffer Releasebufferproc
}

type ByteArrayObject added in v0.2.0

type ByteArrayObject struct {
	ObBase    VarObject
	ObAlloc   SsizeT
	ObBytes   *c.Char
	ObStart   *c.Char
	ObExports SsizeT
}

Object layout

func ByteArrayFromStringAndSize added in v0.2.0

func ByteArrayFromStringAndSize(_llcppg_param1 *c.Char, _llcppg_param2 SsizeT) *ByteArrayObject

func (*ByteArrayObject) AsString added in v0.2.3

func (self *ByteArrayObject) AsString() *c.Char

llgo:link (*ByteArrayObject).AsString C.PyByteArray_AsString

func (*ByteArrayObject) Concat added in v0.2.3

func (self *ByteArrayObject) Concat(_llcppg_param2 *Object) *Object

llgo:link (*ByteArrayObject).Concat C.PyByteArray_Concat

func (*ByteArrayObject) Resize added in v0.2.3

func (self *ByteArrayObject) Resize(_llcppg_param2 SsizeT) c.Int

llgo:link (*ByteArrayObject).Resize C.PyByteArray_Resize

func (*ByteArrayObject) Size added in v0.2.3

func (self *ByteArrayObject) Size() SsizeT

llgo:link (*ByteArrayObject).Size C.PyByteArray_Size

type BytesObject added in v0.2.0

type BytesObject struct {
	ObBase  VarObject
	ObShash HashT
	ObSval  [1]c.Char
}

func BytesFromFormat added in v0.2.0

func BytesFromFormat(_llcppg_param1 *c.Char, __llgo_va_list ...any) *BytesObject

func BytesFromFormatV added in v0.2.4

func BytesFromFormatV(_llcppg_param1 *c.Char, _llcppg_param2 c.VaList) *BytesObject

func BytesFromString added in v0.2.0

func BytesFromString(_llcppg_param1 *c.Char) *BytesObject

func BytesFromStringAndSize added in v0.2.0

func BytesFromStringAndSize(_llcppg_param1 *c.Char, _llcppg_param2 SsizeT) *BytesObject

func (*BytesObject) AsString added in v0.2.3

func (self *BytesObject) AsString() *c.Char

llgo:link (*BytesObject).AsString C.PyBytes_AsString

func (*BytesObject) AsStringAndSize added in v0.2.3

func (self *BytesObject) AsStringAndSize(s **c.Char, len *SsizeT) c.Int

Provides access to the internal data buffer and size of a bytes object. Passing NULL as len parameter will force the string buffer to be 0-terminated (passing a string with embedded NUL characters will cause an exception).

llgo:link (*BytesObject).AsStringAndSize C.PyBytes_AsStringAndSize

func (*BytesObject) Join added in v0.2.3

func (self *BytesObject) Join(iterable *Object) *Object

llgo:link (*BytesObject).Join C.PyBytes_Join

func (*BytesObject) Repr added in v0.2.3

func (self *BytesObject) Repr(_llcppg_param2 c.Int) *Object

llgo:link (*BytesObject).Repr C.PyBytes_Repr

func (*BytesObject) Size added in v0.2.3

func (self *BytesObject) Size() SsizeT

llgo:link (*BytesObject).Size C.PyBytes_Size

type CFunction added in v0.2.0

type CFunction = func(_llcppg_param1 *Object, _llcppg_param2 *Object) *Object

llgo:type C

type CFunctionFast added in v0.2.0

type CFunctionFast = func(_llcppg_param1 *Object, _llcppg_param2 **Object, _llcppg_param3 SsizeT) *Object

llgo:type C

type CFunctionFastWithKeywords added in v0.2.0

type CFunctionFastWithKeywords = func(_llcppg_param1 *Object, _llcppg_param2 **Object, _llcppg_param3 SsizeT, _llcppg_param4 *Object) *Object

llgo:type C

type CFunctionObject added in v0.2.0

type CFunctionObject struct {
	ObBase       Object
	MMl          *MethodDef
	MSelf        *Object
	MModule      *Object
	MWeakreflist *Object
	Vectorcall   Vectorcallfunc
}

func NewCFunction added in v0.2.3

func NewCFunction(_llcppg_param1 *MethodDef, _llcppg_param2 *Object) *CFunctionObject

PyCFunction_New is declared as a function for stable ABI (declaration is needed for e.g. GCC with -fvisibility=hidden), but redefined as a macro that calls PyCFunction_NewEx.

func (*CFunctionObject) Flags added in v0.2.3

func (self *CFunctionObject) Flags() c.Int

llgo:link (*CFunctionObject).Flags C.PyCFunction_GetFlags

func (*CFunctionObject) Function added in v0.2.3

func (self *CFunctionObject) Function() CFunction

llgo:link (*CFunctionObject).Function C.PyCFunction_GetFunction

func (*CFunctionObject) Self added in v0.2.3

func (self *CFunctionObject) Self() *Object

llgo:link (*CFunctionObject).Self C.PyCFunction_GetSelf

type CFunctionWithKeywords added in v0.2.0

type CFunctionWithKeywords = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) *Object

llgo:type C

type CMethod added in v0.2.0

type CMethod = func(_llcppg_param1 *Object, _llcppg_param2 *TypeObject, _llcppg_param3 **Object, _llcppg_param4 SsizeT, _llcppg_param5 *Object) *Object

llgo:type C

type CMethodObject added in v0.2.0

type CMethodObject struct {
	Func    CFunctionObject
	MmClass *TypeObject
}

func NewCMethod added in v0.2.3

func NewCMethod(_llcppg_param1 *MethodDef, _llcppg_param2 *Object, _llcppg_param3 *Object, _llcppg_param4 *TypeObject) *CMethodObject

type CapsuleDestructor added in v0.2.0

type CapsuleDestructor = func(_llcppg_param1 *Object)

llgo:type C

func CapsuleGetDestructor added in v0.2.3

func CapsuleGetDestructor(capsule *Object) CapsuleDestructor

type CellObject added in v0.2.0

type CellObject struct {
	ObBase Object
	ObRef  *Object
}

func NewCell added in v0.2.3

func NewCell(_llcppg_param1 *Object) *CellObject

func (*CellObject) Get added in v0.2.3

func (self *CellObject) Get() *Object

llgo:link (*CellObject).Get C.PyCell_Get

func (*CellObject) Set added in v0.2.3

func (self *CellObject) Set(_llcppg_param2 *Object) c.Int

llgo:link (*CellObject).Set C.PyCell_Set

type CodeAddressRange added in v0.2.0

type CodeAddressRange = X_lineOffsets

type CodeEvent added in v0.2.0

type CodeEvent c.Uint
const (
	CODE_EVENT_CREATE  CodeEvent = 0
	CODE_EVENT_DESTROY CodeEvent = 1
)

type CodeObject added in v0.2.0

type CodeObject struct {
	ObBase                     VarObject
	CoConsts                   *Object
	CoNames                    *Object
	CoExceptiontable           *Object
	CoFlags                    c.Int
	CoArgcount                 c.Int
	CoPosonlyargcount          c.Int
	CoKwonlyargcount           c.Int
	CoStacksize                c.Int
	CoFirstlineno              c.Int
	CoNlocalsplus              c.Int
	CoFramesize                c.Int
	CoNlocals                  c.Int
	CoNcellvars                c.Int
	CoNfreevars                c.Int
	CoVersion                  c.Uint32T
	CoLocalsplusnames          *Object
	CoLocalspluskinds          *Object
	CoFilename                 *Object
	CoName                     *Object
	CoQualname                 *Object
	CoLinetable                *Object
	CoWeakreflist              *Object
	CoExecutors                *X_ExecutorArray
	X_coCached                 *X_CoCached
	X_coInstrumentationVersion c.UintptrT
	X_coMonitoring             *X_CoMonitoringData
	X_coUniqueId               SsizeT
	X_coFirsttraceable         c.Int
	CoExtra                    unsafe.Pointer
	CoCodeAdaptive             [1]c.Char
}

Bytecode object

func CodeNewEmpty added in v0.2.0

func CodeNewEmpty(filename *c.Char, funcname *c.Char, firstlineno c.Int) *CodeObject

Creates a new empty code object with the specified source location.

func UnstableCodeNew added in v0.2.0

func UnstableCodeNew(_llcppg_param1 c.Int, _llcppg_param2 c.Int, _llcppg_param3 c.Int, _llcppg_param4 c.Int, _llcppg_param5 c.Int, _llcppg_param6 *Object, _llcppg_param7 *Object, _llcppg_param8 *Object, _llcppg_param9 *Object, _llcppg_param10 *Object, _llcppg_param11 *Object, _llcppg_param12 *Object, _llcppg_param13 *Object, _llcppg_param14 *Object, _llcppg_param15 c.Int, _llcppg_param16 *Object, _llcppg_param17 *Object) *CodeObject

Unstable public interface

func UnstableCodeNewWithPosOnlyArgs added in v0.2.0

func UnstableCodeNewWithPosOnlyArgs(_llcppg_param1 c.Int, _llcppg_param2 c.Int, _llcppg_param3 c.Int, _llcppg_param4 c.Int, _llcppg_param5 c.Int, _llcppg_param6 c.Int, _llcppg_param7 *Object, _llcppg_param8 *Object, _llcppg_param9 *Object, _llcppg_param10 *Object, _llcppg_param11 *Object, _llcppg_param12 *Object, _llcppg_param13 *Object, _llcppg_param14 *Object, _llcppg_param15 *Object, _llcppg_param16 c.Int, _llcppg_param17 *Object, _llcppg_param18 *Object) *CodeObject

same as struct above

func (*CodeObject) Addr2Line added in v0.2.3

func (self *CodeObject) Addr2Line(_llcppg_param2 c.Int) c.Int

Return the line number associated with the specified bytecode index in this code object. If you just need the line number of a frame, use PyFrame_GetLineNumber() instead.

llgo:link (*CodeObject).Addr2Line C.PyCode_Addr2Line

func (*CodeObject) Addr2Location added in v0.2.3

func (self *CodeObject) Addr2Location(_llcppg_param2 c.Int, _llcppg_param3 *c.Int, _llcppg_param4 *c.Int, _llcppg_param5 *c.Int, _llcppg_param6 *c.Int) c.Int

llgo:link (*CodeObject).Addr2Location C.PyCode_Addr2Location

func (*CodeObject) Cellvars added in v0.2.3

func (self *CodeObject) Cellvars() *Object

Equivalent to getattr(code, 'co_cellvars') in Python.

llgo:link (*CodeObject).Cellvars C.PyCode_GetCellvars

func (*CodeObject) Freevars added in v0.2.3

func (self *CodeObject) Freevars() *Object

Equivalent to getattr(code, 'co_freevars') in Python.

llgo:link (*CodeObject).Freevars C.PyCode_GetFreevars

func (*CodeObject) Get added in v0.2.3

func (self *CodeObject) Get() *Object

Equivalent to getattr(code, 'co_code') in Python. Returns a strong reference to a bytes object.

llgo:link (*CodeObject).Get C.PyCode_GetCode

func (*CodeObject) Optimize added in v0.2.3

func (self *CodeObject) Optimize(consts *Object, names *Object, lnotab *Object) *Object

llgo:link (*CodeObject).Optimize C.PyCode_Optimize

func (*CodeObject) Varnames added in v0.2.3

func (self *CodeObject) Varnames() *Object

Equivalent to getattr(code, 'co_varnames') in Python.

llgo:link (*CodeObject).Varnames C.PyCode_GetVarnames

type CodeWatchCallback added in v0.2.0

type CodeWatchCallback = func(_llcppg_param1 CodeEvent, _llcppg_param2 *CodeObject) c.Int

A callback that is invoked for different events in a code object's lifecycle.

The callback is invoked with a borrowed reference to co, after it is created and before it is destroyed.

If the callback sets an exception, it must return -1. Otherwise it should return 0.

llgo:type C

type CompactUnicodeObject added in v0.2.0

type CompactUnicodeObject struct {
	X_base     ASCIIObject
	Utf8Length SsizeT
	Utf8       *c.Char
}

Non-ASCII strings allocated through PyUnicode_New use the PyCompactUnicodeObject structure. state.compact is set, and the data immediately follow the structure.

type CompilerFlags added in v0.2.0

type CompilerFlags struct {
	CfFlags          c.Int
	CfFeatureVersion c.Int
}

type Complex added in v0.2.0

type Complex struct {
	Real c.Double
	Imag c.Double
}

func X_cDiff added in v0.2.0

func X_cDiff(_llcppg_param1 Complex, _llcppg_param2 Complex) Complex

func X_cNeg added in v0.2.0

func X_cNeg(_llcppg_param1 Complex) Complex

func X_cPow added in v0.2.0

func X_cPow(_llcppg_param1 Complex, _llcppg_param2 Complex) Complex

func X_cProd added in v0.2.0

func X_cProd(_llcppg_param1 Complex, _llcppg_param2 Complex) Complex

func X_cQuot added in v0.2.0

func X_cQuot(_llcppg_param1 Complex, _llcppg_param2 Complex) Complex

func X_cSum added in v0.2.0

func X_cSum(_llcppg_param1 Complex, _llcppg_param2 Complex) Complex

Operations on complex numbers.

type ComplexObject added in v0.2.0

type ComplexObject struct {
	ObBase Object
	Cval   Complex
}

PyComplexObject represents a complex number with double-precision real and imaginary parts.

func ComplexFromCComplex added in v0.2.4

func ComplexFromCComplex(_llcppg_param1 Complex) *ComplexObject

func ComplexFromDoubles added in v0.2.0

func ComplexFromDoubles(real c.Double, imag c.Double) *ComplexObject

func (*ComplexObject) AsC added in v0.2.3

func (self *ComplexObject) AsC() Complex

llgo:link (*ComplexObject).AsC C.PyComplex_AsCComplex

func (*ComplexObject) ImagAsDouble added in v0.2.3

func (self *ComplexObject) ImagAsDouble() c.Double

llgo:link (*ComplexObject).ImagAsDouble C.PyComplex_ImagAsDouble

func (*ComplexObject) RealAsDouble added in v0.2.3

func (self *ComplexObject) RealAsDouble() c.Double

llgo:link (*ComplexObject).RealAsDouble C.PyComplex_RealAsDouble

type Config added in v0.2.0

type Config struct {
	X_configInit          c.Int
	Isolated              c.Int
	UseEnvironment        c.Int
	DevMode               c.Int
	InstallSignalHandlers c.Int
	UseHashSeed           c.Int
	HashSeed              c.Ulong
	Faulthandler          c.Int
	Tracemalloc           c.Int
	PerfProfiling         c.Int
	RemoteDebug           c.Int
	ImportTime            c.Int
	CodeDebugRanges       c.Int
	ShowRefCount          c.Int
	DumpRefs              c.Int
	DumpRefsFile          *c.WcharT
	MallocStats           c.Int
	FilesystemEncoding    *c.WcharT
	FilesystemErrors      *c.WcharT
	PycachePrefix         *c.WcharT
	ParseArgv             c.Int
	OrigArgv              WideStringList
	Argv                  WideStringList
	Xoptions              WideStringList
	Warnoptions           WideStringList
	SiteImport            c.Int
	BytesWarning          c.Int
	WarnDefaultEncoding   c.Int
	Inspect               c.Int
	Interactive           c.Int
	OptimizationLevel     c.Int
	ParserDebug           c.Int
	WriteBytecode         c.Int
	Verbose               c.Int
	Quiet                 c.Int
	UserSiteDirectory     c.Int
	ConfigureCStdio       c.Int
	BufferedStdio         c.Int
	StdioEncoding         *c.WcharT
	StdioErrors           *c.WcharT
	CheckHashPycsMode     *c.WcharT
	UseFrozenModules      c.Int
	SafePath              c.Int
	IntMaxStrDigits       c.Int
	ThreadInheritContext  c.Int
	ContextAwareWarnings  c.Int
	UseSystemLogger       c.Int
	CpuCount              c.Int
	PathconfigWarnings    c.Int
	ProgramName           *c.WcharT
	PythonpathEnv         *c.WcharT
	Home                  *c.WcharT
	Platlibdir            *c.WcharT
	ModuleSearchPathsSet  c.Int
	ModuleSearchPaths     WideStringList
	StdlibDir             *c.WcharT
	Executable            *c.WcharT
	BaseExecutable        *c.WcharT
	Prefix                *c.WcharT
	BasePrefix            *c.WcharT
	ExecPrefix            *c.WcharT
	BaseExecPrefix        *c.WcharT
	SkipSourceFirstLine   c.Int
	RunCommand            *c.WcharT
	RunModule             *c.WcharT
	RunFilename           *c.WcharT
	SysPath0              *c.WcharT
	X_installImportlib    c.Int
	X_initMain            c.Int
	X_isPythonBuild       c.Int
}

This structure is best documented in the Doc/c-api/init_config.rst file.

func (*Config) Clear added in v0.2.0

func (self *Config) Clear()

llgo:link (*Config).Clear C.PyConfig_Clear

func (*Config) InitIsolated added in v0.2.0

func (self *Config) InitIsolated()

llgo:link (*Config).InitIsolated C.PyConfig_InitIsolatedConfig

func (*Config) InitPython added in v0.2.0

func (self *Config) InitPython()

llgo:link (*Config).InitPython C.PyConfig_InitPythonConfig

func (*Config) Read added in v0.2.0

func (self *Config) Read() Status

llgo:link (*Config).Read C.PyConfig_Read

func (*Config) SetArgv added in v0.2.0

func (self *Config) SetArgv(argc SsizeT, argv **c.WcharT) Status

llgo:link (*Config).SetArgv C.PyConfig_SetArgv

func (*Config) SetBytesArgv added in v0.2.0

func (self *Config) SetBytesArgv(argc SsizeT, argv **c.Char) Status

llgo:link (*Config).SetBytesArgv C.PyConfig_SetBytesArgv

func (*Config) SetBytesString added in v0.2.0

func (self *Config) SetBytesString(config_str **c.WcharT, str *c.Char) Status

llgo:link (*Config).SetBytesString C.PyConfig_SetBytesString

func (*Config) SetString added in v0.2.0

func (self *Config) SetString(config_str **c.WcharT, str *c.WcharT) Status

llgo:link (*Config).SetString C.PyConfig_SetString

func (*Config) SetWideStringList added in v0.2.0

func (self *Config) SetWideStringList(list *WideStringList, length SsizeT, items **c.WcharT) Status

llgo:link (*Config).SetWideStringList C.PyConfig_SetWideStringList

type Context added in v0.2.0

type Context = X_pycontextobject

type ContextEvent added in v0.2.0

type ContextEvent c.Uint
const CONTEXT_SWITCHED ContextEvent = 1

type ContextToken added in v0.2.0

type ContextToken = X_pycontexttokenobject

type ContextVar added in v0.2.0

type ContextVar = X_pycontextvarobject

type ContextWatchCallback added in v0.2.0

type ContextWatchCallback = func(_llcppg_param1 ContextEvent, _llcppg_param2 *Object) c.Int

Context object watcher callback function. The object passed to the callback is event-specific; see PyContextEvent for details.

if the callback returns with an exception set, it must return -1. Otherwise it should return 0

llgo:type C

type CoroObject added in v0.2.0

type CoroObject = X_CoroObject

type CriticalSection added in v0.2.0

type CriticalSection struct {
}

func (*CriticalSection) Begin added in v0.2.0

func (self *CriticalSection) Begin(op *Object)

llgo:link (*CriticalSection).Begin C.PyCriticalSection_Begin

func (*CriticalSection) BeginMutex added in v0.2.0

func (self *CriticalSection) BeginMutex(m *Mutex)

llgo:link (*CriticalSection).BeginMutex C.PyCriticalSection_BeginMutex

func (*CriticalSection) End added in v0.2.0

func (self *CriticalSection) End()

llgo:link (*CriticalSection).End C.PyCriticalSection_End

type CriticalSection2 added in v0.2.0

type CriticalSection2 struct {
}

func (*CriticalSection2) Begin added in v0.2.0

func (self *CriticalSection2) Begin(a *Object, b *Object)

llgo:link (*CriticalSection2).Begin C.PyCriticalSection2_Begin

func (*CriticalSection2) BeginMutex added in v0.2.0

func (self *CriticalSection2) BeginMutex(m1 *Mutex, m2 *Mutex)

llgo:link (*CriticalSection2).BeginMutex C.PyCriticalSection2_BeginMutex

func (*CriticalSection2) End added in v0.2.0

func (self *CriticalSection2) End()

llgo:link (*CriticalSection2).End C.PyCriticalSection2_End

type DescrObject added in v0.2.0

type DescrObject struct {
	ObBase    Object
	DType     *TypeObject
	DName     *Object
	DQualname *Object
}

func (*DescrObject) IsData added in v0.2.3

func (self *DescrObject) IsData() c.Int

llgo:link (*DescrObject).IsData C.PyDescr_IsData

type Descrgetfunc

type Descrgetfunc = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) *Object

llgo:type C

type Descrsetfunc

type Descrsetfunc = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) c.Int

llgo:type C

type Destructor

type Destructor = func(_llcppg_param1 *Object)

llgo:type C

type DictKeysObject added in v0.2.0

type DictKeysObject = X_dictkeysobject

type DictObject added in v0.2.0

type DictObject struct {
	ObBase         Object
	MaUsed         SsizeT
	X_maWatcherTag c.Uint64T
	MaKeys         *DictKeysObject
	MaValues       *DictValues
}

The ma_values pointer is NULL for a combined table or points to an array of PyObject* for a split table

func NewDict added in v0.2.3

func NewDict() *DictObject

func (*DictObject) Clear added in v0.2.3

func (self *DictObject) Clear()

llgo:link (*DictObject).Clear C.PyDict_Clear

func (*DictObject) Contains added in v0.2.3

func (self *DictObject) Contains(key *Object) c.Int

llgo:link (*DictObject).Contains C.PyDict_Contains

func (*DictObject) ContainsString added in v0.2.3

func (self *DictObject) ContainsString(key *c.Char) c.Int

llgo:link (*DictObject).ContainsString C.PyDict_ContainsString

func (*DictObject) Copy added in v0.2.3

func (self *DictObject) Copy() *Object

llgo:link (*DictObject).Copy C.PyDict_Copy

func (*DictObject) DelItem added in v0.2.3

func (self *DictObject) DelItem(key *Object) c.Int

llgo:link (*DictObject).DelItem C.PyDict_DelItem

func (*DictObject) DelItemString added in v0.2.3

func (self *DictObject) DelItemString(key *c.Char) c.Int

llgo:link (*DictObject).DelItemString C.PyDict_DelItemString

func (*DictObject) Item added in v0.2.3

func (self *DictObject) Item(key *Object) *Object

llgo:link (*DictObject).Item C.PyDict_GetItem

func (*DictObject) ItemRef added in v0.2.3

func (self *DictObject) ItemRef(key *Object, result **Object) c.Int

Return the object from dictionary *op* which has a key *key*.

  • If the key is present, set *result to a new strong reference to the value and return 1.
  • If the key is missing, set *result to NULL and return 0 .
  • On error, raise an exception and return -1.

llgo:link (*DictObject).ItemRef C.PyDict_GetItemRef

func (*DictObject) ItemString added in v0.2.3

func (self *DictObject) ItemString(key *c.Char) *Object

llgo:link (*DictObject).ItemString C.PyDict_GetItemString

func (*DictObject) ItemStringRef added in v0.2.3

func (self *DictObject) ItemStringRef(key *c.Char, result **Object) c.Int

llgo:link (*DictObject).ItemStringRef C.PyDict_GetItemStringRef

func (*DictObject) ItemWithError added in v0.2.3

func (self *DictObject) ItemWithError(key *Object) *Object

llgo:link (*DictObject).ItemWithError C.PyDict_GetItemWithError

func (*DictObject) Items added in v0.2.3

func (self *DictObject) Items() *Object

llgo:link (*DictObject).Items C.PyDict_Items

func (*DictObject) Keys added in v0.2.3

func (self *DictObject) Keys() *Object

llgo:link (*DictObject).Keys C.PyDict_Keys

func (*DictObject) Merge added in v0.2.3

func (self *DictObject) Merge(other *Object, override c.Int) c.Int

PyDict_Merge updates/merges from a mapping object (an object that supports PyMapping_Keys() and PyObject_GetItem()). If override is true, the last occurrence of a key wins, else the first. The Python dict.update(other) is equivalent to PyDict_Merge(dict, other, 1).

llgo:link (*DictObject).Merge C.PyDict_Merge

func (*DictObject) MergeFromSeq2 added in v0.2.3

func (self *DictObject) MergeFromSeq2(seq2 *Object, override c.Int) c.Int

PyDict_MergeFromSeq2 updates/merges from an iterable object producing iterable objects of length 2. If override is true, the last occurrence of a key wins, else the first. The Python dict constructor dict(seq2) is equivalent to dict={}; PyDict_MergeFromSeq(dict, seq2, 1).

llgo:link (*DictObject).MergeFromSeq2 C.PyDict_MergeFromSeq2

func (*DictObject) Next added in v0.2.3

func (self *DictObject) Next(pos *SsizeT, key **Object, value **Object) c.Int

llgo:link (*DictObject).Next C.PyDict_Next

func (*DictObject) Pop added in v0.2.3

func (self *DictObject) Pop(key *Object, result **Object) c.Int

llgo:link (*DictObject).Pop C.PyDict_Pop

func (*DictObject) PopString added in v0.2.3

func (self *DictObject) PopString(key *c.Char, result **Object) c.Int

llgo:link (*DictObject).PopString C.PyDict_PopString

func (*DictObject) SetDefault added in v0.2.3

func (self *DictObject) SetDefault(key *Object, defaultobj *Object) *Object

llgo:link (*DictObject).SetDefault C.PyDict_SetDefault

func (*DictObject) SetDefaultRef added in v0.2.3

func (self *DictObject) SetDefaultRef(key *Object, default_value *Object, result **Object) c.Int

Inserts `key` with a value `default_value`, if `key` is not already present in the dictionary. If `result` is not NULL, then the value associated with `key` is returned in `*result` (either the existing value, or the now inserted `default_value`). Returns:

-1 on error
 0 if `key` was not present and `default_value` was inserted
 1 if `key` was present and `default_value` was not inserted

llgo:link (*DictObject).SetDefaultRef C.PyDict_SetDefaultRef

func (*DictObject) SetItem added in v0.2.3

func (self *DictObject) SetItem(key *Object, item *Object) c.Int

llgo:link (*DictObject).SetItem C.PyDict_SetItem

func (*DictObject) SetItemString added in v0.2.3

func (self *DictObject) SetItemString(key *c.Char, item *Object) c.Int

llgo:link (*DictObject).SetItemString C.PyDict_SetItemString

func (*DictObject) Size added in v0.2.3

func (self *DictObject) Size() SsizeT

llgo:link (*DictObject).Size C.PyDict_Size

func (*DictObject) Update added in v0.2.3

func (self *DictObject) Update(other *Object) c.Int

PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1).

llgo:link (*DictObject).Update C.PyDict_Update

func (*DictObject) Values added in v0.2.3

func (self *DictObject) Values() *Object

llgo:link (*DictObject).Values C.PyDict_Values

type DictValues added in v0.2.0

type DictValues = X_dictvalues

type DictWatchCallback added in v0.2.0

type DictWatchCallback = func(_llcppg_param1 DictWatchEvent, _llcppg_param2 *Object, _llcppg_param3 *Object, _llcppg_param4 *Object) c.Int

Callback to be invoked when a watched dict is cleared, dealloced, or modified. In clear/dealloc case, key and new_value will be NULL. Otherwise, new_value will be the new value for key, NULL if key is being deleted.

llgo:type C

type DictWatchEvent added in v0.2.0

type DictWatchEvent c.Uint
const (
	Dict_EVENT_ADDED       DictWatchEvent = 0
	Dict_EVENT_MODIFIED    DictWatchEvent = 1
	Dict_EVENT_DELETED     DictWatchEvent = 2
	Dict_EVENT_CLONED      DictWatchEvent = 3
	Dict_EVENT_CLEARED     DictWatchEvent = 4
	Dict_EVENT_DEALLOCATED DictWatchEvent = 5
)

type Digit

type Digit = c.Uint32T

type EnvironmentErrorObject added in v0.2.0

type EnvironmentErrorObject = OSErrorObject

Compatibility typedefs

type FloatObject added in v0.2.0

type FloatObject struct {
	ObBase Object
	ObFval c.Double
}

func FloatFromDouble added in v0.2.0

func FloatFromDouble(_llcppg_param1 c.Double) *FloatObject

Return Python float from C double.

func FloatFromString added in v0.2.4

func FloatFromString(_llcppg_param1 *Object) *FloatObject

Return Python float from string PyObject.

func (*FloatObject) AsDouble added in v0.2.3

func (self *FloatObject) AsDouble() c.Double

Extract C double from Python float. The macro version trades safety for speed.

llgo:link (*FloatObject).AsDouble C.PyFloat_AsDouble

type FrameConstructor added in v0.2.0

type FrameConstructor struct {
	FcGlobals    *Object
	FcBuiltins   *Object
	FcName       *Object
	FcQualname   *Object
	FcCode       *Object
	FcDefaults   *Object
	FcKwdefaults *Object
	FcClosure    *Object
}

type FrameObject added in v0.2.0

type FrameObject = X_frame

func EvalGetFrame added in v0.2.0

func EvalGetFrame() *FrameObject

func (*FrameObject) Back added in v0.2.3

func (self *FrameObject) Back() *FrameObject

llgo:link (*FrameObject).Back C.PyFrame_GetBack

func (*FrameObject) Builtins added in v0.2.3

func (self *FrameObject) Builtins() *Object

llgo:link (*FrameObject).Builtins C.PyFrame_GetBuiltins

func (*FrameObject) Code added in v0.2.3

func (self *FrameObject) Code() *CodeObject

llgo:link (*FrameObject).Code C.PyFrame_GetCode

func (*FrameObject) GenNewWithQualName added in v0.2.3

func (self *FrameObject) GenNewWithQualName(name *Object, qualname *Object) *Object

llgo:link (*FrameObject).GenNewWithQualName C.PyGen_NewWithQualName

func (*FrameObject) Generator added in v0.2.3

func (self *FrameObject) Generator() *Object

llgo:link (*FrameObject).Generator C.PyFrame_GetGenerator

func (*FrameObject) Globals added in v0.2.3

func (self *FrameObject) Globals() *Object

llgo:link (*FrameObject).Globals C.PyFrame_GetGlobals

func (*FrameObject) Lasti added in v0.2.3

func (self *FrameObject) Lasti() c.Int

llgo:link (*FrameObject).Lasti C.PyFrame_GetLasti

func (*FrameObject) LineNumber added in v0.2.3

func (self *FrameObject) LineNumber() c.Int

Return the line of code the frame is currently executing.

llgo:link (*FrameObject).LineNumber C.PyFrame_GetLineNumber

func (*FrameObject) Locals added in v0.2.3

func (self *FrameObject) Locals() *Object

llgo:link (*FrameObject).Locals C.PyFrame_GetLocals

func (*FrameObject) Var added in v0.2.3

func (self *FrameObject) Var(name *Object) *Object

llgo:link (*FrameObject).Var C.PyFrame_GetVar

func (*FrameObject) VarString added in v0.2.3

func (self *FrameObject) VarString(name *c.Char) *Object

llgo:link (*FrameObject).VarString C.PyFrame_GetVarString

type Freefunc

type Freefunc = func(_llcppg_param1 unsafe.Pointer)

llgo:type C

type FunctionObject added in v0.2.0

type FunctionObject struct {
	ObBase          Object
	FuncGlobals     *Object
	FuncBuiltins    *Object
	FuncName        *Object
	FuncQualname    *Object
	FuncCode        *Object
	FuncDefaults    *Object
	FuncKwdefaults  *Object
	FuncClosure     *Object
	FuncDoc         *Object
	FuncDict        *Object
	FuncWeakreflist *Object
	FuncModule      *Object
	FuncAnnotations *Object
	FuncAnnotate    *Object
	FuncTypeparams  *Object
	Vectorcall      Vectorcallfunc
	FuncVersion     c.Uint32T
}

func NewFunction added in v0.2.3

func NewFunction(_llcppg_param1 *Object, _llcppg_param2 *Object) *FunctionObject

func (*FunctionObject) Annotations added in v0.2.3

func (self *FunctionObject) Annotations() *Object

llgo:link (*FunctionObject).Annotations C.PyFunction_GetAnnotations

func (*FunctionObject) Closure added in v0.2.3

func (self *FunctionObject) Closure() *Object

llgo:link (*FunctionObject).Closure C.PyFunction_GetClosure

func (*FunctionObject) Code added in v0.2.3

func (self *FunctionObject) Code() *Object

llgo:link (*FunctionObject).Code C.PyFunction_GetCode

func (*FunctionObject) Defaults added in v0.2.3

func (self *FunctionObject) Defaults() *Object

llgo:link (*FunctionObject).Defaults C.PyFunction_GetDefaults

func (*FunctionObject) Globals added in v0.2.3

func (self *FunctionObject) Globals() *Object

llgo:link (*FunctionObject).Globals C.PyFunction_GetGlobals

func (*FunctionObject) KwDefaults added in v0.2.3

func (self *FunctionObject) KwDefaults() *Object

llgo:link (*FunctionObject).KwDefaults C.PyFunction_GetKwDefaults

func (*FunctionObject) Module added in v0.2.3

func (self *FunctionObject) Module() *Object

llgo:link (*FunctionObject).Module C.PyFunction_GetModule

func (*FunctionObject) NewWithQualName added in v0.2.3

func (self *FunctionObject) NewWithQualName(_llcppg_param2 *Object, _llcppg_param3 *Object) *Object

llgo:link (*FunctionObject).NewWithQualName C.PyFunction_NewWithQualName

func (*FunctionObject) SetAnnotations added in v0.2.3

func (self *FunctionObject) SetAnnotations(_llcppg_param2 *Object) c.Int

llgo:link (*FunctionObject).SetAnnotations C.PyFunction_SetAnnotations

func (*FunctionObject) SetClosure added in v0.2.3

func (self *FunctionObject) SetClosure(_llcppg_param2 *Object) c.Int

llgo:link (*FunctionObject).SetClosure C.PyFunction_SetClosure

func (*FunctionObject) SetDefaults added in v0.2.3

func (self *FunctionObject) SetDefaults(_llcppg_param2 *Object) c.Int

llgo:link (*FunctionObject).SetDefaults C.PyFunction_SetDefaults

func (*FunctionObject) SetKwDefaults added in v0.2.3

func (self *FunctionObject) SetKwDefaults(_llcppg_param2 *Object) c.Int

llgo:link (*FunctionObject).SetKwDefaults C.PyFunction_SetKwDefaults

func (*FunctionObject) SetVectorcall added in v0.2.3

func (self *FunctionObject) SetVectorcall(_llcppg_param2 Vectorcallfunc)

llgo:link (*FunctionObject).SetVectorcall C.PyFunction_SetVectorcall

type FunctionWatchCallback added in v0.2.0

type FunctionWatchCallback = func(_llcppg_param1 FunctionWatchEvent, _llcppg_param2 *FunctionObject, _llcppg_param3 *Object) c.Int

A callback that is invoked for different events in a function's lifecycle.

The callback is invoked with a borrowed reference to func, after it is created and before it is modified or destroyed. The callback should not modify func.

When a function's code object, defaults, or kwdefaults are modified the callback will be invoked with the respective event and new_value will contain a borrowed reference to the new value that is about to be stored in the function. Otherwise the third argument is NULL.

If the callback returns with an exception set, it must return -1. Otherwise it should return 0.

llgo:type C

type FunctionWatchEvent added in v0.2.0

type FunctionWatchEvent c.Uint
const (
	Function_EVENT_CREATE            FunctionWatchEvent = 0
	Function_EVENT_DESTROY           FunctionWatchEvent = 1
	Function_EVENT_MODIFY_CODE       FunctionWatchEvent = 2
	Function_EVENT_MODIFY_DEFAULTS   FunctionWatchEvent = 3
	Function_EVENT_MODIFY_KWDEFAULTS FunctionWatchEvent = 4
)

type GILState_STATE added in v0.2.0

type GILState_STATE c.Uint
const (
	GILState_LOCKED   GILState_STATE = 0
	GILState_UNLOCKED GILState_STATE = 1
)

func GILStateEnsure added in v0.2.0

func GILStateEnsure() GILState_STATE

Ensure that the current thread is ready to call the Python C API, regardless of the current state of Python, or of its thread lock. This may be called as many times as desired by a thread so long as each call is matched with a call to PyGILState_Release(). In general, other thread-state APIs may be used between _Ensure() and _Release() calls, so long as the thread-state is restored to its previous state before the Release(). For example, normal use of the Py_BEGIN_ALLOW_THREADS/ Py_END_ALLOW_THREADS macros are acceptable.

The return value is an opaque "handle" to the thread state when PyGILState_Ensure() was called, and must be passed to PyGILState_Release() to ensure Python is left in the same state. Even though recursive calls are allowed, these handles can *not* be shared - each unique call to PyGILState_Ensure must save the handle for its call to PyGILState_Release.

When the function returns, the current thread will hold the GIL.

Failure is a fatal error.

type GcvisitobjectsT

type GcvisitobjectsT = func(_llcppg_param1 *Object, _llcppg_param2 unsafe.Pointer) c.Int

Visit all live GC-capable objects, similar to gc.get_objects(None). The supplied callback is called on every such object with the void* arg set to the supplied arg. Returning 0 from the callback ends iteration, returning 1 allows iteration to continue. Returning any other value may result in undefined behaviour.

If new objects are (de)allocated by the callback it is undefined if they will be visited.

Garbage collection is disabled during operation. Explicitly running a collection in the callback may lead to undefined behaviour e.g. visiting the same objects multiple times or not at all.

llgo:type C

type GenObject added in v0.2.0

type GenObject = X_GenObject

func (*GenObject) Code added in v0.2.3

func (self *GenObject) Code() *CodeObject

llgo:link (*GenObject).Code C.PyGen_GetCode

type GetSetDef added in v0.2.0

type GetSetDef struct {
	Name    *c.Char
	Get     Getter
	Set     Setter
	Doc     *c.Char
	Closure unsafe.Pointer
}

type GetSetDescrObject added in v0.2.0

type GetSetDescrObject struct {
	DCommon DescrObject
	DGetset *GetSetDef
}

type Getattrfunc

type Getattrfunc = func(_llcppg_param1 *Object, _llcppg_param2 *c.Char) *Object

llgo:type C

type Getattrofunc

type Getattrofunc = func(_llcppg_param1 *Object, _llcppg_param2 *Object) *Object

llgo:type C

type Getbufferproc

type Getbufferproc = func(_llcppg_param1 *Object, _llcppg_param2 *Buffer, _llcppg_param3 c.Int) c.Int

llgo:type C

type Getiterfunc

type Getiterfunc = func(_llcppg_param1 *Object) *Object

llgo:type C

type Getter

type Getter = func(_llcppg_param1 *Object, _llcppg_param2 unsafe.Pointer) *Object

llgo:type C

type HashFuncDef added in v0.2.0

type HashFuncDef struct {
	Hash     func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 SsizeT) HashT
	Name     *c.Char
	HashBits c.Int
	SeedBits c.Int
}

hash function definition

llgo:type C

func HashGetFuncDef added in v0.2.0

func HashGetFuncDef() *HashFuncDef

type HashT added in v0.2.0

type HashT = SsizeT

Py_uhash_t is the unsigned equivalent needed to calculate numeric hash.

func HashBuffer added in v0.2.0

func HashBuffer(ptr unsafe.Pointer, len SsizeT) HashT

func HashPointer added in v0.2.0

func HashPointer(ptr unsafe.Pointer) HashT

func X_HashDouble added in v0.2.0

func X_HashDouble(_llcppg_param1 *Object, _llcppg_param2 c.Double) HashT

Helpers for hash functions

type Hashfunc

type Hashfunc = func(_llcppg_param1 *Object) HashT

llgo:type C

type HeapTypeObject added in v0.2.0

type HeapTypeObject = X_heaptypeobject

The *real* layout of a type object when allocated on the heap

type ImportErrorObject added in v0.2.0

type ImportErrorObject struct {
	ObBase          Object
	Dict            *Object
	Args            *Object
	Notes           *Object
	Traceback       *Object
	Context         *Object
	Cause           *Object
	SuppressContext c.Char
	Msg             *Object
	Name            *Object
	Path            *Object
	NameFrom        *Object
}

type InitConfig added in v0.2.0

type InitConfig struct {
}

func InitConfigCreate added in v0.2.0

func InitConfigCreate() *InitConfig

func (*InitConfig) AddModule added in v0.2.0

func (self *InitConfig) AddModule(name *c.Char, initfunc func() *Object) c.Int

llgo:link (*InitConfig).AddModule C.PyInitConfig_AddModule

func (*InitConfig) Error added in v0.2.0

func (self *InitConfig) Error(err_msg **c.Char) c.Int

llgo:link (*InitConfig).Error C.PyInitConfig_GetError

func (*InitConfig) ExitCode added in v0.2.0

func (self *InitConfig) ExitCode(exitcode *c.Int) c.Int

llgo:link (*InitConfig).ExitCode C.PyInitConfig_GetExitCode

func (*InitConfig) Free added in v0.2.0

func (self *InitConfig) Free()

llgo:link (*InitConfig).Free C.PyInitConfig_Free

func (*InitConfig) HasOption added in v0.2.0

func (self *InitConfig) HasOption(name *c.Char) c.Int

llgo:link (*InitConfig).HasOption C.PyInitConfig_HasOption

func (*InitConfig) Int added in v0.2.0

func (self *InitConfig) Int(name *c.Char, value *c.Int64T) c.Int

llgo:link (*InitConfig).Int C.PyInitConfig_GetInt

func (*InitConfig) SetInt added in v0.2.0

func (self *InitConfig) SetInt(name *c.Char, value c.Int64T) c.Int

llgo:link (*InitConfig).SetInt C.PyInitConfig_SetInt

func (*InitConfig) SetStr added in v0.2.0

func (self *InitConfig) SetStr(name *c.Char, value *c.Char) c.Int

llgo:link (*InitConfig).SetStr C.PyInitConfig_SetStr

func (*InitConfig) SetStrList added in v0.2.0

func (self *InitConfig) SetStrList(name *c.Char, length c.SizeT, items **c.Char) c.Int

llgo:link (*InitConfig).SetStrList C.PyInitConfig_SetStrList

func (*InitConfig) Str added in v0.2.0

func (self *InitConfig) Str(name *c.Char, value **c.Char) c.Int

llgo:link (*InitConfig).Str C.PyInitConfig_GetStr

func (*InitConfig) StrList added in v0.2.0

func (self *InitConfig) StrList(name *c.Char, length *c.SizeT, items ***c.Char) c.Int

llgo:link (*InitConfig).StrList C.PyInitConfig_GetStrList

type Initproc

type Initproc = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) c.Int

llgo:type C

type Inquiry

type Inquiry = func(_llcppg_param1 *Object) c.Int

llgo:type C

type InstanceMethodObject added in v0.2.0

type InstanceMethodObject struct {
	ObBase Object
	Func   *Object
}

func NewInstanceMethod added in v0.2.3

func NewInstanceMethod(_llcppg_param1 *Object) *InstanceMethodObject

func (*InstanceMethodObject) Function added in v0.2.3

func (self *InstanceMethodObject) Function() *Object

llgo:link (*InstanceMethodObject).Function C.PyInstanceMethod_Function

type InterpreterConfig added in v0.2.0

type InterpreterConfig struct {
	UseMainObmalloc            c.Int
	AllowFork                  c.Int
	AllowExec                  c.Int
	AllowThreads               c.Int
	AllowDaemonThreads         c.Int
	CheckMultiInterpExtensions c.Int
	Gil                        c.Int
}

type InterpreterState added in v0.2.0

type InterpreterState = X_is

func InterpreterStateGet added in v0.2.0

func InterpreterStateGet() *InterpreterState

Get the current interpreter state.

Issue a fatal error if there no current Python thread state or no current interpreter. It cannot return NULL.

The caller must hold the GIL.

func InterpreterStateHead added in v0.2.0

func InterpreterStateHead() *InterpreterState

func InterpreterStateMain added in v0.2.0

func InterpreterStateMain() *InterpreterState

Routines for advanced debuggers, requested by David Beazley. Don't use unless you know what you are doing!

func InterpreterStateNew added in v0.2.0

func InterpreterStateNew() *InterpreterState

func (*InterpreterState) Clear added in v0.2.0

func (self *InterpreterState) Clear()

llgo:link (*InterpreterState).Clear C.PyInterpreterState_Clear

func (*InterpreterState) Delete added in v0.2.0

func (self *InterpreterState) Delete()

llgo:link (*InterpreterState).Delete C.PyInterpreterState_Delete

func (*InterpreterState) Dict added in v0.2.0

func (self *InterpreterState) Dict() *Object

New in 3.8

llgo:link (*InterpreterState).Dict C.PyInterpreterState_GetDict

func (*InterpreterState) ID added in v0.2.0

func (self *InterpreterState) ID() c.Int64T

New in 3.7

llgo:link (*InterpreterState).ID C.PyInterpreterState_GetID

func (*InterpreterState) Next added in v0.2.0

func (self *InterpreterState) Next() *InterpreterState

llgo:link (*InterpreterState).Next C.PyInterpreterState_Next

func (*InterpreterState) ThreadHead added in v0.2.0

func (self *InterpreterState) ThreadHead() *ThreadState

llgo:link (*InterpreterState).ThreadHead C.PyInterpreterState_ThreadHead

type IntptrT added in v0.2.0

type IntptrT = c.IntptrT

type Iternextfunc

type Iternextfunc = func(_llcppg_param1 *Object) *Object

llgo:type C

type Lenfunc

type Lenfunc = func(_llcppg_param1 *Object) SsizeT

llgo:type C

type ListObject added in v0.2.0

type ListObject struct {
	ObBase    VarObject
	ObItem    **Object
	Allocated SsizeT
}

func NewList added in v0.2.3

func NewList(size SsizeT) *ListObject

func (*ListObject) Append added in v0.2.3

func (self *ListObject) Append(_llcppg_param2 *Object) c.Int

llgo:link (*ListObject).Append C.PyList_Append

func (*ListObject) AsTuple added in v0.2.3

func (self *ListObject) AsTuple() *Object

llgo:link (*ListObject).AsTuple C.PyList_AsTuple

func (*ListObject) Clear added in v0.2.3

func (self *ListObject) Clear() c.Int

llgo:link (*ListObject).Clear C.PyList_Clear

func (*ListObject) Extend added in v0.2.3

func (self *ListObject) Extend(iterable *Object) c.Int

llgo:link (*ListObject).Extend C.PyList_Extend

func (*ListObject) Insert added in v0.2.3

func (self *ListObject) Insert(_llcppg_param2 SsizeT, _llcppg_param3 *Object) c.Int

llgo:link (*ListObject).Insert C.PyList_Insert

func (*ListObject) Item added in v0.2.3

func (self *ListObject) Item(_llcppg_param2 SsizeT) *Object

llgo:link (*ListObject).Item C.PyList_GetItem

func (*ListObject) ItemRef added in v0.2.3

func (self *ListObject) ItemRef(_llcppg_param2 SsizeT) *Object

llgo:link (*ListObject).ItemRef C.PyList_GetItemRef

func (*ListObject) Reverse added in v0.2.3

func (self *ListObject) Reverse() c.Int

llgo:link (*ListObject).Reverse C.PyList_Reverse

func (*ListObject) SetItem added in v0.2.3

func (self *ListObject) SetItem(_llcppg_param2 SsizeT, _llcppg_param3 *Object) c.Int

llgo:link (*ListObject).SetItem C.PyList_SetItem

func (*ListObject) SetSlice added in v0.2.3

func (self *ListObject) SetSlice(_llcppg_param2 SsizeT, _llcppg_param3 SsizeT, _llcppg_param4 *Object) c.Int

llgo:link (*ListObject).SetSlice C.PyList_SetSlice

func (*ListObject) Size added in v0.2.3

func (self *ListObject) Size() SsizeT

llgo:link (*ListObject).Size C.PyList_Size

func (*ListObject) Slice added in v0.2.3

func (self *ListObject) Slice(_llcppg_param2 SsizeT, _llcppg_param3 SsizeT) *Object

llgo:link (*ListObject).Slice C.PyList_GetSlice

func (*ListObject) Sort added in v0.2.3

func (self *ListObject) Sort() c.Int

llgo:link (*ListObject).Sort C.PyList_Sort

type LockStatus added in v0.2.0

type LockStatus c.Uint

Return status codes for Python lock acquisition. Chosen for maximum backwards compatibility, ie failure -> 0, success -> 1.

const (
	LOCK_FAILURE  LockStatus = 0
	LOCK_ACQUIRED LockStatus = 1
	LOCK_INTR     LockStatus = 2
)

func ThreadAcquireLockTimed added in v0.2.3

func ThreadAcquireLockTimed(_llcppg_param1 ThreadTypeLock, microseconds c.LongLong, intr_flag c.Int) LockStatus

If microseconds == 0, the call is non-blocking: it returns immediately even when the lock can't be acquired. If microseconds > 0, the call waits up to the specified duration. If microseconds < 0, the call waits until success (or abnormal failure)

If *microseconds* is greater than PY_TIMEOUT_MAX, clamp the timeout to PY_TIMEOUT_MAX microseconds.

If intr_flag is true and the acquire is interrupted by a signal, then the call will return PY_LOCK_INTR. The caller may reattempt to acquire the lock.

type LongExport added in v0.2.0

type LongExport struct {
	Value      c.Int64T
	Negative   c.Uint8T
	Ndigits    SsizeT
	Digits     unsafe.Pointer
	X_reserved UintptrT
}

func (*LongExport) Free added in v0.3.0

func (self *LongExport) Free()

llgo:link (*LongExport).Free C.PyLong_FreeExport

type LongLayout added in v0.2.0

type LongLayout struct {
	BitsPerDigit    c.Uint8T
	DigitSize       c.Uint8T
	DigitsOrder     c.Int8T
	DigitEndianness c.Int8T
}

func LongGetNativeLayout added in v0.2.0

func LongGetNativeLayout() *LongLayout

type LongObject added in v0.2.0

type LongObject = X_longobject
var X_FalseStruct LongObject

Don't use these directly

var X_TrueStruct LongObject

func LongFromDouble added in v0.2.0

func LongFromDouble(_llcppg_param1 c.Double) *LongObject

func LongFromInt32 added in v0.2.0

func LongFromInt32(value c.Int32T) *LongObject

func LongFromInt64 added in v0.2.0

func LongFromInt64(value c.Int64T) *LongObject

func LongFromLong added in v0.2.0

func LongFromLong(_llcppg_param1 c.Long) *LongObject

func LongFromLongLong added in v0.2.0

func LongFromLongLong(_llcppg_param1 c.LongLong) *LongObject

func LongFromNativeBytes added in v0.2.0

func LongFromNativeBytes(buffer unsafe.Pointer, n_bytes c.SizeT, flags c.Int) *LongObject

PyLong_FromNativeBytes: Create an int value from a native integer n_bytes is the number of bytes to read from the buffer. Passing 0 will always produce the zero int. PyLong_FromUnsignedNativeBytes always produces a non-negative int. flags is the same as for PyLong_AsNativeBytes, but only supports selecting the endianness or forcing an unsigned buffer.

Returns the int object, or NULL with an exception set.

func LongFromSizeT added in v0.2.0

func LongFromSizeT(_llcppg_param1 c.SizeT) *LongObject

func LongFromSsizeT added in v0.2.0

func LongFromSsizeT(_llcppg_param1 SsizeT) *LongObject

func LongFromString added in v0.2.0

func LongFromString(_llcppg_param1 *c.Char, _llcppg_param2 **c.Char, _llcppg_param3 c.Int) *LongObject

func LongFromUInt32 added in v0.2.0

func LongFromUInt32(value c.Uint32T) *LongObject

func LongFromUInt64 added in v0.2.0

func LongFromUInt64(value c.Uint64T) *LongObject

func LongFromUnicodeObject added in v0.2.4

func LongFromUnicodeObject(u *Object, base c.Int) *LongObject

func LongFromUnsignedLong added in v0.2.0

func LongFromUnsignedLong(_llcppg_param1 c.Ulong) *LongObject

func LongFromUnsignedLongLong added in v0.2.0

func LongFromUnsignedLongLong(_llcppg_param1 c.UlongLong) *LongObject

func LongFromUnsignedNativeBytes added in v0.2.0

func LongFromUnsignedNativeBytes(buffer unsafe.Pointer, n_bytes c.SizeT, flags c.Int) *LongObject

func LongFromVoidPtr added in v0.2.0

func LongFromVoidPtr(_llcppg_param1 unsafe.Pointer) *LongObject

func X_LongFromDigits added in v0.2.0

func X_LongFromDigits(negative c.Int, digit_count SsizeT, digits *Digit) *LongObject

func X_LongNew added in v0.2.0

func X_LongNew(_llcppg_param1 SsizeT) *LongObject

func (*LongObject) AsDouble added in v0.2.3

func (self *LongObject) AsDouble() c.Double

llgo:link (*LongObject).AsDouble C.PyLong_AsDouble

func (*LongObject) AsInt added in v0.2.3

func (self *LongObject) AsInt() c.Int

llgo:link (*LongObject).AsInt C.PyLong_AsInt

func (*LongObject) AsInt32 added in v0.2.3

func (self *LongObject) AsInt32(value *c.Int32T) c.Int

llgo:link (*LongObject).AsInt32 C.PyLong_AsInt32

func (*LongObject) AsInt64 added in v0.2.3

func (self *LongObject) AsInt64(value *c.Int64T) c.Int

llgo:link (*LongObject).AsInt64 C.PyLong_AsInt64

func (*LongObject) AsLong added in v0.2.3

func (self *LongObject) AsLong() c.Long

llgo:link (*LongObject).AsLong C.PyLong_AsLong

func (*LongObject) AsLongAndOverflow added in v0.2.3

func (self *LongObject) AsLongAndOverflow(_llcppg_param2 *c.Int) c.Long

llgo:link (*LongObject).AsLongAndOverflow C.PyLong_AsLongAndOverflow

func (*LongObject) AsLongLong added in v0.3.1

func (self *LongObject) AsLongLong() c.LongLong

llgo:link (*LongObject).AsLongLong C.PyLong_AsLongLong

func (*LongObject) AsLongLongAndOverflow added in v0.2.3

func (self *LongObject) AsLongLongAndOverflow(_llcppg_param2 *c.Int) c.LongLong

llgo:link (*LongObject).AsLongLongAndOverflow C.PyLong_AsLongLongAndOverflow

func (*LongObject) AsNativeBytes added in v0.2.3

func (self *LongObject) AsNativeBytes(buffer unsafe.Pointer, n_bytes SsizeT, flags c.Int) SsizeT

PyLong_AsNativeBytes: Copy the integer value to a native variable. buffer points to the first byte of the variable. n_bytes is the number of bytes available in the buffer. Pass 0 to request the required size for the value. flags is a bitfield of the following flags: 1 - little endian 2 - native endian 4 - unsigned destination (e.g. don't reject copying 255 into one byte) 8 - raise an exception for negative inputs 16 - call __index__ on non-int types If flags is -1 (all bits set), native endian is used, value truncation behaves most like C (allows negative inputs and allow MSB set), and non-int objects will raise a TypeError. Big endian mode will write the most significant byte into the address directly referenced by buffer; little endian will write the least significant byte into that address.

If an exception is raised, returns a negative value. Otherwise, returns the number of bytes that are required to store the value. To check that the full value is represented, ensure that the return value is equal or less than n_bytes. All n_bytes are guaranteed to be written (unless an exception occurs), and so ignoring a positive return value is the equivalent of a downcast in C. In cases where the full value could not be represented, the returned value may be larger than necessary - this function is not an accurate way to calculate the bit length of an integer object.

llgo:link (*LongObject).AsNativeBytes C.PyLong_AsNativeBytes

func (*LongObject) AsSizeT added in v0.2.3

func (self *LongObject) AsSizeT() c.SizeT

llgo:link (*LongObject).AsSizeT C.PyLong_AsSize_t

func (*LongObject) AsSsizeT added in v0.2.3

func (self *LongObject) AsSsizeT() SsizeT

llgo:link (*LongObject).AsSsizeT C.PyLong_AsSsize_t

func (*LongObject) AsUInt32 added in v0.2.3

func (self *LongObject) AsUInt32(value *c.Uint32T) c.Int

llgo:link (*LongObject).AsUInt32 C.PyLong_AsUInt32

func (*LongObject) AsUInt64 added in v0.2.3

func (self *LongObject) AsUInt64(value *c.Uint64T) c.Int

llgo:link (*LongObject).AsUInt64 C.PyLong_AsUInt64

func (*LongObject) AsUnsigned added in v0.2.3

func (self *LongObject) AsUnsigned() c.Ulong

llgo:link (*LongObject).AsUnsigned C.PyLong_AsUnsignedLong

func (*LongObject) AsUnsignedLong added in v0.2.3

func (self *LongObject) AsUnsignedLong() c.UlongLong

llgo:link (*LongObject).AsUnsignedLong C.PyLong_AsUnsignedLongLong

func (*LongObject) AsUnsignedLongLongMask added in v0.2.3

func (self *LongObject) AsUnsignedLongLongMask() c.UlongLong

llgo:link (*LongObject).AsUnsignedLongLongMask C.PyLong_AsUnsignedLongLongMask

func (*LongObject) AsUnsignedLongMask added in v0.2.3

func (self *LongObject) AsUnsignedLongMask() c.Ulong

llgo:link (*LongObject).AsUnsignedLongMask C.PyLong_AsUnsignedLongMask

func (*LongObject) AsVoidPtr added in v0.2.3

func (self *LongObject) AsVoidPtr() unsafe.Pointer

llgo:link (*LongObject).AsVoidPtr C.PyLong_AsVoidPtr

func (*LongObject) Export added in v0.2.3

func (self *LongObject) Export(export_long *LongExport) c.Int

llgo:link (*LongObject).Export C.PyLong_Export

func (*LongObject) IsNegative added in v0.2.3

func (self *LongObject) IsNegative() c.Int

PyLong_IsNegative. Check if the integer object is negative.

- On success, return 1 if *obj is negative, and 0 otherwise. - On failure, set an exception, and return -1.

llgo:link (*LongObject).IsNegative C.PyLong_IsNegative

func (*LongObject) IsPositive added in v0.2.3

func (self *LongObject) IsPositive() c.Int

PyLong_IsPositive. Check if the integer object is positive.

- On success, return 1 if *obj is positive, and 0 otherwise. - On failure, set an exception, and return -1.

llgo:link (*LongObject).IsPositive C.PyLong_IsPositive

func (*LongObject) IsZero added in v0.2.3

func (self *LongObject) IsZero() c.Int

PyLong_IsZero. Check if the integer object is zero.

- On success, return 1 if *obj is zero, and 0 if it is non-zero. - On failure, set an exception, and return -1.

llgo:link (*LongObject).IsZero C.PyLong_IsZero

func (*LongObject) Sign added in v0.2.3

func (self *LongObject) Sign(sign *c.Int) c.Int

PyLong_GetSign. Get the sign of an integer object: 0, -1 or +1 for zero, negative or positive integer, respectively.

- On success, set '*sign' to the integer sign, and return 0. - On failure, set an exception, and return -1.

llgo:link (*LongObject).Sign C.PyLong_GetSign

type LongWriter added in v0.2.0

type LongWriter struct {
}

func LongWriterCreate added in v0.2.0

func LongWriterCreate(negative c.Int, ndigits SsizeT, digits *unsafe.Pointer) *LongWriter

func (*LongWriter) Discard added in v0.2.0

func (self *LongWriter) Discard()

llgo:link (*LongWriter).Discard C.PyLongWriter_Discard

func (*LongWriter) Finish added in v0.2.0

func (self *LongWriter) Finish() *Object

llgo:link (*LongWriter).Finish C.PyLongWriter_Finish

type MappingMethods added in v0.2.0

type MappingMethods struct {
	MpLength       Lenfunc
	MpSubscript    Binaryfunc
	MpAssSubscript Objobjargproc
}

type MemAllocatorDomain added in v0.2.0

type MemAllocatorDomain c.Uint
const (
	// PyMem_RawMalloc(), PyMem_RawRealloc() and PyMem_RawFree()
	PYMEM_DOMAIN_RAW MemAllocatorDomain = 0
	// PyMem_Malloc(), PyMem_Realloc() and PyMem_Free()
	PYMEM_DOMAIN_MEM MemAllocatorDomain = 1
	// PyObject_Malloc(), PyObject_Realloc() and PyObject_Free()
	PYMEM_DOMAIN_OBJ MemAllocatorDomain = 2
)

type MemAllocatorEx added in v0.2.0

type MemAllocatorEx struct {
	Ctx     unsafe.Pointer
	Malloc  func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 c.SizeT) unsafe.Pointer
	Calloc  func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 c.SizeT, _llcppg_param3 c.SizeT) unsafe.Pointer
	Realloc func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 unsafe.Pointer, _llcppg_param3 c.SizeT) unsafe.Pointer
	Free    func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 unsafe.Pointer)
}

llgo:type C

type MemAllocatorName added in v0.2.0

type MemAllocatorName c.Uint
const (
	PYMEM_ALLOCATOR_NOT_SET        MemAllocatorName = 0
	PYMEM_ALLOCATOR_DEFAULT        MemAllocatorName = 1
	PYMEM_ALLOCATOR_DEBUG          MemAllocatorName = 2
	PYMEM_ALLOCATOR_MALLOC         MemAllocatorName = 3
	PYMEM_ALLOCATOR_MALLOC_DEBUG   MemAllocatorName = 4
	PYMEM_ALLOCATOR_PYMALLOC       MemAllocatorName = 5
	PYMEM_ALLOCATOR_PYMALLOC_DEBUG MemAllocatorName = 6
	PYMEM_ALLOCATOR_MIMALLOC       MemAllocatorName = 7
	PYMEM_ALLOCATOR_MIMALLOC_DEBUG MemAllocatorName = 8
)

type MemberDef added in v0.2.0

type MemberDef struct {
	Name   *c.Char
	Type   c.Int
	Offset SsizeT
	Flags  c.Int
	Doc    *c.Char
}

An array of PyMemberDef structures defines the name, type and offset of selected members of a C structure. These can be read by PyMember_GetOne() and set by PyMember_SetOne() (except if their READONLY flag is set). The array must be terminated with an entry whose name pointer is NULL.

type MemberDescrObject added in v0.2.0

type MemberDescrObject struct {
	DCommon DescrObject
	DMember *MemberDef
}

type MemoryViewObject added in v0.2.0

type MemoryViewObject struct {
	ObBase      VarObject
	Mbuf        *X_ManagedBufferObject
	Hash        HashT
	Flags       c.Int
	Exports     SsizeT
	View        Buffer
	Weakreflist *Object
	ObArray     [1]SsizeT
}

func MemoryViewFromBuffer added in v0.2.4

func MemoryViewFromBuffer(info *Buffer) *MemoryViewObject

func MemoryViewFromMemory added in v0.2.0

func MemoryViewFromMemory(mem *c.Char, size SsizeT, flags c.Int) *MemoryViewObject

func (*MemoryViewObject) Contiguous added in v0.2.3

func (self *MemoryViewObject) Contiguous(buffertype c.Int, order c.Char) *Object

llgo:link (*MemoryViewObject).Contiguous C.PyMemoryView_GetContiguous

type MethodDef added in v0.2.0

type MethodDef struct {
	MlName  *c.Char
	MlMeth  CFunction
	MlFlags c.Int
	MlDoc   *c.Char
}

func (*MethodDef) CFunctionNewEx added in v0.2.0

func (self *MethodDef) CFunctionNewEx(_llcppg_param2 *Object, _llcppg_param3 *Object) *Object

PyCFunction_NewEx is similar: on 3.9+, this calls PyCMethod_New.

llgo:link (*MethodDef).CFunctionNewEx C.PyCFunction_NewEx

type MethodDescrObject added in v0.2.0

type MethodDescrObject struct {
	DCommon    DescrObject
	DMethod    *MethodDef
	Vectorcall Vectorcallfunc
}

type MethodObject added in v0.2.0

type MethodObject struct {
	ObBase        Object
	ImFunc        *Object
	ImSelf        *Object
	ImWeakreflist *Object
	Vectorcall    Vectorcallfunc
}

func NewMethod added in v0.2.3

func NewMethod(_llcppg_param1 *Object, _llcppg_param2 *Object) *MethodObject

func (*MethodObject) Function added in v0.2.3

func (self *MethodObject) Function() *Object

llgo:link (*MethodObject).Function C.PyMethod_Function

func (*MethodObject) Self added in v0.2.3

func (self *MethodObject) Self() *Object

llgo:link (*MethodObject).Self C.PyMethod_Self

type ModuleDef added in v0.2.0

type ModuleDef struct {
	MBase     ModuleDefBase
	MName     *c.Char
	MDoc      *c.Char
	MSize     SsizeT
	MMethods  *MethodDef
	MSlots    *ModuleDefSlot
	MTraverse Traverseproc
	MClear    Inquiry
	MFree     Freefunc
}

func ModuleGetDef added in v0.2.3

func ModuleGetDef(_llcppg_param1 *Object) *ModuleDef

func (*ModuleDef) Init added in v0.2.0

func (self *ModuleDef) Init() *Object

New in 3.5

llgo:link (*ModuleDef).Init C.PyModuleDef_Init

type ModuleDefBase added in v0.2.0

type ModuleDefBase struct {
	ObBase Object
	MInit  func() *Object
	MIndex SsizeT
	MCopy  *Object
}

llgo:type C

type ModuleDefSlot added in v0.2.0

type ModuleDefSlot struct {
	Slot  c.Int
	Value unsafe.Pointer
}

New in 3.5

type MonitoringState added in v0.2.0

type MonitoringState = X_MonitoringState

type Mutex added in v0.2.0

type Mutex struct {
	X_bits c.Uint8T
}

A mutex that occupies one byte. The lock can be zero initialized to represent the unlocked state.

Typical initialization:

PyMutex m = (PyMutex){0};

Or initialize as global variables:

static PyMutex m;

Typical usage:

PyMutex_Lock(&m);
...
PyMutex_Unlock(&m);

The contents of the PyMutex are not part of the public API, but are described to aid in understanding the implementation and debugging. Only the two least significant bits are used. The remaining bits are always zero: 0b00: unlocked 0b01: locked 0b10: unlocked and has parked threads 0b11: locked and has parked threads

func (*Mutex) IsLocked added in v0.2.0

func (self *Mutex) IsLocked() c.Int

exported function for checking if the mutex is locked

llgo:link (*Mutex).IsLocked C.PyMutex_IsLocked

func (*Mutex) Lock added in v0.2.0

func (self *Mutex) Lock()

exported function for locking the mutex

llgo:link (*Mutex).Lock C.PyMutex_Lock

func (*Mutex) Unlock added in v0.2.0

func (self *Mutex) Unlock()

exported function for unlocking the mutex

llgo:link (*Mutex).Unlock C.PyMutex_Unlock

type NameErrorObject added in v0.2.0

type NameErrorObject struct {
	ObBase          Object
	Dict            *Object
	Args            *Object
	Notes           *Object
	Traceback       *Object
	Context         *Object
	Cause           *Object
	SuppressContext c.Char
	Name            *Object
}

type Newfunc

type Newfunc = func(_llcppg_param1 *TypeObject, _llcppg_param2 *Object, _llcppg_param3 *Object) *Object

llgo:type C

type NumberMethods added in v0.2.0

type NumberMethods struct {
	NbAdd                   Binaryfunc
	NbSubtract              Binaryfunc
	NbMultiply              Binaryfunc
	NbRemainder             Binaryfunc
	NbDivmod                Binaryfunc
	NbPower                 Ternaryfunc
	NbNegative              Unaryfunc
	NbPositive              Unaryfunc
	NbAbsolute              Unaryfunc
	NbBool                  Inquiry
	NbInvert                Unaryfunc
	NbLshift                Binaryfunc
	NbRshift                Binaryfunc
	NbAnd                   Binaryfunc
	NbXor                   Binaryfunc
	NbOr                    Binaryfunc
	NbInt                   Unaryfunc
	NbReserved              unsafe.Pointer
	NbFloat                 Unaryfunc
	NbInplaceAdd            Binaryfunc
	NbInplaceSubtract       Binaryfunc
	NbInplaceMultiply       Binaryfunc
	NbInplaceRemainder      Binaryfunc
	NbInplacePower          Ternaryfunc
	NbInplaceLshift         Binaryfunc
	NbInplaceRshift         Binaryfunc
	NbInplaceAnd            Binaryfunc
	NbInplaceXor            Binaryfunc
	NbInplaceOr             Binaryfunc
	NbFloorDivide           Binaryfunc
	NbTrueDivide            Binaryfunc
	NbInplaceFloorDivide    Binaryfunc
	NbInplaceTrueDivide     Binaryfunc
	NbIndex                 Unaryfunc
	NbMatrixMultiply        Binaryfunc
	NbInplaceMatrixMultiply Binaryfunc
}

type ODictObject added in v0.2.0

type ODictObject = X_odictobject

type OSErrorObject added in v0.2.0

type OSErrorObject struct {
	ObBase          Object
	Dict            *Object
	Args            *Object
	Notes           *Object
	Traceback       *Object
	Context         *Object
	Cause           *Object
	SuppressContext c.Char
	Myerrno         *Object
	Strerror        *Object
	Filename        *Object
	Filename2       *Object
	Written         SsizeT
}

type OSSighandlerT added in v0.2.0

type OSSighandlerT = func(_llcppg_param1 c.Int)

Signals

llgo:type C

func OSGetsig added in v0.2.0

func OSGetsig(_llcppg_param1 c.Int) OSSighandlerT

func OSSetsig added in v0.2.0

func OSSetsig(_llcppg_param1 c.Int, _llcppg_param2 OSSighandlerT) OSSighandlerT

type Object added in v0.2.0

type Object = X_object
var ExcArithmeticError *Object
var ExcAssertionError *Object
var ExcAttributeError *Object
var ExcBaseException *Object
var ExcBaseExceptionGroup *Object
var ExcBlockingIOError *Object
var ExcBrokenPipeError *Object
var ExcBufferError *Object
var ExcBytesWarning *Object
var ExcChildProcessError *Object
var ExcConnectionAbortedError *Object
var ExcConnectionError *Object
var ExcConnectionRefusedError *Object
var ExcConnectionResetError *Object
var ExcDeprecationWarning *Object
var ExcEOFError *Object
var ExcEncodingWarning *Object
var ExcEnvironmentError *Object

Compatibility aliases

var ExcException *Object
var ExcFileExistsError *Object
var ExcFileNotFoundError *Object
var ExcFloatingPointError *Object
var ExcFutureWarning *Object
var ExcGeneratorExit *Object
var ExcIOError *Object
var ExcImportError *Object
var ExcImportWarning *Object
var ExcIndentationError *Object
var ExcIndexError *Object
var ExcInterruptedError *Object
var ExcIsADirectoryError *Object
var ExcKeyError *Object
var ExcKeyboardInterrupt *Object
var ExcLookupError *Object
var ExcMemoryError *Object
var ExcModuleNotFoundError *Object
var ExcNameError *Object
var ExcNotADirectoryError *Object
var ExcNotImplementedError *Object
var ExcOSError *Object
var ExcOverflowError *Object
var ExcPendingDeprecationWarning *Object
var ExcPermissionError *Object
var ExcProcessLookupError *Object
var ExcPythonFinalizationError *Object
var ExcRecursionError *Object
var ExcReferenceError *Object
var ExcResourceWarning *Object
var ExcRuntimeError *Object
var ExcRuntimeWarning *Object
var ExcStopAsyncIteration *Object
var ExcStopIteration *Object
var ExcSyntaxError *Object
var ExcSyntaxWarning *Object
var ExcSystemError *Object
var ExcSystemExit *Object
var ExcTabError *Object
var ExcTimeoutError *Object
var ExcTypeError *Object
var ExcUnboundLocalError *Object
var ExcUnicodeDecodeError *Object
var ExcUnicodeEncodeError *Object
var ExcUnicodeError *Object
var ExcUnicodeTranslateError *Object
var ExcUnicodeWarning *Object
var ExcUserWarning *Object
var ExcValueError *Object
var ExcWarning *Object

Predefined warning categories

var ExcZeroDivisionError *Object
var X_EllipsisObject Object

Don't use this directly

var X_NoneStruct Object

_Py_NoneStruct is an object of undefined type which can be used in contexts where NULL (nil) is not suitable (since NULL often means 'error').

var X_NotImplementedStruct Object

Py_NotImplemented is a singleton used to signal that an operation is not implemented for a given type combination.

func AsyncGenNew added in v0.2.1

func AsyncGenNew(_llcppg_param1 *FrameObject, name *Object, qualname *Object) *Object

func BoolFromLong added in v0.2.0

func BoolFromLong(_llcppg_param1 c.Long) *Object

Function to return a bool from a C long

func BuildValue added in v0.2.0

func BuildValue(_llcppg_param1 *c.Char, __llgo_va_list ...any) *Object

func BytesDecodeEscape added in v0.2.0

func BytesDecodeEscape(_llcppg_param1 *c.Char, _llcppg_param2 SsizeT, _llcppg_param3 *c.Char, _llcppg_param4 SsizeT, _llcppg_param5 *c.Char) *Object

func CallIterNew added in v0.2.3

func CallIterNew(_llcppg_param1 *Object, _llcppg_param2 *Object) *Object

func CapsuleNew added in v0.2.0

func CapsuleNew(pointer unsafe.Pointer, name *c.Char, destructor CapsuleDestructor) *Object

func ClassMethodNew added in v0.2.3

func ClassMethodNew(_llcppg_param1 *Object) *Object

func CodecBackslashReplaceErrors added in v0.2.3

func CodecBackslashReplaceErrors(exc *Object) *Object

replace the unicode encode error with backslash escapes (\x, \u and \U)

func CodecDecode added in v0.2.3

func CodecDecode(object *Object, encoding *c.Char, errors *c.Char) *Object

func CodecDecoder added in v0.2.0

func CodecDecoder(encoding *c.Char) *Object

func CodecEncode added in v0.2.3

func CodecEncode(object *Object, encoding *c.Char, errors *c.Char) *Object

func CodecEncoder added in v0.2.0

func CodecEncoder(encoding *c.Char) *Object

func CodecIgnoreErrors added in v0.2.3

func CodecIgnoreErrors(exc *Object) *Object

ignore the unicode error, skipping the faulty input

func CodecIncrementalDecoder added in v0.2.0

func CodecIncrementalDecoder(encoding *c.Char, errors *c.Char) *Object

func CodecIncrementalEncoder added in v0.2.0

func CodecIncrementalEncoder(encoding *c.Char, errors *c.Char) *Object

func CodecLookupError added in v0.2.0

func CodecLookupError(name *c.Char) *Object

Lookup the error handling callback function registered under the given name. As a special case NULL can be passed, in which case the error handling callback for "strict" will be returned.

func CodecNameReplaceErrors added in v0.2.3

func CodecNameReplaceErrors(exc *Object) *Object

replace the unicode encode error with backslash escapes (\N, \x, \u and \U)

func CodecReplaceErrors added in v0.2.3

func CodecReplaceErrors(exc *Object) *Object

replace the unicode encode error with ? or U+FFFD

func CodecStreamReader added in v0.2.0

func CodecStreamReader(encoding *c.Char, stream *Object, errors *c.Char) *Object

func CodecStreamWriter added in v0.2.0

func CodecStreamWriter(encoding *c.Char, stream *Object, errors *c.Char) *Object

func CodecStrictErrors added in v0.2.3

func CodecStrictErrors(exc *Object) *Object

raise exc as an exception

func CodecXMLCharRefReplaceErrors added in v0.2.3

func CodecXMLCharRefReplaceErrors(exc *Object) *Object

replace the unicode encode error with XML character references

func CompileString added in v0.2.0

func CompileString(_llcppg_param1 *c.Char, _llcppg_param2 *c.Char, _llcppg_param3 c.Int) *Object

func CompileStringExFlags added in v0.2.0

func CompileStringExFlags(str *c.Char, filename *c.Char, start c.Int, flags *CompilerFlags, optimize c.Int) *Object

func CompileStringFlags added in v0.2.0

func CompileStringFlags(str *c.Char, filename *c.Char, start c.Int, flags *CompilerFlags) *Object

func CompileStringObject added in v0.2.0

func CompileStringObject(str *c.Char, filename *Object, start c.Int, flags *CompilerFlags, optimize c.Int) *Object

func ConfigGet added in v0.2.0

func ConfigGet(name *c.Char) *Object

func ConfigNames added in v0.2.0

func ConfigNames() *Object

func ContextCopyCurrent added in v0.2.0

func ContextCopyCurrent() *Object

func ContextNew added in v0.2.0

func ContextNew() *Object

func ContextVarNew added in v0.2.0

func ContextVarNew(name *c.Char, default_value *Object) *Object

Create a new context variable.

default_value can be NULL.

func CoroNew added in v0.2.1

func CoroNew(_llcppg_param1 *FrameObject, name *Object, qualname *Object) *Object

func DictProxyNew added in v0.2.3

func DictProxyNew(_llcppg_param1 *Object) *Object

func ErrFormat added in v0.2.1

func ErrFormat(exception *Object, format *c.Char, __llgo_va_list ...any) *Object

func ErrGetHandledException added in v0.2.0

func ErrGetHandledException() *Object

func ErrGetRaisedException added in v0.2.0

func ErrGetRaisedException() *Object

func ErrNewException added in v0.2.0

func ErrNewException(name *c.Char, base *Object, dict *Object) *Object

Function to create a new exception

func ErrNewExceptionWithDoc added in v0.2.0

func ErrNewExceptionWithDoc(name *c.Char, doc *c.Char, base *Object, dict *Object) *Object

func ErrNoMemory added in v0.2.0

func ErrNoMemory() *Object

func ErrOccurred added in v0.2.0

func ErrOccurred() *Object

func ErrProgramText added in v0.2.0

func ErrProgramText(filename *c.Char, lineno c.Int) *Object

func ErrProgramTextObject added in v0.2.1

func ErrProgramTextObject(filename *Object, lineno c.Int) *Object

func ErrSetFromErrno added in v0.2.1

func ErrSetFromErrno(_llcppg_param1 *Object) *Object

func ErrSetFromErrnoWithFilename added in v0.2.1

func ErrSetFromErrnoWithFilename(exc *Object, filename *c.Char) *Object

func ErrSetFromErrnoWithFilenameObject added in v0.2.1

func ErrSetFromErrnoWithFilenameObject(_llcppg_param1 *Object, _llcppg_param2 *Object) *Object

func ErrSetFromErrnoWithFilenameObjects added in v0.2.1

func ErrSetFromErrnoWithFilenameObjects(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) *Object

func ErrSetImportError added in v0.2.1

func ErrSetImportError(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) *Object

func ErrSetImportErrorSubclass added in v0.2.1

func ErrSetImportErrorSubclass(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object, _llcppg_param4 *Object) *Object

func Err_FormatV added in v0.2.1

func Err_FormatV(exception *Object, format *c.Char, vargs c.VaList) *Object

func EvalCode added in v0.2.1

func EvalCode(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) *Object

func EvalCodeEx added in v0.2.1

func EvalCodeEx(co *Object, globals *Object, locals *Object, args **Object, argc c.Int, kwds **Object, kwdc c.Int, defs **Object, defc c.Int, kwdefs *Object, closure *Object) *Object

func EvalFrame added in v0.2.1

func EvalFrame(_llcppg_param1 *FrameObject) *Object

func EvalFrameEx added in v0.2.1

func EvalFrameEx(f *FrameObject, exc c.Int) *Object

func EvalGetBuiltins added in v0.2.0

func EvalGetBuiltins() *Object

func EvalGetFrameBuiltins added in v0.2.0

func EvalGetFrameBuiltins() *Object

func EvalGetFrameGlobals added in v0.2.0

func EvalGetFrameGlobals() *Object

func EvalGetFrameLocals added in v0.2.0

func EvalGetFrameLocals() *Object

func EvalGetGlobals added in v0.2.0

func EvalGetGlobals() *Object

func EvalGetLocals added in v0.2.0

func EvalGetLocals() *Object

func ExceptionGetArgs added in v0.2.3

func ExceptionGetArgs(_llcppg_param1 *Object) *Object

func ExceptionGetCause added in v0.2.3

func ExceptionGetCause(_llcppg_param1 *Object) *Object

Cause manipulation (PEP 3134)

func ExceptionGetContext added in v0.2.3

func ExceptionGetContext(_llcppg_param1 *Object) *Object

Context manipulation (PEP 3134)

func ExceptionGetTraceback added in v0.2.3

func ExceptionGetTraceback(_llcppg_param1 *Object) *Object

func FileFromFd added in v0.2.0

func FileFromFd(_llcppg_param1 c.Int, _llcppg_param2 *c.Char, _llcppg_param3 *c.Char, _llcppg_param4 c.Int, _llcppg_param5 *c.Char, _llcppg_param6 *c.Char, _llcppg_param7 *c.Char, _llcppg_param8 c.Int) *Object

func FileGetLine added in v0.2.3

func FileGetLine(_llcppg_param1 *Object, _llcppg_param2 c.Int) *Object

func FileNewStdPrinter added in v0.2.0

func FileNewStdPrinter(_llcppg_param1 c.Int) *Object

The std printer acts as a preliminary sys.stderr until the new io infrastructure is in place.

func FileOpenCode added in v0.2.0

func FileOpenCode(utf8path *c.Char) *Object

func FileOpenCodeObject added in v0.2.3

func FileOpenCodeObject(path *Object) *Object

func FloatGetInfo added in v0.2.0

func FloatGetInfo() *Object

func FrozenSetNew added in v0.2.3

func FrozenSetNew(_llcppg_param1 *Object) *Object

func GenNew added in v0.2.1

func GenNew(_llcppg_param1 *FrameObject) *Object

func GenericAlias added in v0.2.0

func GenericAlias(_llcppg_param1 *Object, _llcppg_param2 *Object) *Object

func GetConstant added in v0.2.0

func GetConstant(constant_id c.Uint) *Object

func GetConstantBorrowed added in v0.2.0

func GetConstantBorrowed(constant_id c.Uint) *Object

func Import added in v0.2.0

func Import(name *Object) *Object

func ImportAddModule added in v0.2.0

func ImportAddModule(name *c.Char) *Object

func ImportAddModuleObject added in v0.2.0

func ImportAddModuleObject(name *Object) *Object

func ImportAddModuleRef added in v0.2.0

func ImportAddModuleRef(name *c.Char) *Object

func ImportExecCodeModule added in v0.2.0

func ImportExecCodeModule(name *c.Char, co *Object) *Object

func ImportExecCodeModuleEx added in v0.2.0

func ImportExecCodeModuleEx(name *c.Char, co *Object, pathname *c.Char) *Object

func ImportExecCodeModuleObject added in v0.2.0

func ImportExecCodeModuleObject(name *Object, co *Object, pathname *Object, cpathname *Object) *Object

func ImportExecCodeModuleWithPathnames added in v0.2.0

func ImportExecCodeModuleWithPathnames(name *c.Char, co *Object, pathname *c.Char, cpathname *c.Char) *Object

func ImportGetImporter added in v0.2.0

func ImportGetImporter(path *Object) *Object

func ImportGetModule added in v0.2.0

func ImportGetModule(name *Object) *Object

func ImportGetModuleDict added in v0.2.0

func ImportGetModuleDict() *Object

func ImportImportModule added in v0.2.0

func ImportImportModule(name *c.Char) *Object

func ImportImportModuleAttrString added in v0.2.0

func ImportImportModuleAttrString(mod_name *c.Char, attr_name *c.Char) *Object

func ImportImportModuleLevel added in v0.2.0

func ImportImportModuleLevel(name *c.Char, globals *Object, locals *Object, fromlist *Object, level c.Int) *Object

func ImportImportModuleLevelObject added in v0.2.0

func ImportImportModuleLevelObject(name *Object, globals *Object, locals *Object, fromlist *Object, level c.Int) *Object

func ImportImportModuleNoBlock added in v0.2.0

func ImportImportModuleNoBlock(name *c.Char) *Object

func IterNext added in v0.2.3

func IterNext(_llcppg_param1 *Object) *Object

Takes an iterator object and calls its tp_iternext slot, returning the next value.

If the iterator is exhausted, this returns NULL without setting an exception.

NULL with an exception means an error occurred.

Prefer PyIter_NextItem() instead.

func LongGetInfo added in v0.2.0

func LongGetInfo() *Object

func MappingGetItemString added in v0.2.3

func MappingGetItemString(o *Object, key *c.Char) *Object

Return element of 'o' corresponding to the string 'key' or NULL on failure.

This is the equivalent of the Python expression: o[key].

func MappingItems added in v0.2.3

func MappingItems(o *Object) *Object

On success, return a list of the items in mapping object 'o', where each item is a tuple containing a key-value pair. On failure, return NULL.

func MappingKeys added in v0.2.3

func MappingKeys(o *Object) *Object

On success, return a list of the keys in mapping object 'o'. On failure, return NULL.

func MappingValues added in v0.2.3

func MappingValues(o *Object) *Object

On success, return a list of the values in mapping object 'o'. On failure, return NULL.

func MemberGetOne added in v0.2.0

func MemberGetOne(_llcppg_param1 *c.Char, _llcppg_param2 *MemberDef) *Object

func ModuleCreate2 added in v0.2.3

func ModuleCreate2(_llcppg_param1 *ModuleDef, apiver c.Int) *Object

func ModuleFromDefAndSpec2 added in v0.2.3

func ModuleFromDefAndSpec2(def *ModuleDef, spec *Object, module_api_version c.Int) *Object

New in 3.5

func ModuleGetDict added in v0.2.3

func ModuleGetDict(_llcppg_param1 *Object) *Object

func ModuleGetFilenameObject added in v0.2.3

func ModuleGetFilenameObject(_llcppg_param1 *Object) *Object

func ModuleGetNameObject added in v0.2.3

func ModuleGetNameObject(_llcppg_param1 *Object) *Object

func ModuleNew added in v0.2.0

func ModuleNew(name *c.Char) *Object

func ModuleNewObject added in v0.2.3

func ModuleNewObject(name *Object) *Object

func NewRef added in v0.2.0

func NewRef(obj *Object) *Object

Create a new strong reference to an object: increment the reference count of the object and return the object.

func NumberAbsolute added in v0.2.3

func NumberAbsolute(o *Object) *Object

Returns the absolute value of 'o', or NULL on failure.

This is the equivalent of the Python expression: abs(o).

func NumberAdd added in v0.2.3

func NumberAdd(o1 *Object, o2 *Object) *Object

Returns the result of adding o1 and o2, or NULL on failure.

This is the equivalent of the Python expression: o1 + o2.

func NumberAnd added in v0.2.3

func NumberAnd(o1 *Object, o2 *Object) *Object

Returns the result of bitwise and of o1 and o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 & o2.

func NumberDivmod added in v0.2.3

func NumberDivmod(o1 *Object, o2 *Object) *Object

See the built-in function divmod.

Returns NULL on failure.

This is the equivalent of the Python expression: divmod(o1, o2).

func NumberFloat added in v0.2.3

func NumberFloat(o *Object) *Object

Returns the object 'o' converted to a float object on success, or NULL on failure.

This is the equivalent of the Python expression: float(o).

func NumberFloorDivide added in v0.2.3

func NumberFloorDivide(o1 *Object, o2 *Object) *Object

Returns the result of dividing o1 by o2 giving an integral result, or NULL on failure.

This is the equivalent of the Python expression: o1 // o2.

func NumberInPlaceAdd added in v0.2.3

func NumberInPlaceAdd(o1 *Object, o2 *Object) *Object

Returns the result of adding o2 to o1, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 += o2.

func NumberInPlaceAnd added in v0.2.3

func NumberInPlaceAnd(o1 *Object, o2 *Object) *Object

Returns the result of bitwise and of o1 and o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 &= o2.

func NumberInPlaceFloorDivide added in v0.2.3

func NumberInPlaceFloorDivide(o1 *Object, o2 *Object) *Object

Returns the result of dividing o1 by o2 giving an integral result, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 /= o2.

func NumberInPlaceLshift added in v0.2.3

func NumberInPlaceLshift(o1 *Object, o2 *Object) *Object

Returns the result of left shifting o1 by o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 <<= o2.

func NumberInPlaceMatrixMultiply added in v0.2.3

func NumberInPlaceMatrixMultiply(o1 *Object, o2 *Object) *Object

This is the equivalent of the Python expression: o1 @= o2.

func NumberInPlaceMultiply added in v0.2.3

func NumberInPlaceMultiply(o1 *Object, o2 *Object) *Object

Returns the result of multiplying o1 by o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 *= o2.

func NumberInPlaceOr added in v0.2.3

func NumberInPlaceOr(o1 *Object, o2 *Object) *Object

Returns the result of bitwise or of o1 and o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 |= o2.

func NumberInPlacePower added in v0.2.3

func NumberInPlacePower(o1 *Object, o2 *Object, o3 *Object) *Object

Returns the result of raising o1 to the power of o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 **= o2, or o1 = pow(o1, o2, o3) if o3 is present.

func NumberInPlaceRemainder added in v0.2.3

func NumberInPlaceRemainder(o1 *Object, o2 *Object) *Object

Returns the remainder of dividing o1 by o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 %= o2.

func NumberInPlaceRshift added in v0.2.3

func NumberInPlaceRshift(o1 *Object, o2 *Object) *Object

Returns the result of right shifting o1 by o2, possibly in-place or NULL on failure.

This is the equivalent of the Python expression: o1 >>= o2.

func NumberInPlaceSubtract added in v0.2.3

func NumberInPlaceSubtract(o1 *Object, o2 *Object) *Object

Returns the result of subtracting o2 from o1, possibly in-place or NULL on failure.

This is the equivalent of the Python expression: o1 -= o2.

func NumberInPlaceTrueDivide added in v0.2.3

func NumberInPlaceTrueDivide(o1 *Object, o2 *Object) *Object

Returns the result of dividing o1 by o2 giving a float result, possibly in-place, or null on failure.

This is the equivalent of the Python expression: o1 /= o2.

func NumberInPlaceXor added in v0.2.3

func NumberInPlaceXor(o1 *Object, o2 *Object) *Object

Returns the bitwise exclusive or of o1 by o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 ^= o2.

func NumberIndex added in v0.2.3

func NumberIndex(o *Object) *Object

Returns the object 'o' converted to a Python int, or NULL with an exception raised on failure.

func NumberInvert added in v0.2.3

func NumberInvert(o *Object) *Object

Returns the bitwise negation of 'o' on success, or NULL on failure.

This is the equivalent of the Python expression: ~o.

func NumberLong added in v0.2.3

func NumberLong(o *Object) *Object

Returns the object 'o' converted to an integer object on success, or NULL on failure.

This is the equivalent of the Python expression: int(o).

func NumberLshift added in v0.2.3

func NumberLshift(o1 *Object, o2 *Object) *Object

Returns the result of left shifting o1 by o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 << o2.

func NumberMatrixMultiply added in v0.2.3

func NumberMatrixMultiply(o1 *Object, o2 *Object) *Object

This is the equivalent of the Python expression: o1 @ o2.

func NumberMultiply added in v0.2.3

func NumberMultiply(o1 *Object, o2 *Object) *Object

Returns the result of multiplying o1 and o2, or NULL on failure.

This is the equivalent of the Python expression: o1 * o2.

func NumberNegative added in v0.2.3

func NumberNegative(o *Object) *Object

Returns the negation of o on success, or NULL on failure.

This is the equivalent of the Python expression: -o.

func NumberOr added in v0.2.3

func NumberOr(o1 *Object, o2 *Object) *Object

Returns the result of bitwise or on o1 and o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 | o2.

func NumberPositive added in v0.2.3

func NumberPositive(o *Object) *Object

Returns the positive of o on success, or NULL on failure.

This is the equivalent of the Python expression: +o.

func NumberPower added in v0.2.3

func NumberPower(o1 *Object, o2 *Object, o3 *Object) *Object

See the built-in function pow. Returns NULL on failure.

This is the equivalent of the Python expression: pow(o1, o2, o3), where o3 is optional.

func NumberRemainder added in v0.2.3

func NumberRemainder(o1 *Object, o2 *Object) *Object

Returns the remainder of dividing o1 by o2, or NULL on failure.

This is the equivalent of the Python expression: o1 % o2.

func NumberRshift added in v0.2.3

func NumberRshift(o1 *Object, o2 *Object) *Object

Returns the result of right shifting o1 by o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 >> o2.

func NumberSubtract added in v0.2.3

func NumberSubtract(o1 *Object, o2 *Object) *Object

Returns the result of subtracting o2 from o1, or NULL on failure.

This is the equivalent of the Python expression: o1 - o2.

func NumberToBase added in v0.2.3

func NumberToBase(n *Object, base c.Int) *Object

Returns the integer n converted to a string with a base, with a base marker of 0b, 0o or 0x prefixed if applicable.

If n is not an int object, it is converted with PyNumber_Index first.

func NumberTrueDivide added in v0.2.3

func NumberTrueDivide(o1 *Object, o2 *Object) *Object

Returns the result of dividing o1 by o2 giving a float result, or NULL on failure.

This is the equivalent of the Python expression: o1 / o2.

func NumberXor added in v0.2.3

func NumberXor(o1 *Object, o2 *Object) *Object

Returns the bitwise exclusive or of o1 by o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 ^ o2.

func ODictNew added in v0.2.0

func ODictNew() *Object

func OS_FSPath added in v0.2.3

func OS_FSPath(path *Object) *Object

func PickleBufferFromObject added in v0.2.3

func PickleBufferFromObject(_llcppg_param1 *Object) *Object

Create a PickleBuffer redirecting to the given buffer-enabled object

func RunFile added in v0.2.0

func RunFile(fp *c.FILE, p *c.Char, s c.Int, g *Object, l *Object) *Object

func RunFileEx added in v0.2.0

func RunFileEx(fp *c.FILE, p *c.Char, s c.Int, g *Object, l *Object, c c.Int) *Object

func RunFileExFlags added in v0.2.0

func RunFileExFlags(fp *c.FILE, filename *c.Char, start c.Int, globals *Object, locals *Object, closeit c.Int, flags *CompilerFlags) *Object

func RunFileFlags added in v0.2.0

func RunFileFlags(fp *c.FILE, p *c.Char, s c.Int, g *Object, l *Object, flags *CompilerFlags) *Object

func RunString added in v0.2.0

func RunString(str *c.Char, s c.Int, g *Object, l *Object) *Object

A function flavor is also exported by libpython. It is required when libpython is accessed directly rather than using header files which defines macros below. On Windows, for example, PyAPI_FUNC() uses dllexport to export functions in pythonXX.dll.

func RunStringFlags added in v0.2.0

func RunStringFlags(_llcppg_param1 *c.Char, _llcppg_param2 c.Int, _llcppg_param3 *Object, _llcppg_param4 *Object, _llcppg_param5 *CompilerFlags) *Object

func SeqIterNew added in v0.2.3

func SeqIterNew(_llcppg_param1 *Object) *Object

func SequenceConcat added in v0.2.3

func SequenceConcat(o1 *Object, o2 *Object) *Object

Return the concatenation of o1 and o2 on success, and NULL on failure.

This is the equivalent of the Python expression: o1 + o2.

func SequenceFast added in v0.2.3

func SequenceFast(o *Object, m *c.Char) *Object

Return the sequence 'o' as a list, unless it's already a tuple or list.

Use PySequence_Fast_GET_ITEM to access the members of this list, and PySequence_Fast_GET_SIZE to get its length.

Returns NULL on failure. If the object does not support iteration, raises a TypeError exception with 'm' as the message text.

func SequenceGetItem added in v0.2.3

func SequenceGetItem(o *Object, i SsizeT) *Object

Return the ith element of o, or NULL on failure.

This is the equivalent of the Python expression: o[i].

func SequenceGetSlice added in v0.2.3

func SequenceGetSlice(o *Object, i1 SsizeT, i2 SsizeT) *Object

Return the slice of sequence object o between i1 and i2, or NULL on failure.

This is the equivalent of the Python expression: o[i1:i2].

func SequenceInPlaceConcat added in v0.2.3

func SequenceInPlaceConcat(o1 *Object, o2 *Object) *Object

Append sequence 'o2' to sequence 'o1', in-place when possible. Return the resulting object, which could be 'o1', or NULL on failure.

This is the equivalent of the Python expression: o1 += o2.

func SequenceInPlaceRepeat added in v0.2.3

func SequenceInPlaceRepeat(o *Object, count SsizeT) *Object

Repeat sequence 'o' by 'count', in-place when possible. Return the resulting object, which could be 'o', or NULL on failure.

This is the equivalent of the Python expression: o1 *= count.

func SequenceList added in v0.2.3

func SequenceList(o *Object) *Object

Returns the sequence 'o' as a list on success, and NULL on failure. This is equivalent to the Python expression: list(o)

func SequenceRepeat added in v0.2.3

func SequenceRepeat(o *Object, count SsizeT) *Object

Return the result of repeating sequence object 'o' 'count' times, or NULL on failure.

This is the equivalent of the Python expression: o * count.

func SequenceTuple added in v0.2.3

func SequenceTuple(o *Object) *Object

Returns the sequence 'o' as a tuple on success, and NULL on failure.

This is equivalent to the Python expression: tuple(o).

func StateFindModule added in v0.2.3

func StateFindModule(_llcppg_param1 *ModuleDef) *Object

func StaticMethodNew added in v0.2.3

func StaticMethodNew(_llcppg_param1 *Object) *Object

func StructSequenceNew added in v0.2.3

func StructSequenceNew(type_ *TypeObject) *Object

func SysGetObject added in v0.2.0

func SysGetObject(_llcppg_param1 *c.Char) *Object

func SysGetXOptions added in v0.2.0

func SysGetXOptions() *Object

func ThreadGetInfo added in v0.2.0

func ThreadGetInfo() *Object

func ThreadStateGetDict added in v0.2.0

func ThreadStateGetDict() *Object

func TuplePack added in v0.2.0

func TuplePack(_llcppg_param1 SsizeT, __llgo_va_list ...any) *Object

func UnicodeDecode added in v0.2.0

func UnicodeDecode(s *c.Char, size SsizeT, encoding *c.Char, errors *c.Char) *Object

func UnicodeDecodeCharmap added in v0.2.0

func UnicodeDecodeCharmap(string *c.Char, length SsizeT, mapping *Object, errors *c.Char) *Object

func UnicodeDecodeErrorCreate added in v0.2.0

func UnicodeDecodeErrorCreate(encoding *c.Char, object *c.Char, length SsizeT, start SsizeT, end SsizeT, reason *c.Char) *Object

create a UnicodeDecodeError object

func UnicodeDecodeErrorGetEncoding added in v0.2.3

func UnicodeDecodeErrorGetEncoding(_llcppg_param1 *Object) *Object

func UnicodeDecodeErrorGetObject added in v0.2.3

func UnicodeDecodeErrorGetObject(_llcppg_param1 *Object) *Object

func UnicodeDecodeErrorGetReason added in v0.2.3

func UnicodeDecodeErrorGetReason(_llcppg_param1 *Object) *Object

func UnicodeDecodeFSDefault added in v0.2.0

func UnicodeDecodeFSDefault(s *c.Char) *Object

Decode a null-terminated string from the Python filesystem encoding and error handler.

If the string length is known, use PyUnicode_DecodeFSDefaultAndSize().

func UnicodeDecodeFSDefaultAndSize added in v0.2.0

func UnicodeDecodeFSDefaultAndSize(s *c.Char, size SsizeT) *Object

Decode a string from the Python filesystem encoding and error handler.

func UnicodeDecodeLatin1 added in v0.2.0

func UnicodeDecodeLatin1(string *c.Char, length SsizeT, errors *c.Char) *Object

func UnicodeDecodeLocale added in v0.2.0

func UnicodeDecodeLocale(str *c.Char, errors *c.Char) *Object

func UnicodeDecodeLocaleAndSize added in v0.2.0

func UnicodeDecodeLocaleAndSize(str *c.Char, len SsizeT, errors *c.Char) *Object

func UnicodeDecodeRawUnicodeEscape added in v0.2.0

func UnicodeDecodeRawUnicodeEscape(string *c.Char, length SsizeT, errors *c.Char) *Object

func UnicodeDecodeUTF7 added in v0.2.0

func UnicodeDecodeUTF7(string *c.Char, length SsizeT, errors *c.Char) *Object

func UnicodeDecodeUTF7Stateful added in v0.2.0

func UnicodeDecodeUTF7Stateful(string *c.Char, length SsizeT, errors *c.Char, consumed *SsizeT) *Object

func UnicodeDecodeUTF8 added in v0.2.0

func UnicodeDecodeUTF8(string *c.Char, length SsizeT, errors *c.Char) *Object

func UnicodeDecodeUTF8Stateful added in v0.2.0

func UnicodeDecodeUTF8Stateful(string *c.Char, length SsizeT, errors *c.Char, consumed *SsizeT) *Object

func UnicodeDecodeUTF16 added in v0.2.0

func UnicodeDecodeUTF16(string *c.Char, length SsizeT, errors *c.Char, byteorder *c.Int) *Object

func UnicodeDecodeUTF16Stateful added in v0.2.0

func UnicodeDecodeUTF16Stateful(string *c.Char, length SsizeT, errors *c.Char, byteorder *c.Int, consumed *SsizeT) *Object

func UnicodeDecodeUTF32 added in v0.2.0

func UnicodeDecodeUTF32(string *c.Char, length SsizeT, errors *c.Char, byteorder *c.Int) *Object

func UnicodeDecodeUTF32Stateful added in v0.2.0

func UnicodeDecodeUTF32Stateful(string *c.Char, length SsizeT, errors *c.Char, byteorder *c.Int, consumed *SsizeT) *Object

func UnicodeDecodeUnicodeEscape added in v0.2.0

func UnicodeDecodeUnicodeEscape(string *c.Char, length SsizeT, errors *c.Char) *Object

func UnicodeEncodeErrorGetEncoding added in v0.2.3

func UnicodeEncodeErrorGetEncoding(_llcppg_param1 *Object) *Object

get the encoding attribute

func UnicodeEncodeErrorGetObject added in v0.2.3

func UnicodeEncodeErrorGetObject(_llcppg_param1 *Object) *Object

get the object attribute

func UnicodeEncodeErrorGetReason added in v0.2.3

func UnicodeEncodeErrorGetReason(_llcppg_param1 *Object) *Object

get the value of the reason attribute

func UnicodeInternFromString added in v0.2.0

func UnicodeInternFromString(u *c.Char) *Object

func UnicodeTranslateErrorGetObject added in v0.2.3

func UnicodeTranslateErrorGetObject(_llcppg_param1 *Object) *Object

func UnicodeTranslateErrorGetReason added in v0.2.3

func UnicodeTranslateErrorGetReason(_llcppg_param1 *Object) *Object

func Unicode_DecodeASCII added in v0.2.0

func Unicode_DecodeASCII(string *c.Char, length SsizeT, errors *c.Char) *Object

func UnstableExcPrepReraiseStar added in v0.2.3

func UnstableExcPrepReraiseStar(orig *Object, excs *Object) *Object

func UnstableInterpreterFrameGetCode added in v0.2.3

func UnstableInterpreterFrameGetCode(frame *X_InterpreterFrame) *Object

Returns the code object of the frame (strong reference). Does not raise an exception.

func Unstable_Object_GC_NewWithExtraData added in v0.2.3

func Unstable_Object_GC_NewWithExtraData(_llcppg_param1 *TypeObject, _llcppg_param2 c.SizeT) *Object

func VaBuildValue added in v0.2.0

func VaBuildValue(_llcppg_param1 *c.Char, _llcppg_param2 c.VaList) *Object

func VectorcallCall added in v0.2.3

func VectorcallCall(callable *Object, tuple *Object, dict *Object) *Object

Call "callable" (which must support vectorcall) with positional arguments "tuple" and keyword arguments "dict". "dict" may also be NULL

func WeakrefGetObject added in v0.2.3

func WeakrefGetObject(ref *Object) *Object

func WeakrefNewProxy added in v0.2.3

func WeakrefNewProxy(ob *Object, callback *Object) *Object

func WeakrefNewRef added in v0.2.3

func WeakrefNewRef(ob *Object, callback *Object) *Object

func WrapperNew added in v0.2.3

func WrapperNew(_llcppg_param1 *Object, _llcppg_param2 *Object) *Object

func XNewRef added in v0.2.0

func XNewRef(obj *Object) *Object

Similar to Py_NewRef(), but the object can be NULL.

func X_CodeConstantKey added in v0.2.0

func X_CodeConstantKey(obj *Object) *Object

Create a comparable key used to compare constants taking in account the object type. It is used to make sure types are not coerced (e.g., float and complex) _and_ to distinguish 0.0 from -0.0 e.g. on IEEE platforms

Return (type(obj), obj, ...): a tuple with variable size (at least 2 items) depending on the type and the value. The type is the first item to not compare bytes and str which can raise a BytesWarning exception.

func X_DictGetItemKnownHash added in v0.2.0

func X_DictGetItemKnownHash(mp *Object, key *Object, hash HashT) *Object

PyDict_GetItemStringRef() can be used instead

func X_DictGetItemStringWithError added in v0.2.0

func X_DictGetItemStringWithError(_llcppg_param1 *Object, _llcppg_param2 *c.Char) *Object

PyDict_GetItemStringRef() can be used instead

func X_DictNewPresized added in v0.2.0

func X_DictNewPresized(minused SsizeT) *Object

func X_DictPop added in v0.2.0

func X_DictPop(dict *Object, key *Object, default_value *Object) *Object

Use PyDict_Pop() instead

func X_EvalFrameDefault added in v0.2.1

func X_EvalFrameDefault(tstate *ThreadState, f *X_InterpreterFrame, exc c.Int) *Object

func X_LongCopy added in v0.2.0

func X_LongCopy(src *LongObject) *Object

Return a copy of src.

func X_LongFromByteArray added in v0.2.0

func X_LongFromByteArray(bytes *uint8, n c.SizeT, little_endian c.Int, is_signed c.Int) *Object

_PyLong_FromByteArray: View the n unsigned bytes as a binary integer in base 256, and return a Python int with the same numeric value. If n is 0, the integer is 0. Else: If little_endian is 1/true, bytes[n-1] is the MSB and bytes[0] the LSB; else (little_endian is 0/false) bytes[0] is the MSB and bytes[n-1] the LSB. If is_signed is 0/false, view the bytes as a non-negative integer. If is_signed is 1/true, view the bytes as a 2's-complement integer, non-negative if bit 0x80 of the MSB is clear, negative if set. Error returns: + Return NULL with the appropriate exception set if there's not enough memory to create the Python int.

func X_Long_GCD added in v0.2.0

func X_Long_GCD(_llcppg_param1 *Object, _llcppg_param2 *Object) *Object

For use by the gcd function in mathmodule.c

func X_ObjectCallMethodId added in v0.2.0

func X_ObjectCallMethodId(obj *Object, name *X_Identifier, format *c.Char, __llgo_va_list ...any) *Object

Like PyObject_CallMethod(), but expect a _Py_Identifier* as the method name.

func X_ObjectFunctionStr added in v0.2.0

func X_ObjectFunctionStr(_llcppg_param1 *Object) *Object

func X_ObjectGenericGetAttrWithDict added in v0.2.0

func X_ObjectGenericGetAttrWithDict(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object, _llcppg_param4 c.Int) *Object

Same as PyObject_Generic{Get,Set}Attr, but passing the attributes dict as the last parameter.

func X_ObjectGetAttrId added in v0.2.0

func X_ObjectGetAttrId(_llcppg_param1 *Object, _llcppg_param2 *X_Identifier) *Object

func X_ObjectGetDictPtr added in v0.2.0

func X_ObjectGetDictPtr(_llcppg_param1 *Object) **Object

func X_ObjectNew added in v0.2.0

func X_ObjectNew(_llcppg_param1 *TypeObject) *Object

func X_Object_GC_New added in v0.2.0

func X_Object_GC_New(_llcppg_param1 *TypeObject) *Object

func X_SliceFromIndices added in v0.2.0

func X_SliceFromIndices(start SsizeT, stop SsizeT) *Object

func X_StackAsDict added in v0.2.0

func X_StackAsDict(values **Object, kwnames *Object) *Object

Convert keyword arguments from the FASTCALL (stack: C array, kwnames: tuple) format to a Python dictionary ("kwargs" dict).

The type of kwnames keys is not checked. The final function getting arguments is responsible to check if all keys are strings, for example using PyArg_ParseTupleAndKeywords() or PyArg_ValidateKeywordArguments().

Duplicate keys are merged using the last value. If duplicate keys must raise an exception, the caller is responsible to implement an explicit keys on kwnames.

func X_ThreadCurrentFrames added in v0.2.0

func X_ThreadCurrentFrames() *Object

The implementation of sys._current_frames() Returns a dict mapping thread id to that thread's current frame.

func X_TypeLookup added in v0.2.0

func X_TypeLookup(_llcppg_param1 *TypeObject, _llcppg_param2 *Object) *Object

func X_TypeLookupRef added in v0.2.0

func X_TypeLookupRef(_llcppg_param1 *TypeObject, _llcppg_param2 *Object) *Object

func X_UnicodeFromId added in v0.2.0

func X_UnicodeFromId(_llcppg_param1 *X_Identifier) *Object

Return an interned Unicode object for an Identifier; may fail if there is no memory.

func X_UnicodeWriterFinish added in v0.2.0

func X_UnicodeWriterFinish(writer *X_UnicodeWriter) *Object

Get the value of the writer as a Unicode string. Clear the buffer of the writer. Raise an exception and return NULL on error.

func (*Object) AIter added in v0.2.0

func (self *Object) AIter() *Object

Takes an AsyncIterable object and returns an AsyncIterator for it. This is typically a new iterator but if the argument is an AsyncIterator, this returns itself.

llgo:link (*Object).AIter C.PyObject_GetAIter

func (*Object) ASCII added in v0.2.0

func (self *Object) ASCII() *Object

llgo:link (*Object).ASCII C.PyObject_ASCII

func (*Object) AsByteArray added in v0.2.0

func (self *Object) AsByteArray() *ByteArrayObject

Direct API functions

llgo:link (*Object).AsByteArray C.PyByteArray_FromObject

func (*Object) AsBytes added in v0.2.0

func (self *Object) AsBytes() *BytesObject

llgo:link (*Object).AsBytes C.PyBytes_FromObject

func (*Object) AsFileDescriptor added in v0.2.0

func (self *Object) AsFileDescriptor() c.Int

llgo:link (*Object).AsFileDescriptor C.PyObject_AsFileDescriptor

func (*Object) AsMemoryView added in v0.2.0

func (self *Object) AsMemoryView() *MemoryViewObject

llgo:link (*Object).AsMemoryView C.PyMemoryView_FromObject

func (*Object) AsUnicode added in v0.2.0

func (self *Object) AsUnicode() *UnicodeObject

llgo:link (*Object).AsUnicode C.PyUnicode_FromObject

func (*Object) Attr added in v0.2.0

func (self *Object) Attr(_llcppg_param2 *Object) *Object

llgo:link (*Object).Attr C.PyObject_GetAttr

func (*Object) AttrString added in v0.2.0

func (self *Object) AttrString(_llcppg_param2 *c.Char) *Object

llgo:link (*Object).AttrString C.PyObject_GetAttrString

func (*Object) Buffer added in v0.2.0

func (self *Object) Buffer(view *Buffer, flags c.Int) c.Int

This is a C-API version of the getbuffer function call. It checks to make sure object has the required function pointer and issues the call.

Returns -1 and raises an error on failure and returns 0 on success.

llgo:link (*Object).Buffer C.PyObject_GetBuffer

func (*Object) Bytes added in v0.2.0

func (self *Object) Bytes() *Object

llgo:link (*Object).Bytes C.PyObject_Bytes

func (*Object) Call added in v0.2.0

func (self *Object) Call(args *Object, kwargs *Object) *Object

Call a callable Python object 'callable' with arguments given by the tuple 'args' and keywords arguments given by the dictionary 'kwargs'.

'args' must not be NULL, use an empty tuple if no arguments are needed. If no named arguments are needed, 'kwargs' can be NULL.

This is the equivalent of the Python expression: callable(*args, **kwargs).

llgo:link (*Object).Call C.PyObject_Call

func (*Object) CallFinalizer added in v0.2.0

func (self *Object) CallFinalizer()

llgo:link (*Object).CallFinalizer C.PyObject_CallFinalizer

func (*Object) CallFinalizerFromDealloc added in v0.2.0

func (self *Object) CallFinalizerFromDealloc() c.Int

llgo:link (*Object).CallFinalizerFromDealloc C.PyObject_CallFinalizerFromDealloc

func (*Object) CallFunction added in v0.2.0

func (self *Object) CallFunction(format *c.Char, __llgo_va_list ...any) *Object

Call a callable Python object, callable, with a variable number of C arguments. The C arguments are described using a mkvalue-style format string.

The format may be NULL, indicating that no arguments are provided.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: callable(arg1, arg2, ...).

llgo:link (*Object).CallFunction C.PyObject_CallFunction

func (*Object) CallFunctionObjArgs added in v0.2.0

func (self *Object) CallFunctionObjArgs(__llgo_va_list ...any) *Object

Call a callable Python object 'callable' with a variable number of C arguments. The C arguments are provided as PyObject* values, terminated by a NULL.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: callable(arg1, arg2, ...).

llgo:link (*Object).CallFunctionObjArgs C.PyObject_CallFunctionObjArgs

func (*Object) CallMethod added in v0.2.0

func (self *Object) CallMethod(name *c.Char, format *c.Char, __llgo_va_list ...any) *Object

Call the method named 'name' of object 'obj' with a variable number of C arguments. The C arguments are described by a mkvalue format string.

The format can be NULL, indicating that no arguments are provided.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: obj.name(arg1, arg2, ...).

llgo:link (*Object).CallMethod C.PyObject_CallMethod

func (*Object) CallMethodObjArgs added in v0.2.0

func (self *Object) CallMethodObjArgs(name *Object, __llgo_va_list ...any) *Object

llgo:link (*Object).CallMethodObjArgs C.PyObject_CallMethodObjArgs

func (*Object) CallNoArgs added in v0.2.0

func (self *Object) CallNoArgs() *Object

Call a callable Python object without any arguments

llgo:link (*Object).CallNoArgs C.PyObject_CallNoArgs

func (*Object) CallObject added in v0.2.3

func (self *Object) CallObject(args *Object) *Object

Call a callable Python object 'callable', with arguments given by the tuple 'args'. If no arguments are needed, then 'args' can be NULL.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: callable(*args).

llgo:link (*Object).CallObject C.PyObject_CallObject

func (*Object) CallOneArg added in v0.2.0

func (self *Object) CallOneArg(arg *Object) *Object

llgo:link (*Object).CallOneArg C.PyObject_CallOneArg

func (*Object) CheckBuffer added in v0.2.0

func (self *Object) CheckBuffer() c.Int

Return 1 if the getbuffer function is available, otherwise return 0.

llgo:link (*Object).CheckBuffer C.PyObject_CheckBuffer

func (*Object) ClearManagedDict added in v0.2.0

func (self *Object) ClearManagedDict()

llgo:link (*Object).ClearManagedDict C.PyObject_ClearManagedDict

func (*Object) ClearWeakRefs added in v0.2.0

func (self *Object) ClearWeakRefs()

llgo:link (*Object).ClearWeakRefs C.PyObject_ClearWeakRefs

func (*Object) ContextCopy added in v0.2.0

func (self *Object) ContextCopy() *Object

llgo:link (*Object).ContextCopy C.PyContext_Copy

func (*Object) ContextEnter added in v0.2.0

func (self *Object) ContextEnter() c.Int

llgo:link (*Object).ContextEnter C.PyContext_Enter

func (*Object) ContextExit added in v0.2.0

func (self *Object) ContextExit() c.Int

llgo:link (*Object).ContextExit C.PyContext_Exit

func (*Object) ContextVarGet added in v0.2.0

func (self *Object) ContextVarGet(default_value *Object, value **Object) c.Int

Get a value for the variable.

Returns -1 if an error occurred during lookup.

Returns 0 if value either was or was not found.

If value was found, *value will point to it. If not, it will point to:

- default_value, if not NULL; - the default value of "var", if not NULL; - NULL.

'*value' will be a new ref, if not NULL.

llgo:link (*Object).ContextVarGet C.PyContextVar_Get

func (*Object) ContextVarReset added in v0.2.0

func (self *Object) ContextVarReset(token *Object) c.Int

Reset a variable to its previous value. Returns 0 on success, -1 on error.

llgo:link (*Object).ContextVarReset C.PyContextVar_Reset

func (*Object) ContextVarSet added in v0.2.0

func (self *Object) ContextVarSet(value *Object) *Object

Set a new value for the variable. Returns NULL if an error occurs.

llgo:link (*Object).ContextVarSet C.PyContextVar_Set

func (*Object) CopyData added in v0.2.0

func (self *Object) CopyData(src *Object) c.Int

Copy len bytes of data from the contiguous chunk of memory pointed to by buf into the buffer exported by obj. Return 0 on success and return -1 and raise a PyBuffer_Error on error (i.e. the object does not have a buffer interface or it is not working).

If fort is 'F', then if the object is multi-dimensional, then the data will be copied into the array in Fortran-style (first dimension varies the fastest). If fort is 'C', then the data will be copied into the array in C-style (last dimension varies the fastest). If fort is 'A', then it does not matter and the copy will be made in whatever way is more efficient.

llgo:link (*Object).CopyData C.PyObject_CopyData

func (*Object) DelAttr added in v0.2.0

func (self *Object) DelAttr(name *Object) c.Int

llgo:link (*Object).DelAttr C.PyObject_DelAttr

func (*Object) DelAttrString added in v0.2.0

func (self *Object) DelAttrString(name *c.Char) c.Int

llgo:link (*Object).DelAttrString C.PyObject_DelAttrString

func (*Object) DelItem added in v0.2.0

func (self *Object) DelItem(key *Object) c.Int

Delete the mapping for the object 'key' from the object 'o'. Returns -1 on failure.

This is the equivalent of the Python statement: del o[key].

llgo:link (*Object).DelItem C.PyObject_DelItem

func (*Object) DelItemString added in v0.2.0

func (self *Object) DelItemString(key *c.Char) c.Int

Remove the mapping for the string 'key' from the object 'o'. Returns -1 on failure.

This is equivalent to the Python statement: del o[key].

llgo:link (*Object).DelItemString C.PyObject_DelItemString

func (*Object) Dir added in v0.2.0

func (self *Object) Dir() *Object

PyObject_Dir(obj) acts like Python builtins.dir(obj), returning a list of strings. PyObject_Dir(NULL) is like builtins.dir(), returning the names of the current locals. In this case, if there are no current locals, NULL is returned, and PyErr_Occurred() is false.

llgo:link (*Object).Dir C.PyObject_Dir

func (*Object) Format added in v0.2.0

func (self *Object) Format(format_spec *Object) *Object

Takes an arbitrary object and returns the result of calling obj.__format__(format_spec).

llgo:link (*Object).Format C.PyObject_Format

func (*Object) GC_IsFinalized added in v0.2.0

func (self *Object) GC_IsFinalized() c.Int

llgo:link (*Object).GC_IsFinalized C.PyObject_GC_IsFinalized

func (*Object) GC_IsTracked added in v0.2.0

func (self *Object) GC_IsTracked() c.Int

llgo:link (*Object).GC_IsTracked C.PyObject_GC_IsTracked

func (*Object) GET_WEAKREFS_LISTPTR added in v0.2.0

func (self *Object) GET_WEAKREFS_LISTPTR() **Object

llgo:link (*Object).GET_WEAKREFS_LISTPTR C.PyObject_GET_WEAKREFS_LISTPTR

func (*Object) GenericGetAttr added in v0.2.0

func (self *Object) GenericGetAttr(_llcppg_param2 *Object) *Object

llgo:link (*Object).GenericGetAttr C.PyObject_GenericGetAttr

func (*Object) GenericGetDict added in v0.2.0

func (self *Object) GenericGetDict(_llcppg_param2 unsafe.Pointer) *Object

llgo:link (*Object).GenericGetDict C.PyObject_GenericGetDict

func (*Object) GenericHash added in v0.2.0

func (self *Object) GenericHash() HashT

llgo:link (*Object).GenericHash C.PyObject_GenericHash

func (*Object) GenericSetAttr added in v0.2.0

func (self *Object) GenericSetAttr(_llcppg_param2 *Object, _llcppg_param3 *Object) c.Int

llgo:link (*Object).GenericSetAttr C.PyObject_GenericSetAttr

func (*Object) GenericSetDict added in v0.2.0

func (self *Object) GenericSetDict(_llcppg_param2 *Object, _llcppg_param3 unsafe.Pointer) c.Int

llgo:link (*Object).GenericSetDict C.PyObject_GenericSetDict

func (*Object) HasAttr added in v0.2.0

func (self *Object) HasAttr(_llcppg_param2 *Object) c.Int

llgo:link (*Object).HasAttr C.PyObject_HasAttr

func (*Object) HasAttrString added in v0.2.0

func (self *Object) HasAttrString(_llcppg_param2 *c.Char) c.Int

llgo:link (*Object).HasAttrString C.PyObject_HasAttrString

func (*Object) HasAttrStringWithError added in v0.2.0

func (self *Object) HasAttrStringWithError(_llcppg_param2 *c.Char) c.Int

llgo:link (*Object).HasAttrStringWithError C.PyObject_HasAttrStringWithError

func (*Object) HasAttrWithError added in v0.2.0

func (self *Object) HasAttrWithError(_llcppg_param2 *Object) c.Int

llgo:link (*Object).HasAttrWithError C.PyObject_HasAttrWithError

func (*Object) Hash added in v0.2.0

func (self *Object) Hash() HashT

llgo:link (*Object).Hash C.PyObject_Hash

func (*Object) HashNotImplemented added in v0.2.0

func (self *Object) HashNotImplemented() HashT

llgo:link (*Object).HashNotImplemented C.PyObject_HashNotImplemented

func (*Object) IS_GC added in v0.2.0

func (self *Object) IS_GC() c.Int

Test if an object implements the garbage collector protocol

llgo:link (*Object).IS_GC C.PyObject_IS_GC

func (*Object) ImportFrozenModuleObject added in v0.3.0

func (self *Object) ImportFrozenModuleObject() c.Int

llgo:link (*Object).ImportFrozenModuleObject C.PyImport_ImportFrozenModuleObject

func (*Object) ImportImportModuleAttr added in v0.3.0

func (self *Object) ImportImportModuleAttr(attr_name *Object) *Object

llgo:link (*Object).ImportImportModuleAttr C.PyImport_ImportModuleAttr

func (*Object) ImportReloadModule added in v0.3.0

func (self *Object) ImportReloadModule() *Object

llgo:link (*Object).ImportReloadModule C.PyImport_ReloadModule

func (*Object) Init added in v0.2.0

func (self *Object) Init(_llcppg_param2 *TypeObject) *Object

Functions

llgo:link (*Object).Init C.PyObject_Init

func (*Object) IsInstance added in v0.2.0

func (self *Object) IsInstance(typeorclass *Object) c.Int

isinstance(object, typeorclass)

llgo:link (*Object).IsInstance C.PyObject_IsInstance

func (*Object) IsSubclass added in v0.2.0

func (self *Object) IsSubclass(typeorclass *Object) c.Int

issubclass(object, typeorclass)

llgo:link (*Object).IsSubclass C.PyObject_IsSubclass

func (*Object) IsTrue added in v0.2.0

func (self *Object) IsTrue() c.Int

llgo:link (*Object).IsTrue C.PyObject_IsTrue

func (*Object) Item added in v0.2.0

func (self *Object) Item(key *Object) *Object

Return element of 'o' corresponding to the object 'key'. Return NULL on failure.

This is the equivalent of the Python expression: o[key]

llgo:link (*Object).Item C.PyObject_GetItem

func (*Object) ItemData added in v0.2.0

func (self *Object) ItemData() unsafe.Pointer

llgo:link (*Object).ItemData C.PyObject_GetItemData

func (*Object) Iter added in v0.2.0

func (self *Object) Iter() *Object

Takes an object and returns an iterator for it. This is typically a new iterator but if the argument is an iterator, this returns itself.

llgo:link (*Object).Iter C.PyObject_GetIter

func (*Object) Length added in v0.2.0

func (self *Object) Length() SsizeT

llgo:link (*Object).Length C.PyObject_Length

func (*Object) LengthHint added in v0.2.0

func (self *Object) LengthHint(_llcppg_param2 SsizeT) SsizeT

Guess the size of object 'o' using len(o) or o.__length_hint__(). If neither of those return a non-negative value, then return the default value. If one of the calls fails, this function returns -1.

llgo:link (*Object).LengthHint C.PyObject_LengthHint

func (*Object) Not added in v0.2.0

func (self *Object) Not() c.Int

llgo:link (*Object).Not C.PyObject_Not

func (*Object) ODictDelItem added in v0.2.3

func (self *Object) ODictDelItem(key *Object) c.Int

llgo:link (*Object).ODictDelItem C.PyODict_DelItem

func (*Object) ODictSetItem added in v0.2.3

func (self *Object) ODictSetItem(key *Object, item *Object) c.Int

llgo:link (*Object).ODictSetItem C.PyODict_SetItem

func (*Object) OptionalAttr added in v0.2.0

func (self *Object) OptionalAttr(_llcppg_param2 *Object, _llcppg_param3 **Object) c.Int

llgo:link (*Object).OptionalAttr C.PyObject_GetOptionalAttr

func (*Object) OptionalAttrString added in v0.2.0

func (self *Object) OptionalAttrString(_llcppg_param2 *c.Char, _llcppg_param3 **Object) c.Int

llgo:link (*Object).OptionalAttrString C.PyObject_GetOptionalAttrString

func (*Object) Print added in v0.2.0

func (self *Object) Print(_llcppg_param2 *c.FILE, _llcppg_param3 c.Int) c.Int

llgo:link (*Object).Print C.PyObject_Print

func (*Object) Repr added in v0.2.0

func (self *Object) Repr() *Object

Generic operations on objects

llgo:link (*Object).Repr C.PyObject_Repr

func (*Object) RichCompare added in v0.2.0

func (self *Object) RichCompare(_llcppg_param2 *Object, _llcppg_param3 c.Int) *Object

llgo:link (*Object).RichCompare C.PyObject_RichCompare

func (*Object) RichCompareBool added in v0.2.0

func (self *Object) RichCompareBool(_llcppg_param2 *Object, _llcppg_param3 c.Int) c.Int

llgo:link (*Object).RichCompareBool C.PyObject_RichCompareBool

func (*Object) SelfIter added in v0.2.0

func (self *Object) SelfIter() *Object

llgo:link (*Object).SelfIter C.PyObject_SelfIter

func (*Object) SetAttr added in v0.2.0

func (self *Object) SetAttr(_llcppg_param2 *Object, _llcppg_param3 *Object) c.Int

llgo:link (*Object).SetAttr C.PyObject_SetAttr

func (*Object) SetAttrString added in v0.2.0

func (self *Object) SetAttrString(_llcppg_param2 *c.Char, _llcppg_param3 *Object) c.Int

llgo:link (*Object).SetAttrString C.PyObject_SetAttrString

func (*Object) SetItem added in v0.2.0

func (self *Object) SetItem(key *Object, v *Object) c.Int

Map the object 'key' to the value 'v' into 'o'.

Raise an exception and return -1 on failure; return 0 on success.

This is the equivalent of the Python statement: o[key]=v.

llgo:link (*Object).SetItem C.PyObject_SetItem

func (*Object) Size added in v0.2.0

func (self *Object) Size() SsizeT

Return the size of object 'o'. If the object 'o' provides both sequence and mapping protocols, the sequence size is returned.

On error, -1 is returned.

This is the equivalent to the Python expression: len(o)

llgo:link (*Object).Size C.PyObject_Size

func (*Object) Str added in v0.2.0

func (self *Object) Str() *Object

llgo:link (*Object).Str C.PyObject_Str

func (*Object) Type added in v0.2.0

func (self *Object) Type() *Object

Get the type of an object.

On success, returns a type object corresponding to the object type of object 'o'. On failure, returns NULL.

This is equivalent to the Python expression: type(o)

llgo:link (*Object).Type C.PyObject_Type

func (*Object) TypeData added in v0.2.0

func (self *Object) TypeData(cls *TypeObject) unsafe.Pointer

llgo:link (*Object).TypeData C.PyObject_GetTypeData

func (*Object) Vectorcall added in v0.2.0

func (self *Object) Vectorcall(args **Object, nargsf c.SizeT, kwnames *Object) *Object

Perform a PEP 590-style vector call on 'callable'

llgo:link (*Object).Vectorcall C.PyObject_Vectorcall

func (*Object) VectorcallDict added in v0.2.0

func (self *Object) VectorcallDict(args **Object, nargsf c.SizeT, kwargs *Object) *Object

Same as PyObject_Vectorcall except that keyword arguments are passed as dict, which may be NULL if there are no keyword arguments.

llgo:link (*Object).VectorcallDict C.PyObject_VectorcallDict

func (*Object) VectorcallMethod added in v0.2.0

func (self *Object) VectorcallMethod(args **Object, nargsf c.SizeT, kwnames *Object) *Object

Call the method 'name' on args[0] with arguments in args[1..nargsf-1].

llgo:link (*Object).VectorcallMethod C.PyObject_VectorcallMethod

func (*Object) VisitManagedDict added in v0.2.0

func (self *Object) VisitManagedDict(visit Visitproc, arg unsafe.Pointer) c.Int

llgo:link (*Object).VisitManagedDict C.PyObject_VisitManagedDict

type ObjectArenaAllocator added in v0.2.0

type ObjectArenaAllocator struct {
	Ctx   unsafe.Pointer
	Alloc func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 c.SizeT) unsafe.Pointer
	Free  func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 unsafe.Pointer, _llcppg_param3 c.SizeT)
}

llgo:type C

type Objobjargproc

type Objobjargproc = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) c.Int

llgo:type C

type Objobjproc

type Objobjproc = func(_llcppg_param1 *Object, _llcppg_param2 *Object) c.Int

llgo:type C

type OpenCodeHookFunction added in v0.2.0

type OpenCodeHookFunction = func(_llcppg_param1 *Object, _llcppg_param2 unsafe.Pointer) *Object

llgo:type C

type PY_UNICODE_TYPE

type PY_UNICODE_TYPE = c.WcharT

Py_UNICODE was the native Unicode storage format (code unit) used by Python and represents a single Unicode element in the Unicode type. With PEP 393, Py_UNICODE is deprecated and replaced with a typedef to wchar_t.

type PerfMapState

type PerfMapState struct {
	PerfMap *c.FILE
	MapLock ThreadTypeLock
}

type PreConfig added in v0.2.0

type PreConfig struct {
	X_configInit      c.Int
	ParseArgv         c.Int
	Isolated          c.Int
	UseEnvironment    c.Int
	ConfigureLocale   c.Int
	CoerceCLocale     c.Int
	CoerceCLocaleWarn c.Int
	Utf8Mode          c.Int
	DevMode           c.Int
	Allocator         c.Int
}

func (*PreConfig) InitIsolatedConfig added in v0.2.0

func (self *PreConfig) InitIsolatedConfig()

llgo:link (*PreConfig).InitIsolatedConfig C.PyPreConfig_InitIsolatedConfig

func (*PreConfig) InitPythonConfig added in v0.2.0

func (self *PreConfig) InitPythonConfig()

llgo:link (*PreConfig).InitPythonConfig C.PyPreConfig_InitPythonConfig

type Printfunc

type Printfunc = SsizeT

Allow printfunc in the tp_vectorcall_offset slot for backwards-compatibility

type RefTracer added in v0.2.0

type RefTracer = func(_llcppg_param1 *Object, _llcppg_param2 RefTracerEvent, _llcppg_param3 unsafe.Pointer) c.Int

llgo:type C

func RefTracerGetTracer added in v0.2.0

func RefTracerGetTracer(_llcppg_param1 *unsafe.Pointer) RefTracer

type RefTracerEvent added in v0.2.0

type RefTracerEvent c.Uint
const (
	RefTracer_CREATE  RefTracerEvent = 0
	RefTracer_DESTROY RefTracerEvent = 1
)

type Releasebufferproc

type Releasebufferproc = func(_llcppg_param1 *Object, _llcppg_param2 *Buffer)

llgo:type C

type Reprfunc

type Reprfunc = func(_llcppg_param1 *Object) *Object

llgo:type C

type Richcmpfunc

type Richcmpfunc = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 c.Int) *Object

llgo:type C

type Sdigit

type Sdigit = c.Int32T

signed variant of digit

type SendResult added in v0.2.0

type SendResult c.Int

Result of calling PyIter_Send

const (
	PYGEN_RETURN SendResult = 0
	PYGEN_ERROR  SendResult = -1
	PYGEN_NEXT   SendResult = 1
)

func IterSend added in v0.2.3

func IterSend(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 **Object) SendResult

Takes generator, coroutine or iterator object and sends the value into it. Returns: - PYGEN_RETURN (0) if generator has returned. 'result' parameter is filled with return value - PYGEN_ERROR (-1) if exception was raised. 'result' parameter is NULL - PYGEN_NEXT (1) if generator has yielded. 'result' parameter is filled with yielded value.

type Sendfunc

type Sendfunc = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 **Object) SendResult

llgo:type C

type SequenceMethods added in v0.2.0

type SequenceMethods struct {
	SqLength        Lenfunc
	SqConcat        Binaryfunc
	SqRepeat        Ssizeargfunc
	SqItem          Ssizeargfunc
	WasSqSlice      unsafe.Pointer
	SqAssItem       Ssizeobjargproc
	WasSqAssSlice   unsafe.Pointer
	SqContains      Objobjproc
	SqInplaceConcat Binaryfunc
	SqInplaceRepeat Ssizeargfunc
}

type SetObject added in v0.2.0

type SetObject struct {
	ObBase      Object
	Fill        SsizeT
	Used        SsizeT
	Mask        SsizeT
	Table       *Setentry
	Hash        HashT
	Finger      SsizeT
	Smalltable  [8]Setentry
	Weakreflist *Object
}

func NewSet added in v0.2.3

func NewSet(_llcppg_param1 *Object) *SetObject

func (*SetObject) Add added in v0.2.3

func (self *SetObject) Add(key *Object) c.Int

llgo:link (*SetObject).Add C.PySet_Add

func (*SetObject) Clear added in v0.2.3

func (self *SetObject) Clear() c.Int

llgo:link (*SetObject).Clear C.PySet_Clear

func (*SetObject) Contains added in v0.2.3

func (self *SetObject) Contains(key *Object) c.Int

llgo:link (*SetObject).Contains C.PySet_Contains

func (*SetObject) Discard added in v0.2.3

func (self *SetObject) Discard(key *Object) c.Int

llgo:link (*SetObject).Discard C.PySet_Discard

func (*SetObject) Pop added in v0.2.3

func (self *SetObject) Pop() *Object

llgo:link (*SetObject).Pop C.PySet_Pop

func (*SetObject) Size added in v0.2.3

func (self *SetObject) Size() SsizeT

llgo:link (*SetObject).Size C.PySet_Size

type Setattrfunc

type Setattrfunc = func(_llcppg_param1 *Object, _llcppg_param2 *c.Char, _llcppg_param3 *Object) c.Int

llgo:type C

type Setattrofunc

type Setattrofunc = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) c.Int

llgo:type C

type Setentry

type Setentry struct {
	Key  *Object
	Hash HashT
}

type Setter

type Setter = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 unsafe.Pointer) c.Int

llgo:type C

type SliceObject added in v0.2.0

type SliceObject struct {
	ObBase Object
	Start  *Object
	Stop   *Object
	Step   *Object
}

func NewSlice added in v0.2.3

func NewSlice(start *Object, stop *Object, step *Object) *SliceObject

func (*SliceObject) Indices added in v0.2.3

func (self *SliceObject) Indices(length SsizeT, start *SsizeT, stop *SsizeT, step *SsizeT) c.Int

llgo:link (*SliceObject).Indices C.PySlice_GetIndices

func (*SliceObject) IndicesEx added in v0.2.3

func (self *SliceObject) IndicesEx(length SsizeT, start *SsizeT, stop *SsizeT, step *SsizeT, slicelength *SsizeT) c.Int

llgo:link (*SliceObject).IndicesEx C.PySlice_GetIndicesEx

func (*SliceObject) Unpack added in v0.2.3

func (self *SliceObject) Unpack(start *SsizeT, stop *SsizeT, step *SsizeT) c.Int

llgo:link (*SliceObject).Unpack C.PySlice_Unpack

type SsizeCleanT added in v0.2.0

type SsizeCleanT = SsizeT

Now PY_SSIZE_T_CLEAN is mandatory. This is just for backward compatibility.

type SsizeT added in v0.2.0

type SsizeT = c.SsizeT

func BufferSizeFromFormat added in v0.2.0

func BufferSizeFromFormat(format *c.Char) SsizeT

Return the implied itemsize of the data-format area from a struct-style description.

func GC_Collect added in v0.2.0

func GC_Collect() SsizeT

C equivalent of gc.collect().

func MappingLength added in v0.2.3

func MappingLength(o *Object) SsizeT

func MappingSize added in v0.2.3

func MappingSize(o *Object) SsizeT

Returns the number of keys in mapping object 'o' on success, and -1 on failure. This is equivalent to the Python expression: len(o).

func NumberAsSsizeT added in v0.2.3

func NumberAsSsizeT(o *Object, exc *Object) SsizeT

Returns the object 'o' converted to Py_ssize_t by going through PyNumber_Index() first.

If an overflow error occurs while converting the int to Py_ssize_t, then the second argument 'exc' is the error-type to return. If it is NULL, then the overflow error is cleared and the value is clipped.

func REFCNT added in v0.2.0

func REFCNT(ob *Object) SsizeT

Py_REFCNT() implementation for the stable ABI

func SequenceCount added in v0.2.3

func SequenceCount(o *Object, value *Object) SsizeT

Return the number of occurrences on value on 'o', that is, return the number of keys for which o[key] == value.

On failure, return -1. This is equivalent to the Python expression: o.count(value).

func SequenceIndex added in v0.2.3

func SequenceIndex(o *Object, value *Object) SsizeT

Return the first index for which o[i] == value. On error, return -1.

This is equivalent to the Python expression: o.index(value).

func SequenceLength added in v0.2.3

func SequenceLength(o *Object) SsizeT

func SequenceSize added in v0.2.3

func SequenceSize(o *Object) SsizeT

Return the size of sequence object o, or -1 on failure.

func SliceAdjustIndices added in v0.2.0

func SliceAdjustIndices(length SsizeT, start *SsizeT, stop *SsizeT, step SsizeT) SsizeT

func UnstableEvalRequestCodeExtraIndex added in v0.2.0

func UnstableEvalRequestCodeExtraIndex(_llcppg_param1 Freefunc) SsizeT

Old name -- remove when this API changes:

func UnstableLongCompactValue added in v0.2.3

func UnstableLongCompactValue(op *LongObject) SsizeT

func Vectorcall_NARGS added in v0.2.0

func Vectorcall_NARGS(nargsf c.SizeT) SsizeT

Given a vectorcall nargsf argument, return the actual number of arguments. (For use outside the limited API, this is re-defined as a static inline function in cpython/abstract.h)

type Ssizeargfunc

type Ssizeargfunc = func(_llcppg_param1 *Object, _llcppg_param2 SsizeT) *Object

llgo:type C

type Ssizeobjargproc

type Ssizeobjargproc = func(_llcppg_param1 *Object, _llcppg_param2 SsizeT, _llcppg_param3 *Object) c.Int

llgo:type C

type Ssizessizeargfunc

type Ssizessizeargfunc = func(_llcppg_param1 *Object, _llcppg_param2 SsizeT, _llcppg_param3 SsizeT) *Object

llgo:type C

type Ssizessizeobjargproc

type Ssizessizeobjargproc = func(_llcppg_param1 *Object, _llcppg_param2 SsizeT, _llcppg_param3 SsizeT, _llcppg_param4 *Object) c.Int

llgo:type C

type Status added in v0.2.0

type Status struct {
	X_type   _llcppg_anon_5
	Func     *c.Char
	ErrMsg   *c.Char
	Exitcode c.Int
}

func InitializeFromConfig added in v0.2.0

func InitializeFromConfig(config *Config) Status

func NewInterpreterFromConfig added in v0.2.0

func NewInterpreterFromConfig(tstate_p **ThreadState, config *InterpreterConfig) Status

func PreInitialize added in v0.2.0

func PreInitialize(src_config *PreConfig) Status

func PreInitializeFromArgs added in v0.2.0

func PreInitializeFromArgs(src_config *PreConfig, argc SsizeT, argv **c.WcharT) Status

func PreInitializeFromBytesArgs added in v0.2.0

func PreInitializeFromBytesArgs(src_config *PreConfig, argc SsizeT, argv **c.Char) Status

func StatusError added in v0.2.0

func StatusError(err_msg *c.Char) Status

func StatusExit added in v0.2.0

func StatusExit(exitcode c.Int) Status

func StatusNoMemory added in v0.2.0

func StatusNoMemory() Status

func StatusOk added in v0.2.0

func StatusOk() Status

func (Status) Exception added in v0.2.0

func (self Status) Exception() c.Int

llgo:link Status.Exception C.PyStatus_Exception

func (Status) IsError added in v0.2.0

func (self Status) IsError() c.Int

llgo:link Status.IsError C.PyStatus_IsError

func (Status) IsExit added in v0.2.0

func (self Status) IsExit() c.Int

llgo:link Status.IsExit C.PyStatus_IsExit

type StopIterationObject added in v0.2.0

type StopIterationObject struct {
	ObBase          Object
	Dict            *Object
	Args            *Object
	Notes           *Object
	Traceback       *Object
	Context         *Object
	Cause           *Object
	SuppressContext c.Char
	Value           *Object
}

type StructSequence added in v0.2.0

type StructSequence = TupleObject

func (*StructSequence) StructSequenceGetItem added in v0.3.0

func (self *StructSequence) StructSequenceGetItem(_llcppg_param2 SsizeT) *Object

llgo:link (*StructSequence).StructSequenceGetItem C.PyStructSequence_GetItem

func (*StructSequence) StructSequenceSetItem added in v0.3.0

func (self *StructSequence) StructSequenceSetItem(_llcppg_param2 SsizeT, _llcppg_param3 *Object)

llgo:link (*StructSequence).StructSequenceSetItem C.PyStructSequence_SetItem

type StructSequenceDesc added in v0.2.0

type StructSequenceDesc struct {
	Name        *c.Char
	Doc         *c.Char
	Fields      *StructSequenceField
	NInSequence c.Int
}

func (*StructSequenceDesc) StructSequenceNewType added in v0.2.0

func (self *StructSequenceDesc) StructSequenceNewType() *TypeObject

llgo:link (*StructSequenceDesc).StructSequenceNewType C.PyStructSequence_NewType

type StructSequenceField added in v0.2.0

type StructSequenceField struct {
	Name *c.Char
	Doc  *c.Char
}

type Stwodigits

type Stwodigits = c.Int64T

signed variant of twodigits

type SyntaxErrorObject added in v0.2.0

type SyntaxErrorObject struct {
	ObBase           Object
	Dict             *Object
	Args             *Object
	Notes            *Object
	Traceback        *Object
	Context          *Object
	Cause            *Object
	SuppressContext  c.Char
	Msg              *Object
	Filename         *Object
	Lineno           *Object
	Offset           *Object
	EndLineno        *Object
	EndOffset        *Object
	Text             *Object
	PrintFileAndLine *Object
	Metadata         *Object
}

type SystemExitObject added in v0.2.0

type SystemExitObject struct {
	ObBase          Object
	Dict            *Object
	Args            *Object
	Notes           *Object
	Traceback       *Object
	Context         *Object
	Cause           *Object
	SuppressContext c.Char
	Code            *Object
}

type Ternaryfunc

type Ternaryfunc = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 *Object) *Object

llgo:type C

type ThreadState added in v0.2.0

type ThreadState = X_ts

func EvalSaveThread added in v0.2.0

func EvalSaveThread() *ThreadState

func GILStateGetThisThreadState added in v0.2.0

func GILStateGetThisThreadState() *ThreadState

Helper/diagnostic function - get the current thread state for this thread. May return NULL if no GILState API has been used on the current thread. Note that the main thread always has such a thread-state, even if no auto-thread-state call has been made on the main thread.

func NewInterpreter added in v0.2.0

func NewInterpreter() *ThreadState

Subinterpreter support

func ThreadStateGet added in v0.2.0

func ThreadStateGet() *ThreadState

Get the current thread state.

When the current thread state is NULL, this issues a fatal error (so that the caller needn't check for NULL).

The caller must hold the GIL.

See also PyThreadState_GetUnchecked() and _PyThreadState_GET().

func ThreadStateGetUnchecked added in v0.2.0

func ThreadStateGetUnchecked() *ThreadState

Similar to PyThreadState_Get(), but don't issue a fatal error if it is NULL.

func ThreadStateNew added in v0.2.3

func ThreadStateNew(_llcppg_param1 *InterpreterState) *ThreadState

func (*ThreadState) Clear added in v0.2.0

func (self *ThreadState) Clear()

llgo:link (*ThreadState).Clear C.PyThreadState_Clear

func (*ThreadState) Delete added in v0.2.0

func (self *ThreadState) Delete()

llgo:link (*ThreadState).Delete C.PyThreadState_Delete

func (*ThreadState) EnterTracing added in v0.2.0

func (self *ThreadState) EnterTracing()

Disable tracing and profiling.

llgo:link (*ThreadState).EnterTracing C.PyThreadState_EnterTracing

func (*ThreadState) Frame added in v0.2.0

func (self *ThreadState) Frame() *FrameObject

llgo:link (*ThreadState).Frame C.PyThreadState_GetFrame

func (*ThreadState) GetNext added in v0.3.1

func (self *ThreadState) GetNext() *ThreadState

llgo:link (*ThreadState).GetNext C.PyThreadState_Next

func (*ThreadState) ID added in v0.2.0

func (self *ThreadState) ID() c.Uint64T

llgo:link (*ThreadState).ID C.PyThreadState_GetID

func (*ThreadState) Interpreter added in v0.2.0

func (self *ThreadState) Interpreter() *InterpreterState

New in 3.9

llgo:link (*ThreadState).Interpreter C.PyThreadState_GetInterpreter

func (*ThreadState) LeaveTracing added in v0.2.0

func (self *ThreadState) LeaveTracing()

Reset tracing and profiling: enable them if a trace function or a profile function is set, otherwise disable them.

llgo:link (*ThreadState).LeaveTracing C.PyThreadState_LeaveTracing

func (*ThreadState) Swap added in v0.2.0

func (self *ThreadState) Swap() *ThreadState

llgo:link (*ThreadState).Swap C.PyThreadState_Swap

type ThreadTypeLock added in v0.2.0

type ThreadTypeLock uintptr

func ThreadAllocateLock added in v0.2.0

func ThreadAllocateLock() ThreadTypeLock

type TimeT added in v0.2.0

type TimeT = c.Int64T

type TracebackObject added in v0.2.0

type TracebackObject = X_traceback

type Tracefunc added in v0.2.0

type Tracefunc = func(_llcppg_param1 *Object, _llcppg_param2 *FrameObject, _llcppg_param3 c.Int, _llcppg_param4 *Object) c.Int

Py_tracefunc return -1 when raising an exception, or 0 for success.

llgo:type C

type Traverseproc

type Traverseproc = func(_llcppg_param1 *Object, _llcppg_param2 Visitproc, _llcppg_param3 unsafe.Pointer) c.Int

llgo:type C

type TssT added in v0.2.0

type TssT = X_tssT

opaque

func ThreadTssAlloc added in v0.2.0

func ThreadTssAlloc() *TssT

func (*TssT) Create added in v0.3.0

func (self *TssT) Create() c.Int

llgo:link (*TssT).Create C.PyThread_tss_create

func (*TssT) Delete added in v0.3.0

func (self *TssT) Delete()

llgo:link (*TssT).Delete C.PyThread_tss_delete

func (*TssT) Free added in v0.3.0

func (self *TssT) Free()

llgo:link (*TssT).Free C.PyThread_tss_free

func (*TssT) Get added in v0.3.0

func (self *TssT) Get() unsafe.Pointer

llgo:link (*TssT).Get C.PyThread_tss_get

func (*TssT) IsCreated added in v0.3.0

func (self *TssT) IsCreated() c.Int

The parameter key must not be NULL.

llgo:link (*TssT).IsCreated C.PyThread_tss_is_created

func (*TssT) Set added in v0.3.0

func (self *TssT) Set(value unsafe.Pointer) c.Int

llgo:link (*TssT).Set C.PyThread_tss_set

type TupleObject added in v0.2.0

type TupleObject struct {
	ObBase VarObject
	ObHash HashT
	ObItem [1]*Object
}

func NewTuple added in v0.2.3

func NewTuple(size SsizeT) *TupleObject

func (*TupleObject) Item added in v0.2.3

func (self *TupleObject) Item(_llcppg_param2 SsizeT) *Object

llgo:link (*TupleObject).Item C.PyTuple_GetItem

func (*TupleObject) SetItem added in v0.2.3

func (self *TupleObject) SetItem(_llcppg_param2 SsizeT, _llcppg_param3 *Object) c.Int

llgo:link (*TupleObject).SetItem C.PyTuple_SetItem

func (*TupleObject) Size added in v0.2.3

func (self *TupleObject) Size() SsizeT

llgo:link (*TupleObject).Size C.PyTuple_Size

func (*TupleObject) Slice added in v0.2.3

func (self *TupleObject) Slice(_llcppg_param2 SsizeT, _llcppg_param3 SsizeT) *Object

llgo:link (*TupleObject).Slice C.PyTuple_GetSlice

type Twodigits

type Twodigits = c.Uint64T

type TypeObject added in v0.2.0

type TypeObject = X_typeobject
var AsyncGenType TypeObject
var BaseObjectType TypeObject

built-in 'object'

var BoolType TypeObject
var ByteArrayIterType TypeObject
var ByteArrayType TypeObject

Type object

var BytesIterType TypeObject
var BytesType TypeObject
var CFunctionType TypeObject
var CMethodType TypeObject
var CallIterType TypeObject
var CapsuleType TypeObject
var CellType TypeObject
var ClassMethodDescrType TypeObject
var ClassMethodType TypeObject

The classmethod and staticmethod types lives here, too

var CodeType TypeObject
var ComplexType TypeObject
var ContextTokenType TypeObject
var ContextType TypeObject
var ContextVarType TypeObject
var CoroType TypeObject
var DictItemsType TypeObject
var DictIterItemType TypeObject
var DictIterKeyType TypeObject
var DictIterValueType TypeObject
var DictKeysType TypeObject
var DictProxyType TypeObject
var DictRevIterItemType TypeObject
var DictRevIterKeyType TypeObject
var DictRevIterValueType TypeObject
var DictType TypeObject
var DictValuesType TypeObject
var EllipsisType TypeObject
var EnumType TypeObject
var FilterType TypeObject
var FloatType TypeObject
var FrameLocalsProxyType TypeObject
var FrameType TypeObject
var FrozenSetType TypeObject
var FunctionType TypeObject
var GenType TypeObject
var GenericAliasType TypeObject
var GetSetDescrType TypeObject
var InstanceMethodType TypeObject
var ListIterType TypeObject
var ListRevIterType TypeObject
var ListType TypeObject
var LongRangeIterType TypeObject
var LongType TypeObject
var MapType TypeObject
var MemberDescrType TypeObject
var MemoryViewType TypeObject
var MethodDescrType TypeObject
var MethodType TypeObject
var ModuleDefType TypeObject
var ModuleType TypeObject
var ODictItemsType TypeObject
var ODictIterType TypeObject
var ODictKeysType TypeObject
var ODictType TypeObject
var ODictValuesType TypeObject
var PickleBufferType TypeObject
var PropertyType TypeObject
var RangeIterType TypeObject
var RangeType TypeObject
var ReversedType TypeObject
var SeqIterType TypeObject
var SetIterType TypeObject
var SetType TypeObject
var SliceType TypeObject
var StaticMethodType TypeObject
var StdPrinterType TypeObject
var SuperType TypeObject

built-in 'super'

var TraceBackType TypeObject

Reveal traceback type so we can typecheck traceback objects

var TupleIterType TypeObject
var TupleType TypeObject
var TypeType TypeObject

built-in 'type'

var UnicodeIterType TypeObject
var UnicodeType TypeObject
var WrapperDescrType TypeObject
var X_AsyncGenASendType TypeObject
var X_WeakrefCallableProxyType TypeObject
var X_WeakrefProxyType TypeObject
var X_WeakrefRefType TypeObject
var ZipType TypeObject

func TYPE added in v0.2.0

func TYPE(ob *Object) *TypeObject

Py_TYPE() implementation for the stable ABI

func TypeFromMetaclass added in v0.2.4

func TypeFromMetaclass(_llcppg_param1 *TypeObject, _llcppg_param2 *Object, _llcppg_param3 *TypeSpec, _llcppg_param4 *Object) *TypeObject

func TypeFromModuleAndSpec added in v0.2.4

func TypeFromModuleAndSpec(_llcppg_param1 *Object, _llcppg_param2 *TypeSpec, _llcppg_param3 *Object) *TypeObject

func TypeFromSpec added in v0.2.4

func TypeFromSpec(_llcppg_param1 *TypeSpec) *TypeObject

func TypeFromSpecWithBases added in v0.2.4

func TypeFromSpecWithBases(_llcppg_param1 *TypeSpec, _llcppg_param2 *Object) *TypeObject

func (*TypeObject) BaseByToken added in v0.2.3

func (self *TypeObject) BaseByToken(_llcppg_param2 unsafe.Pointer, _llcppg_param3 **TypeObject) c.Int

llgo:link (*TypeObject).BaseByToken C.PyType_GetBaseByToken

func (*TypeObject) DataSize added in v0.2.3

func (self *TypeObject) DataSize() SsizeT

llgo:link (*TypeObject).DataSize C.PyType_GetTypeDataSize

func (*TypeObject) DescrNewClassMethod added in v0.2.3

func (self *TypeObject) DescrNewClassMethod(_llcppg_param2 *MethodDef) *Object

llgo:link (*TypeObject).DescrNewClassMethod C.PyDescr_NewClassMethod

func (*TypeObject) DescrNewGetSet added in v0.2.3

func (self *TypeObject) DescrNewGetSet(_llcppg_param2 *GetSetDef) *Object

llgo:link (*TypeObject).DescrNewGetSet C.PyDescr_NewGetSet

func (*TypeObject) DescrNewMember added in v0.2.3

func (self *TypeObject) DescrNewMember(_llcppg_param2 *MemberDef) *Object

llgo:link (*TypeObject).DescrNewMember C.PyDescr_NewMember

func (*TypeObject) DescrNewMethod added in v0.2.3

func (self *TypeObject) DescrNewMethod(_llcppg_param2 *MethodDef) *Object

llgo:link (*TypeObject).DescrNewMethod C.PyDescr_NewMethod

func (*TypeObject) DescrNewWrapper added in v0.2.3

func (self *TypeObject) DescrNewWrapper(_llcppg_param2 *Wrapperbase, _llcppg_param3 unsafe.Pointer) *Object

llgo:link (*TypeObject).DescrNewWrapper C.PyDescr_NewWrapper

func (*TypeObject) Dict added in v0.2.3

func (self *TypeObject) Dict() *Object

llgo:link (*TypeObject).Dict C.PyType_GetDict

func (*TypeObject) Flags added in v0.2.3

func (self *TypeObject) Flags() c.Ulong

llgo:link (*TypeObject).Flags C.PyType_GetFlags

func (*TypeObject) Freeze added in v0.2.3

func (self *TypeObject) Freeze() c.Int

llgo:link (*TypeObject).Freeze C.PyType_Freeze

func (*TypeObject) FullyQualifiedName added in v0.2.3

func (self *TypeObject) FullyQualifiedName() *Object

llgo:link (*TypeObject).FullyQualifiedName C.PyType_GetFullyQualifiedName

func (*TypeObject) GenericAlloc added in v0.2.3

func (self *TypeObject) GenericAlloc(_llcppg_param2 SsizeT) *Object

llgo:link (*TypeObject).GenericAlloc C.PyType_GenericAlloc

func (*TypeObject) GenericNew added in v0.2.3

func (self *TypeObject) GenericNew(_llcppg_param2 *Object, _llcppg_param3 *Object) *Object

llgo:link (*TypeObject).GenericNew C.PyType_GenericNew

func (*TypeObject) IsSubtype added in v0.2.3

func (self *TypeObject) IsSubtype(_llcppg_param2 *TypeObject) c.Int

Generic type check

llgo:link (*TypeObject).IsSubtype C.PyType_IsSubtype

func (*TypeObject) Modified added in v0.2.3

func (self *TypeObject) Modified()

llgo:link (*TypeObject).Modified C.PyType_Modified

func (*TypeObject) Module added in v0.2.3

func (self *TypeObject) Module() *Object

llgo:link (*TypeObject).Module C.PyType_GetModule

func (*TypeObject) ModuleByDef added in v0.2.3

func (self *TypeObject) ModuleByDef(_llcppg_param2 *ModuleDef) *Object

llgo:link (*TypeObject).ModuleByDef C.PyType_GetModuleByDef

func (*TypeObject) ModuleName added in v0.2.3

func (self *TypeObject) ModuleName() *Object

llgo:link (*TypeObject).ModuleName C.PyType_GetModuleName

func (*TypeObject) ModuleState added in v0.2.3

func (self *TypeObject) ModuleState() unsafe.Pointer

llgo:link (*TypeObject).ModuleState C.PyType_GetModuleState

func (*TypeObject) Name added in v0.2.3

func (self *TypeObject) Name() *Object

llgo:link (*TypeObject).Name C.PyType_GetName

func (*TypeObject) QualName added in v0.2.3

func (self *TypeObject) QualName() *Object

llgo:link (*TypeObject).QualName C.PyType_GetQualName

func (*TypeObject) Ready added in v0.2.3

func (self *TypeObject) Ready() c.Int

llgo:link (*TypeObject).Ready C.PyType_Ready

func (*TypeObject) Slot added in v0.2.3

func (self *TypeObject) Slot(_llcppg_param2 c.Int) unsafe.Pointer

llgo:link (*TypeObject).Slot C.PyType_GetSlot

func (*TypeObject) StructSequenceInit added in v0.3.0

func (self *TypeObject) StructSequenceInit(desc *StructSequenceDesc)

llgo:link (*TypeObject).StructSequenceInit C.PyStructSequence_InitType

func (*TypeObject) StructSequenceInitType2 added in v0.2.0

func (self *TypeObject) StructSequenceInitType2(desc *StructSequenceDesc) c.Int

llgo:link (*TypeObject).StructSequenceInitType2 C.PyStructSequence_InitType2

func (*TypeObject) Type_SUPPORTS_WEAKREFS added in v0.2.3

func (self *TypeObject) Type_SUPPORTS_WEAKREFS() c.Int

Test if a type supports weak references

llgo:link (*TypeObject).Type_SUPPORTS_WEAKREFS C.PyType_SUPPORTS_WEAKREFS

type TypeSlot added in v0.2.0

type TypeSlot struct {
	Slot  c.Int
	Pfunc unsafe.Pointer
}

type TypeSpec added in v0.2.0

type TypeSpec struct {
	Name      *c.Char
	Basicsize c.Int
	Itemsize  c.Int
	Flags     c.Uint
	Slots     *TypeSlot
}

type TypeWatchCallback added in v0.2.0

type TypeWatchCallback = func(_llcppg_param1 *TypeObject) c.Int

llgo:type C

type UCS1 added in v0.2.0

type UCS1 = c.Uint8T

type UCS2 added in v0.2.0

type UCS2 = c.Uint16T

type UCS4 added in v0.2.0

type UCS4 = c.Uint32T

Py_UCS4 and Py_UCS2 are typedefs for the respective unicode representations.

func X_UnicodeToLowercase added in v0.2.0

func X_UnicodeToLowercase(ch UCS4) UCS4

func X_UnicodeToTitlecase added in v0.2.0

func X_UnicodeToTitlecase(ch UCS4) UCS4

func X_UnicodeToUppercase added in v0.2.0

func X_UnicodeToUppercase(ch UCS4) UCS4

type UNICODE added in v0.2.0

type UNICODE = c.WcharT

type UhashT added in v0.2.0

type UhashT = c.SizeT

type UintptrT added in v0.2.0

type UintptrT = c.UintptrT

uintptr_t is the C9X name for an unsigned integral type such that a legitimate void* can be cast to uintptr_t and then back to void* again without loss of information. Similarly for intptr_t, wrt a signed integral type.

type Unaryfunc

type Unaryfunc = func(_llcppg_param1 *Object) *Object

llgo:type C

type UnicodeErrorObject added in v0.2.0

type UnicodeErrorObject struct {
	ObBase          Object
	Dict            *Object
	Args            *Object
	Notes           *Object
	Traceback       *Object
	Context         *Object
	Cause           *Object
	SuppressContext c.Char
	Encoding        *Object
	Object          *Object
	Start           SsizeT
	End             SsizeT
	Reason          *Object
}

type UnicodeKind added in v0.2.0

type UnicodeKind c.Uint
const (
	// Return values of the PyUnicode_KIND() function:
	Unicode_1BYTE_KIND UnicodeKind = 1
	Unicode_2BYTE_KIND UnicodeKind = 2
	Unicode_4BYTE_KIND UnicodeKind = 4
)

type UnicodeObject added in v0.2.0

type UnicodeObject struct {
	X_base CompactUnicodeObject
	Data   _llcppg_anon_4
}

Object format for Unicode subclasses.

func NewUnicode added in v0.2.3

func NewUnicode(size SsizeT, maxchar UCS4) *UnicodeObject

With PEP 393, this is the recommended way to allocate a new unicode object. This function will allocate the object and its buffer in a single memory block. Objects created using this function are not resizable.

func UnicodeFromEncodedObject added in v0.2.4

func UnicodeFromEncodedObject(obj *Object, encoding *c.Char, errors *c.Char) *UnicodeObject

func UnicodeFromFormat added in v0.2.0

func UnicodeFromFormat(format *c.Char, __llgo_va_list ...any) *UnicodeObject

func UnicodeFromFormatV added in v0.2.4

func UnicodeFromFormatV(format *c.Char, vargs c.VaList) *UnicodeObject

func UnicodeFromKindAndData added in v0.2.0

func UnicodeFromKindAndData(kind c.Int, buffer unsafe.Pointer, size SsizeT) *UnicodeObject

Create a new string from a buffer of Py_UCS1, Py_UCS2 or Py_UCS4 characters. Scan the string to find the maximum character.

func UnicodeFromOrdinal added in v0.2.0

func UnicodeFromOrdinal(ordinal c.Int) *UnicodeObject

func UnicodeFromString added in v0.2.0

func UnicodeFromString(u *c.Char) *UnicodeObject

Similar to PyUnicode_FromUnicode(), but u points to null-terminated UTF-8 encoded bytes. The size is determined with strlen().

func UnicodeFromStringAndSize added in v0.2.0

func UnicodeFromStringAndSize(u *c.Char, size SsizeT) *UnicodeObject

Similar to PyUnicode_FromUnicode(), but u points to UTF-8 encoded bytes

func UnicodeFromWideChar added in v0.2.0

func UnicodeFromWideChar(w *c.WcharT, size SsizeT) *UnicodeObject

func (*UnicodeObject) AsASCIIString added in v0.2.3

func (self *UnicodeObject) AsASCIIString() *Object

llgo:link (*UnicodeObject).AsASCIIString C.PyUnicode_AsASCIIString

func (*UnicodeObject) AsCharmapString added in v0.2.3

func (self *UnicodeObject) AsCharmapString(mapping *Object) *Object

llgo:link (*UnicodeObject).AsCharmapString C.PyUnicode_AsCharmapString

func (*UnicodeObject) AsDecoded added in v0.2.3

func (self *UnicodeObject) AsDecoded(encoding *c.Char, errors *c.Char) *Object

llgo:link (*UnicodeObject).AsDecoded C.PyUnicode_AsDecodedUnicode

func (*UnicodeObject) AsDecodedObject added in v0.2.3

func (self *UnicodeObject) AsDecodedObject(encoding *c.Char, errors *c.Char) *Object

llgo:link (*UnicodeObject).AsDecodedObject C.PyUnicode_AsDecodedObject

func (*UnicodeObject) AsEncoded added in v0.2.3

func (self *UnicodeObject) AsEncoded(encoding *c.Char, errors *c.Char) *Object

llgo:link (*UnicodeObject).AsEncoded C.PyUnicode_AsEncodedUnicode

func (*UnicodeObject) AsEncodedObject added in v0.2.3

func (self *UnicodeObject) AsEncodedObject(encoding *c.Char, errors *c.Char) *Object

llgo:link (*UnicodeObject).AsEncodedObject C.PyUnicode_AsEncodedObject

func (*UnicodeObject) AsEncodedString added in v0.2.3

func (self *UnicodeObject) AsEncodedString(encoding *c.Char, errors *c.Char) *Object

llgo:link (*UnicodeObject).AsEncodedString C.PyUnicode_AsEncodedString

func (*UnicodeObject) AsLatin1String added in v0.2.3

func (self *UnicodeObject) AsLatin1String() *Object

llgo:link (*UnicodeObject).AsLatin1String C.PyUnicode_AsLatin1String

func (*UnicodeObject) AsRawUnicodeEscapeString added in v0.2.3

func (self *UnicodeObject) AsRawUnicodeEscapeString() *Object

llgo:link (*UnicodeObject).AsRawUnicodeEscapeString C.PyUnicode_AsRawUnicodeEscapeString

func (*UnicodeObject) AsUCS4 added in v0.2.3

func (self *UnicodeObject) AsUCS4(buffer *UCS4, buflen SsizeT, copy_null c.Int) *UCS4

Copy the string into a UCS4 buffer including the null character if copy_null is set. Return NULL and raise an exception on error. Raise a SystemError if the buffer is smaller than the string. Return buffer on success.

buflen is the length of the buffer in (Py_UCS4) characters.

llgo:link (*UnicodeObject).AsUCS4 C.PyUnicode_AsUCS4

func (*UnicodeObject) AsUCS4Copy added in v0.2.3

func (self *UnicodeObject) AsUCS4Copy() *UCS4

Copy the string into a UCS4 buffer. A new buffer is allocated using PyMem_Malloc; if this fails, NULL is returned with a memory error exception set.

llgo:link (*UnicodeObject).AsUCS4Copy C.PyUnicode_AsUCS4Copy

func (*UnicodeObject) AsUTF8 added in v0.2.3

func (self *UnicodeObject) AsUTF8() *c.Char

llgo:link (*UnicodeObject).AsUTF8 C.PyUnicode_AsUTF8

func (*UnicodeObject) AsUTF8AndSize added in v0.2.3

func (self *UnicodeObject) AsUTF8AndSize(size *SsizeT) *c.Char

llgo:link (*UnicodeObject).AsUTF8AndSize C.PyUnicode_AsUTF8AndSize

func (*UnicodeObject) AsUTF8String added in v0.2.3

func (self *UnicodeObject) AsUTF8String() *Object

llgo:link (*UnicodeObject).AsUTF8String C.PyUnicode_AsUTF8String

func (*UnicodeObject) AsUTF16String added in v0.2.3

func (self *UnicodeObject) AsUTF16String() *Object

llgo:link (*UnicodeObject).AsUTF16String C.PyUnicode_AsUTF16String

func (*UnicodeObject) AsUTF32String added in v0.2.3

func (self *UnicodeObject) AsUTF32String() *Object

llgo:link (*UnicodeObject).AsUTF32String C.PyUnicode_AsUTF32String

func (*UnicodeObject) AsUnicodeEscapeString added in v0.2.3

func (self *UnicodeObject) AsUnicodeEscapeString() *Object

llgo:link (*UnicodeObject).AsUnicodeEscapeString C.PyUnicode_AsUnicodeEscapeString

func (*UnicodeObject) AsWideChar added in v0.2.3

func (self *UnicodeObject) AsWideChar(w *c.WcharT, size SsizeT) SsizeT

llgo:link (*UnicodeObject).AsWideChar C.PyUnicode_AsWideChar

func (*UnicodeObject) AsWideCharString added in v0.2.3

func (self *UnicodeObject) AsWideCharString(size *SsizeT) *c.WcharT

llgo:link (*UnicodeObject).AsWideCharString C.PyUnicode_AsWideCharString

func (*UnicodeObject) BuildEncodingMap added in v0.2.3

func (self *UnicodeObject) BuildEncodingMap() *Object

llgo:link (*UnicodeObject).BuildEncodingMap C.PyUnicode_BuildEncodingMap

func (*UnicodeObject) Compare added in v0.2.3

func (self *UnicodeObject) Compare(right *Object) c.Int

llgo:link (*UnicodeObject).Compare C.PyUnicode_Compare

func (*UnicodeObject) CompareWithASCIIString added in v0.2.3

func (self *UnicodeObject) CompareWithASCIIString(right *c.Char) c.Int

llgo:link (*UnicodeObject).CompareWithASCIIString C.PyUnicode_CompareWithASCIIString

func (*UnicodeObject) Concat added in v0.2.3

func (self *UnicodeObject) Concat(right *Object) *Object

llgo:link (*UnicodeObject).Concat C.PyUnicode_Concat

func (*UnicodeObject) Contains added in v0.2.3

func (self *UnicodeObject) Contains(element *Object) c.Int

llgo:link (*UnicodeObject).Contains C.PyUnicode_Contains

func (*UnicodeObject) CopyCharacters added in v0.2.3

func (self *UnicodeObject) CopyCharacters(to_start SsizeT, from *Object, from_start SsizeT, how_many SsizeT) SsizeT

Copy character from one unicode object into another, this function performs character conversion when necessary and falls back to memcpy() if possible.

Fail if to is too small (smaller than *how_many* or smaller than len(from)-from_start), or if kind(from[from_start:from_start+how_many]) > kind(to), or if *to* has more than 1 reference.

Return the number of written character, or return -1 and raise an exception on error.

Pseudo-code:

how_many = min(how_many, len(from) - from_start) to[to_start:to_start+how_many] = from[from_start:from_start+how_many] return how_many

Note: The function doesn't write a terminating null character.

llgo:link (*UnicodeObject).CopyCharacters C.PyUnicode_CopyCharacters

func (*UnicodeObject) Count added in v0.2.3

func (self *UnicodeObject) Count(substr *Object, start SsizeT, end SsizeT) SsizeT

llgo:link (*UnicodeObject).Count C.PyUnicode_Count

func (*UnicodeObject) EncodeFSDefault added in v0.2.3

func (self *UnicodeObject) EncodeFSDefault() *Object

Encode a Unicode object to the Python filesystem encoding and error handler. Return bytes.

llgo:link (*UnicodeObject).EncodeFSDefault C.PyUnicode_EncodeFSDefault

func (*UnicodeObject) EncodeLocale added in v0.2.3

func (self *UnicodeObject) EncodeLocale(errors *c.Char) *Object

llgo:link (*UnicodeObject).EncodeLocale C.PyUnicode_EncodeLocale

func (*UnicodeObject) Equal added in v0.2.3

func (self *UnicodeObject) Equal(str2 *Object) c.Int

llgo:link (*UnicodeObject).Equal C.PyUnicode_Equal

func (*UnicodeObject) EqualToUTF8 added in v0.2.3

func (self *UnicodeObject) EqualToUTF8(_llcppg_param2 *c.Char) c.Int

llgo:link (*UnicodeObject).EqualToUTF8 C.PyUnicode_EqualToUTF8

func (*UnicodeObject) EqualToUTF8AndSize added in v0.2.3

func (self *UnicodeObject) EqualToUTF8AndSize(_llcppg_param2 *c.Char, _llcppg_param3 SsizeT) c.Int

llgo:link (*UnicodeObject).EqualToUTF8AndSize C.PyUnicode_EqualToUTF8AndSize

func (*UnicodeObject) FSConverter added in v0.2.3

func (self *UnicodeObject) FSConverter(_llcppg_param2 unsafe.Pointer) c.Int

llgo:link (*UnicodeObject).FSConverter C.PyUnicode_FSConverter

func (*UnicodeObject) FSDecoder added in v0.2.3

func (self *UnicodeObject) FSDecoder(_llcppg_param2 unsafe.Pointer) c.Int

llgo:link (*UnicodeObject).FSDecoder C.PyUnicode_FSDecoder

func (*UnicodeObject) Fill added in v0.2.3

func (self *UnicodeObject) Fill(start SsizeT, length SsizeT, fill_char UCS4) SsizeT

Fill a string with a character: write fill_char into unicode[start:start+length].

Fail if fill_char is bigger than the string maximum character, or if the string has more than 1 reference.

Return the number of written character, or return -1 and raise an exception on error.

llgo:link (*UnicodeObject).Fill C.PyUnicode_Fill

func (*UnicodeObject) Find added in v0.2.3

func (self *UnicodeObject) Find(substr *Object, start SsizeT, end SsizeT, direction c.Int) SsizeT

llgo:link (*UnicodeObject).Find C.PyUnicode_Find

func (*UnicodeObject) FindChar added in v0.2.3

func (self *UnicodeObject) FindChar(ch UCS4, start SsizeT, end SsizeT, direction c.Int) SsizeT

Like PyUnicode_Find, but search for single character only.

llgo:link (*UnicodeObject).FindChar C.PyUnicode_FindChar

func (*UnicodeObject) Format added in v0.2.3

func (self *UnicodeObject) Format(args *Object) *Object

llgo:link (*UnicodeObject).Format C.PyUnicode_Format

func (*UnicodeObject) IsIdentifier added in v0.2.3

func (self *UnicodeObject) IsIdentifier() c.Int

llgo:link (*UnicodeObject).IsIdentifier C.PyUnicode_IsIdentifier

func (*UnicodeObject) Join added in v0.2.3

func (self *UnicodeObject) Join(seq *Object) *Object

llgo:link (*UnicodeObject).Join C.PyUnicode_Join

func (*UnicodeObject) Length added in v0.2.3

func (self *UnicodeObject) Length() SsizeT

llgo:link (*UnicodeObject).Length C.PyUnicode_GetLength

func (*UnicodeObject) Partition added in v0.2.3

func (self *UnicodeObject) Partition(sep *Object) *Object

llgo:link (*UnicodeObject).Partition C.PyUnicode_Partition

func (*UnicodeObject) RPartition added in v0.2.3

func (self *UnicodeObject) RPartition(sep *Object) *Object

llgo:link (*UnicodeObject).RPartition C.PyUnicode_RPartition

func (*UnicodeObject) RSplit added in v0.2.3

func (self *UnicodeObject) RSplit(sep *Object, maxsplit SsizeT) *Object

llgo:link (*UnicodeObject).RSplit C.PyUnicode_RSplit

func (*UnicodeObject) ReadChar added in v0.2.3

func (self *UnicodeObject) ReadChar(index SsizeT) UCS4

llgo:link (*UnicodeObject).ReadChar C.PyUnicode_ReadChar

func (*UnicodeObject) Replace added in v0.2.3

func (self *UnicodeObject) Replace(substr *Object, replstr *Object, maxcount SsizeT) *Object

llgo:link (*UnicodeObject).Replace C.PyUnicode_Replace

func (*UnicodeObject) RichCompare added in v0.2.3

func (self *UnicodeObject) RichCompare(right *Object, op c.Int) *Object

llgo:link (*UnicodeObject).RichCompare C.PyUnicode_RichCompare

func (*UnicodeObject) Split added in v0.2.3

func (self *UnicodeObject) Split(sep *Object, maxsplit SsizeT) *Object

llgo:link (*UnicodeObject).Split C.PyUnicode_Split

func (*UnicodeObject) Splitlines added in v0.2.3

func (self *UnicodeObject) Splitlines(keepends c.Int) *Object

llgo:link (*UnicodeObject).Splitlines C.PyUnicode_Splitlines

func (*UnicodeObject) Substring added in v0.2.3

func (self *UnicodeObject) Substring(start SsizeT, end SsizeT) *Object

llgo:link (*UnicodeObject).Substring C.PyUnicode_Substring

func (*UnicodeObject) Tailmatch added in v0.2.3

func (self *UnicodeObject) Tailmatch(substr *Object, start SsizeT, end SsizeT, direction c.Int) SsizeT

llgo:link (*UnicodeObject).Tailmatch C.PyUnicode_Tailmatch

func (*UnicodeObject) Translate added in v0.2.3

func (self *UnicodeObject) Translate(table *Object, errors *c.Char) *Object

llgo:link (*UnicodeObject).Translate C.PyUnicode_Translate

func (*UnicodeObject) Unicode_DATA added in v0.2.3

func (self *UnicodeObject) Unicode_DATA() unsafe.Pointer

llgo:link (*UnicodeObject).Unicode_DATA C.PyUnicode_DATA

func (*UnicodeObject) Unicode_KIND added in v0.2.3

func (self *UnicodeObject) Unicode_KIND() c.Int

llgo:link (*UnicodeObject).Unicode_KIND C.PyUnicode_KIND

func (*UnicodeObject) WriteChar added in v0.2.3

func (self *UnicodeObject) WriteChar(index SsizeT, character UCS4) c.Int

llgo:link (*UnicodeObject).WriteChar C.PyUnicode_WriteChar

type UnicodeWriter added in v0.2.0

type UnicodeWriter struct {
}

func UnicodeWriterCreate added in v0.2.0

func UnicodeWriterCreate(length SsizeT) *UnicodeWriter

func (*UnicodeWriter) DecodeUTF8Stateful added in v0.2.0

func (self *UnicodeWriter) DecodeUTF8Stateful(string *c.Char, length SsizeT, errors *c.Char, consumed *SsizeT) c.Int

bytes consumed

llgo:link (*UnicodeWriter).DecodeUTF8Stateful C.PyUnicodeWriter_DecodeUTF8Stateful

func (*UnicodeWriter) Discard added in v0.2.0

func (self *UnicodeWriter) Discard()

llgo:link (*UnicodeWriter).Discard C.PyUnicodeWriter_Discard

func (*UnicodeWriter) Finish added in v0.2.0

func (self *UnicodeWriter) Finish() *Object

llgo:link (*UnicodeWriter).Finish C.PyUnicodeWriter_Finish

func (*UnicodeWriter) Format added in v0.2.0

func (self *UnicodeWriter) Format(format *c.Char, __llgo_va_list ...any) c.Int

llgo:link (*UnicodeWriter).Format C.PyUnicodeWriter_Format

func (*UnicodeWriter) WriteASCII added in v0.2.0

func (self *UnicodeWriter) WriteASCII(str *c.Char, size SsizeT) c.Int

llgo:link (*UnicodeWriter).WriteASCII C.PyUnicodeWriter_WriteASCII

func (*UnicodeWriter) WriteChar added in v0.2.0

func (self *UnicodeWriter) WriteChar(ch UCS4) c.Int

llgo:link (*UnicodeWriter).WriteChar C.PyUnicodeWriter_WriteChar

func (*UnicodeWriter) WriteRepr added in v0.2.0

func (self *UnicodeWriter) WriteRepr(obj *Object) c.Int

llgo:link (*UnicodeWriter).WriteRepr C.PyUnicodeWriter_WriteRepr

func (*UnicodeWriter) WriteStr added in v0.2.0

func (self *UnicodeWriter) WriteStr(obj *Object) c.Int

llgo:link (*UnicodeWriter).WriteStr C.PyUnicodeWriter_WriteStr

func (*UnicodeWriter) WriteSubstring added in v0.2.0

func (self *UnicodeWriter) WriteSubstring(str *Object, start SsizeT, end SsizeT) c.Int

llgo:link (*UnicodeWriter).WriteSubstring C.PyUnicodeWriter_WriteSubstring

func (*UnicodeWriter) WriteUCS4 added in v0.2.0

func (self *UnicodeWriter) WriteUCS4(str *UCS4, size SsizeT) c.Int

llgo:link (*UnicodeWriter).WriteUCS4 C.PyUnicodeWriter_WriteUCS4

func (*UnicodeWriter) WriteUTF8 added in v0.2.0

func (self *UnicodeWriter) WriteUTF8(str *c.Char, size SsizeT) c.Int

llgo:link (*UnicodeWriter).WriteUTF8 C.PyUnicodeWriter_WriteUTF8

func (*UnicodeWriter) WriteWideChar added in v0.2.0

func (self *UnicodeWriter) WriteWideChar(str *c.WcharT, size SsizeT) c.Int

llgo:link (*UnicodeWriter).WriteWideChar C.PyUnicodeWriter_WriteWideChar

type VarObject added in v0.2.0

type VarObject struct {
	ObBase Object
	ObSize SsizeT
}

func X_ObjectNewVar added in v0.2.0

func X_ObjectNewVar(_llcppg_param1 *TypeObject, _llcppg_param2 SsizeT) *VarObject

func X_Object_GC_NewVar added in v0.2.0

func X_Object_GC_NewVar(_llcppg_param1 *TypeObject, _llcppg_param2 SsizeT) *VarObject

func X_Object_GC_Resize added in v0.2.0

func X_Object_GC_Resize(_llcppg_param1 *VarObject, _llcppg_param2 SsizeT) *VarObject

func (*VarObject) ObjectInit added in v0.2.3

func (self *VarObject) ObjectInit(_llcppg_param2 *TypeObject, _llcppg_param3 SsizeT) *VarObject

llgo:link (*VarObject).ObjectInit C.PyObject_InitVar

type Vectorcallfunc

type Vectorcallfunc = func(_llcppg_param1 *Object, _llcppg_param2 **Object, _llcppg_param3 c.SizeT, _llcppg_param4 *Object) *Object

llgo:type C

func VectorcallFunction added in v0.2.3

func VectorcallFunction(callable *Object) Vectorcallfunc

type Visitproc

type Visitproc = func(_llcppg_param1 *Object, _llcppg_param2 unsafe.Pointer) c.Int

llgo:type C

type WeakReference added in v0.2.0

type WeakReference = X_WeakReference

type WideStringList added in v0.2.0

type WideStringList struct {
	Length SsizeT
	Items  **c.WcharT
}

func (*WideStringList) Append added in v0.2.0

func (self *WideStringList) Append(item *c.WcharT) Status

llgo:link (*WideStringList).Append C.PyWideStringList_Append

func (*WideStringList) Insert added in v0.2.0

func (self *WideStringList) Insert(index SsizeT, item *c.WcharT) Status

llgo:link (*WideStringList).Insert C.PyWideStringList_Insert

type WrapperDescrObject added in v0.2.0

type WrapperDescrObject struct {
	DCommon  DescrObject
	DBase    *Wrapperbase
	DWrapped unsafe.Pointer
}

type Wrapperbase

type Wrapperbase struct {
	Name       *c.Char
	Offset     c.Int
	Function   unsafe.Pointer
	Wrapper    Wrapperfunc
	Doc        *c.Char
	Flags      c.Int
	NameStrobj *Object
}

type Wrapperfunc

type Wrapperfunc = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 unsafe.Pointer) *Object

llgo:type C

type WrapperfuncKwds

type WrapperfuncKwds = func(_llcppg_param1 *Object, _llcppg_param2 *Object, _llcppg_param3 unsafe.Pointer, _llcppg_param4 *Object) *Object

llgo:type C

type X_ArgParser added in v0.2.0

type X_ArgParser struct {
	Format         *c.Char
	Keywords       **c.Char
	Fname          *c.Char
	CustomMsg      *c.Char
	Once           X_OnceFlag
	IsKwtupleOwned c.Int
	Pos            c.Int
	Min            c.Int
	Max            c.Int
	Kwtuple        *Object
	Next           *X_ArgParser
}

type X_AsyncGenObject added in v0.2.0

type X_AsyncGenObject struct {
}

type X_CFunctionFast added in v0.2.0

type X_CFunctionFast = CFunctionFast

For backwards compatibility. `METH_FASTCALL` was added to the stable API in 3.10 alongside `_PyCFunctionFastWithKeywords` and `_PyCFunctionFast`. Note that the underscore-prefixed names were documented in public docs; people may be using them.

type X_CFunctionFastWithKeywords added in v0.2.0

type X_CFunctionFastWithKeywords = CFunctionFastWithKeywords

type X_CoCached added in v0.2.0

type X_CoCached struct {
	X_coCode     *Object
	X_coVarnames *Object
	X_coCellvars *Object
	X_coFreevars *Object
}

type X_CoMonitoringData added in v0.2.0

type X_CoMonitoringData struct {
}

type X_CodeLocationInfoKind added in v0.2.0

type X_CodeLocationInfoKind c.Uint
const (
	// short forms are 0 to 9
	CODE_LOCATION_INFO_SHORT0 X_CodeLocationInfoKind = 0
	// one lineforms are 10 to 12
	CODE_LOCATION_INFO_ONE_LINE0  X_CodeLocationInfoKind = 10
	CODE_LOCATION_INFO_ONE_LINE1  X_CodeLocationInfoKind = 11
	CODE_LOCATION_INFO_ONE_LINE2  X_CodeLocationInfoKind = 12
	CODE_LOCATION_INFO_NO_COLUMNS X_CodeLocationInfoKind = 13
	CODE_LOCATION_INFO_LONG       X_CodeLocationInfoKind = 14
	CODE_LOCATION_INFO_NONE       X_CodeLocationInfoKind = 15
)

type X_CoroObject added in v0.2.0

type X_CoroObject struct {
}

type X_ErrStackItem added in v0.2.0

type X_ErrStackItem = X_errStackitem

type X_ExecutorArray added in v0.2.0

type X_ExecutorArray struct {
	Size      c.Int
	Capacity  c.Int
	Executors [1]*X_ExecutorObject
}

type X_ExecutorObject added in v0.2.0

type X_ExecutorObject struct {
}

type X_FrameEvalFunction added in v0.2.0

type X_FrameEvalFunction = func(_llcppg_param1 *ThreadState, _llcppg_param2 *X_InterpreterFrame, _llcppg_param3 c.Int) *Object

llgo:type C

func X_InterpreterStateGetEvalFrameFunc added in v0.2.0

func X_InterpreterStateGetEvalFrameFunc(interp *InterpreterState) X_FrameEvalFunction

type X_GenObject added in v0.2.0

type X_GenObject struct {
}

type X_Identifier added in v0.2.0

type X_Identifier struct {
	String *c.Char
	Index  SsizeT
	Mutex  _llcppg_anon_2
}

This structure helps managing static strings. The basic usage goes like this: Instead of doing

r = PyObject_CallMethod(o, "foo", "args", ...);

do

_Py_IDENTIFIER(foo); ... r = _PyObject_CallMethodId(o, &PyId_foo, "args", ...);

PyId_foo is a static variable, either on block level or file level. On first usage, the string "foo" is interned, and the structures are linked. On interpreter shutdown, all strings are released.

Alternatively, _Py_static_string allows choosing the variable name. _PyUnicode_FromId returns a borrowed reference to the interned string. _PyObject_{Get,Set,Has}AttrId are __getattr__ versions using _Py_Identifier*.

type X_InterpreterFrame added in v0.2.0

type X_InterpreterFrame struct {
}

type X_LongValue added in v0.2.0

type X_LongValue struct {
	LvTag   c.UintptrT
	ObDigit [1]Digit
}

type X_ManagedBufferObject added in v0.2.0

type X_ManagedBufferObject struct {
	ObBase  Object
	Flags   c.Int
	Exports SsizeT
	Master  Buffer
}

type X_MonitoringState added in v0.2.0

type X_MonitoringState struct {
	Active c.Uint8T
	Opaque c.Uint8T
}

type X_OnceFlag added in v0.2.0

type X_OnceFlag struct {
	V c.Uint8T
}

A data structure that can be used to run initialization code once in a thread-safe manner. The C++11 equivalent is std::call_once.

type X_RemoteDebuggerSupport added in v0.2.0

type X_RemoteDebuggerSupport struct {
	DebuggerPendingCall c.Int32T
	DebuggerScriptPath  [512]c.Char
}

type X_StackChunk added in v0.2.0

type X_StackChunk = X_stackChunk

type X_UnicodeWriter added in v0.2.0

type X_UnicodeWriter struct {
	Buffer       *Object
	Data         unsafe.Pointer
	Kind         c.Int
	Maxchar      UCS4
	Size         SsizeT
	Pos          SsizeT
	MinLength    SsizeT
	MinChar      UCS4
	Overallocate uint8
	Readonly     uint8
}

type X_WeakReference added in v0.2.0

type X_WeakReference struct {
	ObBase     Object
	WrObject   *Object
	WrCallback *Object
	Hash       HashT
	WrPrev     *WeakReference
	WrNext     *WeakReference
	Vectorcall Vectorcallfunc
}

PyWeakReference is the base struct for the Python ReferenceType, ProxyType, and CallableProxyType.

type X_dictkeysobject

type X_dictkeysobject struct {
}

type X_dictvalues

type X_dictvalues struct {
}

type X_errStackitem

type X_errStackitem struct {
	ExcValue     *Object
	PreviousItem *X_errStackitem
}

type X_frame

type X_frame struct {
}

type X_frozen

type X_frozen struct {
	Name      *c.Char
	Code      *uint8
	Size      c.Int
	IsPackage c.Int
}
var ImportFrozenModules *X_frozen

type X_heaptypeobject

type X_heaptypeobject struct {
	HtType       TypeObject
	AsAsync      AsyncMethods
	AsNumber     NumberMethods
	AsMapping    MappingMethods
	AsSequence   SequenceMethods
	AsBuffer     BufferProcs
	HtName       *Object
	HtSlots      *Object
	HtQualname   *Object
	HtCachedKeys *X_dictkeysobject
	HtModule     *Object
	X_htTpname   *c.Char
	HtToken      unsafe.Pointer
	X_specCache  X_specializationCache
}

The *real* layout of a type object when allocated on the heap

type X_inittab

type X_inittab struct {
	Name     *c.Char
	Initfunc func() *Object
}

This is not used after Py_Initialize() is called.

llgo:type C

var ImportInittab *X_inittab

This is not used after Py_Initialize() is called.

func (*X_inittab) ImportExtendInittab added in v0.3.0

func (self *X_inittab) ImportExtendInittab() c.Int

llgo:link (*X_inittab).ImportExtendInittab C.PyImport_ExtendInittab

type X_is

type X_is struct {
}

type X_lineOffsets

type X_lineOffsets struct {
	ArStart c.Int
	ArEnd   c.Int
	ArLine  c.Int
	Opaque  X_opaque
}

type X_longobject

type X_longobject struct {
	ObBase    Object
	LongValue X_LongValue
}

type X_object

type X_object struct {
	ObType *TypeObject
	// contains filtered or unexported fields
}

func (*X_object) XGof_ref_ob_flags added in v0.3.3

func (p *X_object) XGof_ref_ob_flags() *c.Uint16T

func (*X_object) XGof_ref_ob_overflow added in v0.3.3

func (p *X_object) XGof_ref_ob_overflow() *c.Uint16T

func (*X_object) XGof_ref_ob_refcnt added in v0.3.3

func (p *X_object) XGof_ref_ob_refcnt() *c.Uint32T

func (*X_object) XGof_ref_ob_refcnt_full

func (p *X_object) XGof_ref_ob_refcnt_full() *c.Int64T

type X_odictobject

type X_odictobject struct {
}

type X_opaque

type X_opaque struct {
	ComputedLine c.Int
	LoNext       *c.Uint8T
	Limit        *c.Uint8T
}

for internal use only

type X_pycontextobject

type X_pycontextobject struct {
}

type X_pycontexttokenobject

type X_pycontexttokenobject struct {
}

type X_pycontextvarobject

type X_pycontextvarobject struct {
}

type X_specializationCache

type X_specializationCache struct {
	Getitem        *Object
	GetitemVersion c.Uint32T
	Init           *Object
}

This struct is used by the specializer It should be treated as an opaque blob by code other than the specializer and interpreter.

type X_stackChunk

type X_stackChunk struct {
	Previous *X_stackChunk
	Size     c.SizeT
	Top      c.SizeT
	Data     [1]*Object
}

type X_traceback

type X_traceback struct {
	ObBase   Object
	TbNext   *TracebackObject
	TbFrame  *FrameObject
	TbLasti  c.Int
	TbLineno c.Int
}

type X_ts

type X_ts struct {
	Prev                         *ThreadState
	Next                         *ThreadState
	Interp                       *InterpreterState
	EvalBreaker                  c.UintptrT
	X_status                     _llcppg_anon_6
	HoldsGil                     c.Int
	X_whence                     c.Int
	State                        c.Int
	PyRecursionRemaining         c.Int
	PyRecursionLimit             c.Int
	RecursionHeadroom            c.Int
	Tracing                      c.Int
	WhatEvent                    c.Int
	CurrentFrame                 *X_InterpreterFrame
	CProfilefunc                 Tracefunc
	CTracefunc                   Tracefunc
	CProfileobj                  *Object
	CTraceobj                    *Object
	CurrentException             *Object
	ExcInfo                      *X_ErrStackItem
	Dict                         *Object
	GilstateCounter              c.Int
	AsyncExc                     *Object
	ThreadId                     c.Ulong
	NativeThreadId               c.Ulong
	DeleteLater                  *Object
	CriticalSection              c.UintptrT
	CoroutineOriginTrackingDepth c.Int
	AsyncGenFirstiter            *Object
	AsyncGenFinalizer            *Object
	Context                      *Object
	ContextVer                   c.Uint64T
	Id                           c.Uint64T
	DatastackChunk               *X_StackChunk
	DatastackTop                 **Object
	DatastackLimit               **Object
	ExcState                     X_ErrStackItem
	CurrentExecutor              *Object
	DictGlobalVersion            c.Uint64T
	ThreadingLocalKey            *Object
	ThreadingLocalSentinel       *Object
	RemoteDebuggerSupport        X_RemoteDebuggerSupport
	DatastackCachedChunk         *X_StackChunk
}

type X_tssT added in v0.2.0

type X_tssT struct {
	X_isInitialized c.Int
	X_key           pthread.Key
}

When Py_LIMITED_API is not defined, the type layout of Py_tss_t is exposed to allow static allocation in the API clients. Even in this case, you must handle TSS keys through API functions due to compatibility.

type X_typeobject

type X_typeobject struct {
	ObBase             VarObject
	TpName             *c.Char
	TpBasicsize        SsizeT
	TpItemsize         SsizeT
	TpDealloc          Destructor
	TpVectorcallOffset SsizeT
	TpGetattr          Getattrfunc
	TpSetattr          Setattrfunc
	TpAsAsync          *AsyncMethods
	TpRepr             Reprfunc
	TpAsNumber         *NumberMethods
	TpAsSequence       *SequenceMethods
	TpAsMapping        *MappingMethods
	TpHash             Hashfunc
	TpCall             Ternaryfunc
	TpStr              Reprfunc
	TpGetattro         Getattrofunc
	TpSetattro         Setattrofunc
	TpAsBuffer         *BufferProcs
	TpFlags            c.Ulong
	TpDoc              *c.Char
	TpTraverse         Traverseproc
	TpClear            Inquiry
	TpRichcompare      Richcmpfunc
	TpWeaklistoffset   SsizeT
	TpIter             Getiterfunc
	TpIternext         Iternextfunc
	TpMethods          *MethodDef
	TpMembers          *MemberDef
	TpGetset           *GetSetDef
	TpBase             *TypeObject
	TpDict             *Object
	TpDescrGet         Descrgetfunc
	TpDescrSet         Descrsetfunc
	TpDictoffset       SsizeT
	TpInit             Initproc
	TpAlloc            Allocfunc
	TpNew              Newfunc
	TpFree             Freefunc
	TpIsGc             Inquiry
	TpBases            *Object
	TpMro              *Object
	TpCache            *Object
	TpSubclasses       unsafe.Pointer
	TpWeaklist         *Object
	TpDel              Destructor
	TpVersionTag       c.Uint
	TpFinalize         Destructor
	TpVectorcall       Vectorcallfunc
	TpWatched          uint8
	TpVersionsUsed     c.Uint16T
}

If this structure is modified, Doc/includes/typestruct.h should be updated as well.

Jump to

Keyboard shortcuts

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