py

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 3 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 (
	X_PyStatus_TYPE_OK    _llcppg_anon_4 = 0
	X_PyStatus_TYPE_ERROR _llcppg_anon_4 = 1
	X_PyStatus_TYPE_EXIT  _llcppg_anon_4 = 2
)
View Source
const ALIGNOF_LONG = 8
View Source
const ALIGNOF_MAX_ALIGN_T = 8
View Source
const ALIGNOF_SIZE_T = 8
View Source
const CO_ASYNC_GENERATOR = 512
View Source
const CO_COROUTINE = 128
View Source
const CO_FUTURE_ABSOLUTE_IMPORT = 262144
View Source
const CO_FUTURE_ANNOTATIONS = 16777216
View Source
const CO_FUTURE_BARRY_AS_BDFL = 4194304
View Source
const CO_FUTURE_DIVISION = 131072
View Source
const CO_FUTURE_GENERATOR_STOP = 8388608
View Source
const CO_FUTURE_PRINT_FUNCTION = 1048576
View Source
const CO_FUTURE_UNICODE_LITERALS = 2097152
View Source
const CO_FUTURE_WITH_STATEMENT = 524288
View Source
const CO_GENERATOR = 32
View Source
const CO_HAS_DOCSTRING = 67108864
View Source
const CO_ITERABLE_COROUTINE = 256
View Source
const CO_MAXBLOCKS = 21
View Source
const CO_METHOD = 134217728
View Source
const CO_NESTED = 16
View Source
const CO_NEWLOCALS = 2
View Source
const CO_NO_MONITORING_EVENTS = 33554432
View Source
const CO_OPTIMIZED = 1
View Source
const CO_VARARGS = 4
View Source
const CO_VARKEYWORDS = 8
View Source
const DOUBLE_IS_LITTLE_ENDIAN_IEEE754 = 1
View Source
const ENABLE_IPV6 = 1
View Source
const FUTURE_ABSOLUTE_IMPORT = "absolute_import"
View Source
const FUTURE_ANNOTATIONS = "annotations"
View Source
const FUTURE_BARRY_AS_BDFL = "barry_as_FLUFL"
View Source
const FUTURE_DIVISION = "division"
View Source
const FUTURE_GENERATORS = "generators"
View Source
const FUTURE_GENERATOR_STOP = "generator_stop"
View Source
const FUTURE_NESTED_SCOPES = "nested_scopes"
View Source
const FUTURE_PRINT_FUNCTION = "print_function"
View Source
const FUTURE_UNICODE_LITERALS = "unicode_literals"
View Source
const FUTURE_WITH_STATEMENT = "with_statement"
View Source
const FVC_ASCII = 3
View Source
const FVC_MASK = 3
View Source
const FVC_NONE = 0
View Source
const FVC_REPR = 2
View Source
const FVC_STR = 1
View Source
const FVS_HAVE_SPEC = 4
View Source
const FVS_MASK = 4
View Source
const HAVE_ACCEPT = 1
View Source
const HAVE_ACOSH = 1
View Source
const HAVE_ADDRINFO = 1
View Source
const HAVE_ALARM = 1
View Source
const HAVE_ALLOCA_H = 1
View Source
const HAVE_ASINH = 1
View Source
const HAVE_ATANH = 1
View Source
const HAVE_BACKTRACE = 1
View Source
const HAVE_BIND = 1
View Source
const HAVE_BROKEN_SEM_GETVALUE = 1
View Source
const HAVE_BUILTIN_ATOMIC = 1
View Source
const HAVE_CHFLAGS = 1
View Source
const HAVE_CHMOD = 1
View Source
const HAVE_CHOWN = 1
View Source
const HAVE_CHROOT = 1
View Source
const HAVE_CLOCK = 1
View Source
const HAVE_CLOCK_GETRES = 1
View Source
const HAVE_CLOCK_GETTIME = 1
View Source
const HAVE_CLOCK_SETTIME = 1
View Source
const HAVE_CLOCK_T = 1
View Source
const HAVE_COMPUTED_GOTOS = 1
View Source
const HAVE_CONFSTR = 1
View Source
const HAVE_CONNECT = 1
View Source
const HAVE_CTERMID = 1
View Source
const HAVE_CTERMID_R = 1
View Source
const HAVE_CURSES_ESCDELAY = 1
View Source
const HAVE_CURSES_FILTER = 1
View Source
const HAVE_CURSES_GETMOUSE = 1
View Source
const HAVE_CURSES_H = 1
View Source
const HAVE_CURSES_HAS_KEY = 1
View Source
const HAVE_CURSES_IMMEDOK = 1
View Source
const HAVE_CURSES_IS_PAD = 1
View Source
const HAVE_CURSES_IS_TERM_RESIZED = 1
View Source
const HAVE_CURSES_RESIZETERM = 1
View Source
const HAVE_CURSES_RESIZE_TERM = 1
View Source
const HAVE_CURSES_SET_ESCDELAY = 1
View Source
const HAVE_CURSES_SET_TABSIZE = 1
View Source
const HAVE_CURSES_SYNCOK = 1
View Source
const HAVE_CURSES_TABSIZE = 1
View Source
const HAVE_CURSES_TYPEAHEAD = 1
View Source
const HAVE_CURSES_USE_ENV = 1
View Source
const HAVE_CURSES_WCHGAT = 1
View Source
const HAVE_DB_H = 1
View Source
const HAVE_DECL_RTLD_DEEPBIND = 0
View Source
const HAVE_DECL_RTLD_GLOBAL = 1
View Source
const HAVE_DECL_RTLD_LAZY = 1
View Source
const HAVE_DECL_RTLD_LOCAL = 1
View Source
const HAVE_DECL_RTLD_MEMBER = 0
View Source
const HAVE_DECL_RTLD_NODELETE = 1
View Source
const HAVE_DECL_RTLD_NOLOAD = 1
View Source
const HAVE_DECL_RTLD_NOW = 1
View Source
const HAVE_DECL_UT_NAMESIZE = 1
View Source
const HAVE_DEVICE_MACROS = 1
View Source
const HAVE_DEV_PTMX = 1
View Source
const HAVE_DIRENT_D_TYPE = 1
View Source
const HAVE_DIRENT_H = 1
View Source
const HAVE_DIRFD = 1
View Source
const HAVE_DLADDR = 1
View Source
const HAVE_DLFCN_H = 1
View Source
const HAVE_DLOPEN = 1
View Source
const HAVE_DUP = 1
View Source
const HAVE_DUP2 = 1
View Source
const HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH = 1
View Source
const HAVE_DYNAMIC_LOADING = 1
View Source
const HAVE_ERF = 1
View Source
const HAVE_ERFC = 1
View Source
const HAVE_ERRNO_H = 1
View Source
const HAVE_EXECINFO_H = 1
View Source
const HAVE_EXECV = 1
View Source
const HAVE_EXPM1 = 1
View Source
const HAVE_FACCESSAT = 1
View Source
const HAVE_FCHDIR = 1
View Source
const HAVE_FCHMOD = 1
View Source
const HAVE_FCHMODAT = 1
View Source
const HAVE_FCHOWN = 1
View Source
const HAVE_FCHOWNAT = 1
View Source
const HAVE_FCNTL_H = 1
View Source
const HAVE_FDOPENDIR = 1
View Source
const HAVE_FFI_CLOSURE_ALLOC = 1
View Source
const HAVE_FFI_PREP_CIF_VAR = 1
View Source
const HAVE_FFI_PREP_CLOSURE_LOC = 1
View Source
const HAVE_FLOCK = 1
View Source
const HAVE_FORK = 1
View Source
const HAVE_FORKPTY = 1
View Source
const HAVE_FPATHCONF = 1
View Source
const HAVE_FSEEKO = 1
View Source
const HAVE_FSTATAT = 1
View Source
const HAVE_FSTATVFS = 1
View Source
const HAVE_FSYNC = 1
View Source
const HAVE_FTELLO = 1
View Source
const HAVE_FTIME = 1
View Source
const HAVE_FTRUNCATE = 1
View Source
const HAVE_FUTIMENS = 1
View Source
const HAVE_FUTIMES = 1
View Source
const HAVE_GAI_STRERROR = 1
View Source
const HAVE_GCC_UINT128_T = 1
View Source
const HAVE_GETADDRINFO = 1
View Source
const HAVE_GETC_UNLOCKED = 1
View Source
const HAVE_GETEGID = 1
View Source
const HAVE_GETENTROPY = 1
View Source
const HAVE_GETEUID = 1
View Source
const HAVE_GETGID = 1
View Source
const HAVE_GETGRENT = 1
View Source
const HAVE_GETGRGID = 1
View Source
const HAVE_GETGRGID_R = 1
View Source
const HAVE_GETGRNAM_R = 1
View Source
const HAVE_GETGROUPLIST = 1
View Source
const HAVE_GETGROUPS = 1
View Source
const HAVE_GETHOSTBYADDR = 1
View Source
const HAVE_GETHOSTBYNAME = 1
View Source
const HAVE_GETHOSTNAME = 1
View Source
const HAVE_GETITIMER = 1
View Source
const HAVE_GETLOADAVG = 1
View Source
const HAVE_GETLOGIN = 1
View Source
const HAVE_GETLOGIN_R = 1
View Source
const HAVE_GETNAMEINFO = 1
View Source
const HAVE_GETPAGESIZE = 1
View Source
const HAVE_GETPEERNAME = 1
View Source
const HAVE_GETPGID = 1
View Source
const HAVE_GETPGRP = 1
View Source
const HAVE_GETPID = 1
View Source
const HAVE_GETPPID = 1
View Source
const HAVE_GETPRIORITY = 1
View Source
const HAVE_GETPROTOBYNAME = 1
View Source
const HAVE_GETPWENT = 1
View Source
const HAVE_GETPWNAM_R = 1
View Source
const HAVE_GETPWUID = 1
View Source
const HAVE_GETPWUID_R = 1
View Source
const HAVE_GETRUSAGE = 1
View Source
const HAVE_GETSERVBYNAME = 1
View Source
const HAVE_GETSERVBYPORT = 1
View Source
const HAVE_GETSID = 1
View Source
const HAVE_GETSOCKNAME = 1
View Source
const HAVE_GETUID = 1
View Source
const HAVE_GETWD = 1
View Source
const HAVE_GRANTPT = 1
View Source
const HAVE_GRP_H = 1
View Source
const HAVE_HSTRERROR = 1
View Source
const HAVE_IF_NAMEINDEX = 1
View Source
const HAVE_INET_ATON = 1
View Source
const HAVE_INET_NTOA = 1
View Source
const HAVE_INET_PTON = 1
View Source
const HAVE_INITGROUPS = 1
View Source
const HAVE_INTTYPES_H = 1
View Source
const HAVE_KILL = 1
View Source
const HAVE_KILLPG = 1
View Source
const HAVE_KQUEUE = 1
View Source
const HAVE_LANGINFO_H = 1
View Source
const HAVE_LCHFLAGS = 1
View Source
const HAVE_LCHMOD = 1
View Source
const HAVE_LCHOWN = 1
View Source
const HAVE_LIBDL = 1
View Source
const HAVE_LIBSQLITE3 = 1
View Source
const HAVE_LINK = 1
View Source
const HAVE_LINKAT = 1
View Source
const HAVE_LISTEN = 1
View Source
const HAVE_LOCKF = 1
View Source
const HAVE_LOG1P = 1
View Source
const HAVE_LOG2 = 1
View Source
const HAVE_LOGIN_TTY = 1
View Source
const HAVE_LONG_DOUBLE = 1
View Source
const HAVE_LONG_LONG = 1
View Source
const HAVE_LSTAT = 1
View Source
const HAVE_LUTIMES = 1
View Source
const HAVE_MADVISE = 1
View Source
const HAVE_MAKEDEV = 1
View Source
const HAVE_MAXLOGNAME = 1
View Source
const HAVE_MBRTOWC = 1
View Source
const HAVE_MKDIRAT = 1
View Source
const HAVE_MKFIFO = 1
View Source
const HAVE_MKFIFOAT = 1
View Source
const HAVE_MKNOD = 1
View Source
const HAVE_MKNODAT = 1
View Source
const HAVE_MKTIME = 1
View Source
const HAVE_MMAP = 1
View Source
const HAVE_NANOSLEEP = 1
View Source
const HAVE_NCURSESW = 1
View Source
const HAVE_NCURSES_H = 1
View Source
const HAVE_NDBM_H = 1
View Source
const HAVE_NETDB_H = 1
View Source
const HAVE_NETINET_IN_H = 1
View Source
const HAVE_NET_ETHERNET_H = 1
View Source
const HAVE_NET_IF_H = 1
View Source
const HAVE_NICE = 1
View Source
const HAVE_OPENAT = 1
View Source
const HAVE_OPENDIR = 1
View Source
const HAVE_OPENPTY = 1
View Source
const HAVE_PANEL_H = 1
View Source
const HAVE_PATHCONF = 1
View Source
const HAVE_PAUSE = 1
View Source
const HAVE_PIPE = 1
View Source
const HAVE_POLL = 1
View Source
const HAVE_POLL_H = 1
View Source
const HAVE_POSIX_OPENPT = 1
View Source
const HAVE_POSIX_SPAWN = 1
View Source
const HAVE_POSIX_SPAWNP = 1
View Source
const HAVE_PREAD = 1
View Source
const HAVE_PREADV = 1
View Source
const HAVE_PROTOTYPES = 1
View Source
const HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP = 1
View Source
const HAVE_PTHREAD_GETNAME_NP = 1
View Source
const HAVE_PTHREAD_H = 1
View Source
const HAVE_PTHREAD_KILL = 1
View Source
const HAVE_PTHREAD_SETNAME_NP = 1
View Source
const HAVE_PTHREAD_SIGMASK = 1
View Source
const HAVE_PTSNAME = 1
View Source
const HAVE_PTSNAME_R = 1
View Source
const HAVE_PWRITE = 1
View Source
const HAVE_PWRITEV = 1
View Source
const HAVE_READLINK = 1
View Source
const HAVE_READLINKAT = 1
View Source
const HAVE_READV = 1
View Source
const HAVE_REALPATH = 1
View Source
const HAVE_RECVFROM = 1
View Source
const HAVE_RENAMEAT = 1
View Source
const HAVE_RL_COMPLETION_APPEND_CHARACTER = 1
View Source
const HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK = 1
View Source
const HAVE_RL_COMPLETION_MATCHES = 1
View Source
const HAVE_RL_PRE_INPUT_HOOK = 1
View Source
const HAVE_SCHED_GET_PRIORITY_MAX = 1
View Source
const HAVE_SCHED_H = 1
View Source
const HAVE_SEM_GETVALUE = 1
View Source
const HAVE_SEM_OPEN = 1
View Source
const HAVE_SEM_UNLINK = 1
View Source
const HAVE_SENDFILE = 1
View Source
const HAVE_SENDTO = 1
View Source
const HAVE_SETEGID = 1
View Source
const HAVE_SETEUID = 1
View Source
const HAVE_SETGID = 1
View Source
const HAVE_SETGROUPS = 1
View Source
const HAVE_SETHOSTNAME = 1
View Source
const HAVE_SETITIMER = 1
View Source
const HAVE_SETJMP_H = 1
View Source
const HAVE_SETLOCALE = 1
View Source
const HAVE_SETPGID = 1
View Source
const HAVE_SETPGRP = 1
View Source
const HAVE_SETPRIORITY = 1
View Source
const HAVE_SETREGID = 1
View Source
const HAVE_SETREUID = 1
View Source
const HAVE_SETSID = 1
View Source
const HAVE_SETSOCKOPT = 1
View Source
const HAVE_SETUID = 1
View Source
const HAVE_SETVBUF = 1
View Source
const HAVE_SHM_OPEN = 1
View Source
const HAVE_SHM_UNLINK = 1
View Source
const HAVE_SHUTDOWN = 1
View Source
const HAVE_SIGACTION = 1
View Source
const HAVE_SIGALTSTACK = 1
View Source
const HAVE_SIGFILLSET = 1
View Source
const HAVE_SIGINFO_T_SI_BAND = 1
View Source
const HAVE_SIGINTERRUPT = 1
View Source
const HAVE_SIGNAL_H = 1
View Source
const HAVE_SIGPENDING = 1
View Source
const HAVE_SIGRELSE = 1
View Source
const HAVE_SIGWAIT = 1
View Source
const HAVE_SNPRINTF = 1
View Source
const HAVE_SOCKADDR_SA_LEN = 1
View Source
const HAVE_SOCKADDR_STORAGE = 1
View Source
const HAVE_SOCKET = 1
View Source
const HAVE_SOCKETPAIR = 1
View Source
const HAVE_SOCKLEN_T = 1
View Source
const HAVE_SPAWN_H = 1
View Source
const HAVE_SSIZE_T = 1
View Source
const HAVE_STATVFS = 1
View Source
const HAVE_STAT_TV_NSEC2 = 1
View Source
const HAVE_STDINT_H = 1
View Source
const HAVE_STDIO_H = 1
View Source
const HAVE_STDLIB_H = 1
View Source
const HAVE_STD_ATOMIC = 1
View Source
const HAVE_STRFTIME = 1
View Source
const HAVE_STRINGS_H = 1
View Source
const HAVE_STRING_H = 1
View Source
const HAVE_STRLCPY = 1
View Source
const HAVE_STRSIGNAL = 1
View Source
const HAVE_STRUCT_PASSWD_PW_GECOS = 1
View Source
const HAVE_STRUCT_PASSWD_PW_PASSWD = 1
View Source
const HAVE_STRUCT_STAT_ST_BIRTHTIME = 1
View Source
const HAVE_STRUCT_STAT_ST_BLKSIZE = 1
View Source
const HAVE_STRUCT_STAT_ST_BLOCKS = 1
View Source
const HAVE_STRUCT_STAT_ST_FLAGS = 1
View Source
const HAVE_STRUCT_STAT_ST_GEN = 1
View Source
const HAVE_STRUCT_STAT_ST_RDEV = 1
View Source
const HAVE_STRUCT_TM_TM_ZONE = 1
View Source
const HAVE_SYMLINK = 1
View Source
const HAVE_SYMLINKAT = 1
View Source
const HAVE_SYNC = 1
View Source
const HAVE_SYSCONF = 1
View Source
const HAVE_SYSCTLBYNAME = 1
View Source
const HAVE_SYSEXITS_H = 1
View Source
const HAVE_SYSLOG_H = 1
View Source
const HAVE_SYSTEM = 1
View Source
const HAVE_SYS_EVENT_H = 1
View Source
const HAVE_SYS_FILE_H = 1
View Source
const HAVE_SYS_IOCTL_H = 1
View Source
const HAVE_SYS_KERN_CONTROL_H = 1
View Source
const HAVE_SYS_LOCK_H = 1
View Source
const HAVE_SYS_MMAN_H = 1
View Source
const HAVE_SYS_PARAM_H = 1
View Source
const HAVE_SYS_POLL_H = 1
View Source
const HAVE_SYS_RANDOM_H = 1
View Source
const HAVE_SYS_RESOURCE_H = 1
View Source
const HAVE_SYS_SELECT_H = 1
View Source
const HAVE_SYS_SOCKET_H = 1
View Source
const HAVE_SYS_STATVFS_H = 1
View Source
const HAVE_SYS_STAT_H = 1
View Source
const HAVE_SYS_SYSCALL_H = 1
View Source
const HAVE_SYS_SYSCTL_H = 1
View Source
const HAVE_SYS_SYS_DOMAIN_H = 1
View Source
const HAVE_SYS_TIMES_H = 1
View Source
const HAVE_SYS_TIME_H = 1
View Source
const HAVE_SYS_TYPES_H = 1
View Source
const HAVE_SYS_UIO_H = 1
View Source
const HAVE_SYS_UN_H = 1
View Source
const HAVE_SYS_UTSNAME_H = 1
View Source
const HAVE_SYS_WAIT_H = 1
View Source
const HAVE_SYS_XATTR_H = 1
View Source
const HAVE_TCGETPGRP = 1
View Source
const HAVE_TCSETPGRP = 1
View Source
const HAVE_TEMPNAM = 1
View Source
const HAVE_TERMIOS_H = 1
View Source
const HAVE_TERM_H = 1
View Source
const HAVE_TIMEGM = 1
View Source
const HAVE_TIMES = 1
View Source
const HAVE_TMPFILE = 1
View Source
const HAVE_TMPNAM = 1
View Source
const HAVE_TM_ZONE = 1
View Source
const HAVE_TRUNCATE = 1
View Source
const HAVE_TTYNAME_R = 1
View Source
const HAVE_UMASK = 1
View Source
const HAVE_UNAME = 1
View Source
const HAVE_UNISTD_H = 1
View Source
const HAVE_UNLINKAT = 1
View Source
const HAVE_UNLOCKPT = 1
View Source
const HAVE_UTIL_H = 1
View Source
const HAVE_UTIMENSAT = 1
View Source
const HAVE_UTIMES = 1
View Source
const HAVE_UTIME_H = 1
View Source
const HAVE_UTMP_H = 1
View Source
const HAVE_UT_NAMESIZE = 1
View Source
const HAVE_UUID_UUID_H = 1
View Source
const HAVE_VFORK = 1
View Source
const HAVE_WAIT = 1
View Source
const HAVE_WAIT3 = 1
View Source
const HAVE_WAIT4 = 1
View Source
const HAVE_WAITID = 1
View Source
const HAVE_WAITPID = 1
View Source
const HAVE_WCHAR_H = 1
View Source
const HAVE_WCSCOLL = 1
View Source
const HAVE_WCSFTIME = 1
View Source
const HAVE_WCSXFRM = 1
View Source
const HAVE_WMEMCMP = 1
View Source
const HAVE_WORKING_TZSET = 1
View Source
const HAVE_WRITEV = 1
View Source
const HAVE_ZLIB_COPY = 1
View Source
const HAVE___UINT128_T = 1
View Source
const LLGoPackage = "link: $LLGO_LIB_PYTHON; $(pkg-config --libs python3-embed)"
View Source
const MAX_CO_EXTRA_USERS = 255
View Source
const METH_CLASS = 16
View Source
const METH_COEXIST = 64
View Source
const METH_FASTCALL = 128
View Source
const METH_KEYWORDS = 2
View Source
const METH_METHOD = 512
View Source
const METH_NOARGS = 4
View Source
const METH_O = 8
View Source
const METH_STACKLESS = 0
View Source
const METH_STATIC = 32
View Source
const METH_VARARGS = 1
View Source
const MVWDELCH_IS_EXPRESSION = 1
View Source
const NOWAIT_LOCK = 0
View Source
const PTHREAD_SYSTEM_SCHED_SUPPORTED = 1
View Source
const PYLONG_BITS_IN_DIGIT = 30
View Source
const PYTHON_ABI_STRING = "3"
View Source
const PYTHON_ABI_VERSION = 3
View Source
const PYTHON_API_STRING = "1013"
View Source
const PYTHON_API_VERSION = 1013
View Source
const PY_BIG_ENDIAN = 0
View Source
const PY_BUILTIN_HASHLIB_HASHES = "md5,sha1,sha2,sha3,blake2"
View Source
const PY_COERCE_C_LOCALE = 1
View Source
const PY_CTF_ALNUM = 7
View Source
const PY_CTF_ALPHA = 3
View Source
const PY_CTF_DIGIT = 4
View Source
const PY_CTF_LOWER = 1
View Source
const PY_CTF_SPACE = 8
View Source
const PY_CTF_UPPER = 2
View Source
const PY_CTF_XDIGIT = 16
View Source
const PY_FORMAT_SIZE_T = "z"
View Source
const PY_LITTLE_ENDIAN = 1
View Source
const PY_MAJOR_VERSION = 3
View Source
const PY_MICRO_VERSION = 8
View Source
const PY_MINOR_VERSION = 14
View Source
const PY_MONITORING_EVENT_BRANCH = 18
View Source
const PY_MONITORING_EVENT_BRANCH_LEFT = 8
View Source
const PY_MONITORING_EVENT_BRANCH_RIGHT = 9
View Source
const PY_MONITORING_EVENT_CALL = 4
View Source
const PY_MONITORING_EVENT_C_RAISE = 17
View Source
const PY_MONITORING_EVENT_C_RETURN = 16
View Source
const PY_MONITORING_EVENT_EXCEPTION_HANDLED = 12
View Source
const PY_MONITORING_EVENT_INSTRUCTION = 6
View Source
const PY_MONITORING_EVENT_JUMP = 7
View Source
const PY_MONITORING_EVENT_LINE = 5
View Source
const PY_MONITORING_EVENT_PY_RESUME = 1
View Source
const PY_MONITORING_EVENT_PY_RETURN = 2
View Source
const PY_MONITORING_EVENT_PY_START = 0
View Source
const PY_MONITORING_EVENT_PY_THROW = 14
View Source
const PY_MONITORING_EVENT_PY_UNWIND = 13
View Source
const PY_MONITORING_EVENT_PY_YIELD = 3
View Source
const PY_MONITORING_EVENT_RAISE = 11
View Source
const PY_MONITORING_EVENT_RERAISE = 15
View Source
const PY_MONITORING_EVENT_STOP_ITERATION = 10
View Source
const PY_RELEASE_LEVEL = 15
View Source
const PY_RELEASE_LEVEL_ALPHA = 10
View Source
const PY_RELEASE_LEVEL_BETA = 11
View Source
const PY_RELEASE_LEVEL_FINAL = 15
View Source
const PY_RELEASE_LEVEL_GAMMA = 12
View Source
const PY_RELEASE_SERIAL = 0
View Source
const PY_SQLITE_ENABLE_LOAD_EXTENSION = 1
View Source
const PY_SQLITE_HAVE_SERIALIZE = 1
View Source
const PY_SSL_DEFAULT_CIPHERS = 1
View Source
const PY_STDIOTEXTMODE = "b"
View Source
const PY_SUPPORT_TIER = 1
View Source
const PY_VERSION = "3.14.8"
View Source
const PyAmAiter = 78
View Source
const PyAmAnext = 79
View Source
const PyAmAwait = 77
View Source
const PyAmSend = 81
View Source
const PyBUF_ANY_CONTIGUOUS = 152
View Source
const PyBUF_CONTIG = 9
View Source
const PyBUF_CONTIG_RO = 8
View Source
const PyBUF_C_CONTIGUOUS = 56
View Source
const PyBUF_FORMAT = 4
View Source
const PyBUF_FULL = 285
View Source
const PyBUF_FULL_RO = 284
View Source
const PyBUF_F_CONTIGUOUS = 88
View Source
const PyBUF_INDIRECT = 280
View Source
const PyBUF_MAX_NDIM = 64
View Source
const PyBUF_ND = 8
View Source
const PyBUF_READ = 256
View Source
const PyBUF_RECORDS = 29
View Source
const PyBUF_RECORDS_RO = 28
View Source
const PyBUF_SIMPLE = 0
View Source
const PyBUF_STRIDED = 25
View Source
const PyBUF_STRIDED_RO = 24
View Source
const PyBUF_STRIDES = 24
View Source
const PyBUF_WRITABLE = 1
View Source
const PyBUF_WRITE = 512
View Source
const PyBUF_WRITEABLE = 1
View Source
const PyBfGetbuffer = 1
View Source
const PyBfReleasebuffer = 2
View Source
const PyCF_ALLOW_INCOMPLETE_INPUT = 16384
View Source
const PyCF_ALLOW_TOP_LEVEL_AWAIT = 8192
View Source
const PyCF_COMPILE_MASK = 62976
View Source
const PyCF_DONT_IMPLY_DEDENT = 512
View Source
const PyCF_IGNORE_COOKIE = 2048
View Source
const PyCF_MASK = 33423360
View Source
const PyCF_MASK_OBSOLETE = 16
View Source
const PyCF_ONLY_AST = 1024
View Source
const PyCF_OPTIMIZED_AST = 33792
View Source
const PyCF_SOURCE_IS_UTF8 = 256
View Source
const PyCF_TYPE_COMMENTS = 4096
View Source
const PyEvalInput = 258
View Source
const PyFileInput = 257
View Source
const PyFuncTypeInput = 345
View Source
const PyHASH_BITS = 61
View Source
const PyHASH_INF = 314159
View Source
const PyInterpreterConfig_DEFAULT_GIL = 0
View Source
const PyInterpreterConfig_OWN_GIL = 2
View Source
const PyInterpreterConfig_SHARED_GIL = 1
View Source
const PyLong_SHIFT = 30
View Source
const PyModCreate = 1
View Source
const PyModExec = 2
View Source
const PyModGil = 4
View Source
const PyModMultipleInterpreters = 3
View Source
const PyMpAssSubscript = 3
View Source
const PyMpLength = 4
View Source
const PyMpSubscript = 5
View Source
const PyNbAbsolute = 6
View Source
const PyNbAdd = 7
View Source
const PyNbAnd = 8
View Source
const PyNbBool = 9
View Source
const PyNbDivmod = 10
View Source
const PyNbFloat = 11
View Source
const PyNbFloorDivide = 12
View Source
const PyNbIndex = 13
View Source
const PyNbInplaceAdd = 14
View Source
const PyNbInplaceAnd = 15
View Source
const PyNbInplaceFloorDivide = 16
View Source
const PyNbInplaceLshift = 17
View Source
const PyNbInplaceMatrixMultiply = 76
View Source
const PyNbInplaceMultiply = 18
View Source
const PyNbInplaceOr = 19
View Source
const PyNbInplacePower = 20
View Source
const PyNbInplaceRemainder = 21
View Source
const PyNbInplaceRshift = 22
View Source
const PyNbInplaceSubtract = 23
View Source
const PyNbInplaceTrueDivide = 24
View Source
const PyNbInplaceXor = 25
View Source
const PyNbInt = 26
View Source
const PyNbInvert = 27
View Source
const PyNbLshift = 28
View Source
const PyNbMatrixMultiply = 75
View Source
const PyNbMultiply = 29
View Source
const PyNbNegative = 30
View Source
const PyNbOr = 31
View Source
const PyNbPositive = 32
View Source
const PyNbPower = 33
View Source
const PyNbRemainder = 34
View Source
const PyNbRshift = 35
View Source
const PyNbSubtract = 36
View Source
const PyNbTrueDivide = 37
View Source
const PyNbXor = 38
View Source
const PySet_MINSIZE = 8
View Source
const PySingleInput = 256
View Source
const PySqAssItem = 39
View Source
const PySqConcat = 40
View Source
const PySqContains = 41
View Source
const PySqInplaceConcat = 42
View Source
const PySqInplaceRepeat = 43
View Source
const PySqItem = 44
View Source
const PySqLength = 45
View Source
const PySqRepeat = 46
View Source
const PyTpAlloc = 47
View Source
const PyTpBase = 48
View Source
const PyTpBases = 49
View Source
const PyTpCall = 50
View Source
const PyTpClear = 51
View Source
const PyTpDealloc = 52
View Source
const PyTpDel = 53
View Source
const PyTpDescrGet = 54
View Source
const PyTpDescrSet = 55
View Source
const PyTpDoc = 56
View Source
const PyTpFinalize = 80
View Source
const PyTpFree = 74
View Source
const PyTpGetattr = 57
View Source
const PyTpGetattro = 58
View Source
const PyTpGetset = 73
View Source
const PyTpHash = 59
View Source
const PyTpInit = 60
View Source
const PyTpIsGc = 61
View Source
const PyTpIter = 62
View Source
const PyTpIternext = 63
View Source
const PyTpMembers = 72
View Source
const PyTpMethods = 64
View Source
const PyTpNew = 65
View Source
const PyTpRepr = 66
View Source
const PyTpRichcompare = 67
View Source
const PyTpSetattr = 68
View Source
const PyTpSetattro = 69
View Source
const PyTpStr = 70
View Source
const PyTpToken = 83
View Source
const PyTpTraverse = 71
View Source
const PyTpVectorcall = 82
View Source
const PyTrace_CALL = 0
View Source
const PyTrace_C_CALL = 4
View Source
const PyTrace_C_EXCEPTION = 5
View Source
const PyTrace_C_RETURN = 6
View Source
const PyTrace_EXCEPTION = 1
View Source
const PyTrace_LINE = 2
View Source
const PyTrace_OPCODE = 7
View Source
const PyTrace_RETURN = 3
View Source
const PyUnstable_EXECUTABLE_KINDS = 5
View Source
const PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION = 3
View Source
const PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR = 4
View Source
const PyUnstable_EXECUTABLE_KIND_PY_FUNCTION = 1
View Source
const PyUnstable_EXECUTABLE_KIND_SKIP = 0
View Source
const PyWrapperFlag_KEYWORDS = 1
View Source
const Py_ASNATIVEBYTES_ALLOW_INDEX = 16
View Source
const Py_ASNATIVEBYTES_BIG_ENDIAN = 0
View Source
const Py_ASNATIVEBYTES_DEFAULTS = -1
View Source
const Py_ASNATIVEBYTES_LITTLE_ENDIAN = 1
View Source
const Py_ASNATIVEBYTES_NATIVE_ENDIAN = 3
View Source
const Py_ASNATIVEBYTES_REJECT_NEGATIVE = 8
View Source
const Py_ASNATIVEBYTES_UNSIGNED_BUFFER = 4
View Source
const Py_AUDIT_READ = 2
View Source
const Py_CAN_START_THREADS = 1
View Source
const Py_CLEANUP_SUPPORTED = 131072
View Source
const Py_CONSTANT_ELLIPSIS = 3
View Source
const Py_CONSTANT_EMPTY_BYTES = 8
View Source
const Py_CONSTANT_EMPTY_STR = 7
View Source
const Py_CONSTANT_EMPTY_TUPLE = 9
View Source
const Py_CONSTANT_FALSE = 1
View Source
const Py_CONSTANT_NONE = 0
View Source
const Py_CONSTANT_NOT_IMPLEMENTED = 4
View Source
const Py_CONSTANT_ONE = 6
View Source
const Py_CONSTANT_TRUE = 2
View Source
const Py_CONSTANT_ZERO = 5
View Source
const Py_DTSF_ADD_DOT_0 = 2
View Source
const Py_DTSF_ALT = 4
View Source
const Py_DTSF_NO_NEG_0 = 8
View Source
const Py_DTSF_SIGN = 1
View Source
const Py_DTST_FINITE = 0
View Source
const Py_DTST_INFINITE = 1
View Source
const Py_DTST_NAN = 2
View Source
const Py_EQ = 2
View Source
const Py_GE = 5
View Source
const Py_GT = 4
View Source
const Py_HASH_ALGORITHM = 3
View Source
const Py_HASH_CUTOFF = 0
View Source
const Py_HASH_EXTERNAL = 0
View Source
const Py_HASH_FNV = 2
View Source
const Py_HASH_SIPHASH13 = 3
View Source
const Py_HASH_SIPHASH24 = 1
View Source
const Py_LE = 1
View Source
const Py_LT = 0
View Source
const Py_MATH_E = 2.718281828459045
View Source
const Py_MATH_PI = 3.141592653589793
View Source
const Py_NE = 3
View Source
const Py_PRINT_RAW = 1
View Source
const Py_READONLY = 1
View Source
const Py_RELATIVE_OFFSET = 8
View Source
const Py_REMOTE_DEBUG = 1
View Source
const Py_RL_STARTUP_HOOK_TAKES_ARGS = 1
View Source
const Py_TPFLAGS_DEFAULT = 0
View Source
const Py_TPFLAGS_HAVE_STACKLESS_EXTENSION = 0
View Source
const Py_TPFLAGS_INLINE_VALUES = 4
View Source
const Py_TPFLAGS_MANAGED_DICT = 16
View Source
const Py_TPFLAGS_MANAGED_WEAKREF = 8
View Source
const Py_TPFLAGS_MAPPING = 64
View Source
const Py_TPFLAGS_PREHEADER = 24
View Source
const Py_TPFLAGS_SEQUENCE = 32
View Source
const Py_T_BOOL = 14
View Source
const Py_T_BYTE = 8
View Source
const Py_T_CHAR = 7
View Source
const Py_T_DOUBLE = 4
View Source
const Py_T_FLOAT = 3
View Source
const Py_T_INT = 1
View Source
const Py_T_LONG = 2
View Source
const Py_T_LONGLONG = 17
View Source
const Py_T_OBJECT_EX = 16
View Source
const Py_T_PYSSIZET = 19
View Source
const Py_T_SHORT = 0
View Source
const Py_T_STRING = 5
View Source
const Py_T_STRING_INPLACE = 13
View Source
const Py_T_UBYTE = 9
View Source
const Py_T_UINT = 11
View Source
const Py_T_ULONG = 12
View Source
const Py_T_ULONGLONG = 18
View Source
const Py_T_USHORT = 10
View Source
const Py_UNICODE_SIZE = 4
View Source
const SIZEOF_DOUBLE = 8
View Source
const SIZEOF_FLOAT = 4
View Source
const SIZEOF_FPOS_T = 8
View Source
const SIZEOF_INT = 4
View Source
const SIZEOF_LONG = 8
View Source
const SIZEOF_LONG_DOUBLE = 8
View Source
const SIZEOF_LONG_LONG = 8
View Source
const SIZEOF_OFF_T = 8
View Source
const SIZEOF_PID_T = 4
View Source
const SIZEOF_PTHREAD_KEY_T = 8
View Source
const SIZEOF_PTHREAD_T = 8
View Source
const SIZEOF_PY_HASH_T = 8
View Source
const SIZEOF_PY_UHASH_T = 8
View Source
const SIZEOF_SHORT = 2
View Source
const SIZEOF_SIZE_T = 8
View Source
const SIZEOF_TIME_T = 8
View Source
const SIZEOF_UINTPTR_T = 8
View Source
const SIZEOF_VOID_P = 8
View Source
const SIZEOF_WCHAR_T = 4
View Source
const SIZEOF__BOOL = 1
View Source
const SSTATE_INTERNED_IMMORTAL = 2
View Source
const SSTATE_INTERNED_IMMORTAL_STATIC = 3
View Source
const SSTATE_INTERNED_MORTAL = 1
View Source
const SSTATE_NOT_INTERNED = 0
View Source
const STDC_HEADERS = 1
View Source
const SYS_SELECT_WITH_SYS_TIME = 1
View Source
const THREAD_STACK_SIZE = 16777216
View Source
const WAIT_LOCK = 1
View Source
const WINDOW_HAS_FLAGS = 1
View Source
const WITH_DECIMAL_CONTEXTVAR = 1
View Source
const WITH_DOC_STRINGS = 1
View Source
const WITH_DTRACE = 1
View Source
const WITH_DYLD = 1
View Source
const WITH_EDITLINE = 1
View Source
const WITH_MIMALLOC = 1
View Source
const WITH_NEXT_FRAMEWORK = 1
View Source
const WITH_PYMALLOC = 1
View Source
const XGoPackage = true
View Source
const X_ALL_SOURCE = 1
View Source
const X_DARWIN_C_SOURCE = 1
View Source
const X_FILE_OFFSET_BITS = 64
View Source
const X_GNU_SOURCE = 1
View Source
const X_HPUX_ALT_XOPEN_SOCKET_API = 1
View Source
const X_LARGEFILE_SOURCE = 1
View Source
const X_NETBSD_SOURCE = 1
View Source
const X_OPENBSD_SOURCE = 1
View Source
const X_POSIX_PTHREAD_SEMANTICS = 1
View Source
const X_PYTHONFRAMEWORK = "Python"
View Source
const X_PYTHREAD_NAME_MAXLEN = 63
View Source
const X_PY_DATA_STACK_CHUNK_SIZE = 16384
View Source
const X_PyHASH_BITS = 61
View Source
const X_PyHASH_INF = 314159
View Source
const X_PyInterpreterConfig_LEGACY_CHECK_MULTI_INTERP_EXTENSIONS = 0
View Source
const X_PyLong_DECIMAL_SHIFT = 9
View Source
const X_PyLong_NON_SIZE_BITS = 3
View Source
const X_PyLong_SIGN_MASK = 3
View Source
const X_PyModLAST_SLOT = 4
View Source
const X_Py_ATTR_CACHE_UNUSED = 30000
View Source
const X_Py_FFI_SUPPORT_C_COMPLEX = 1
View Source
const X_Py_IMMORTAL_FLAGS = 1
View Source
const X_Py_LOCKED = 1
View Source
const X_Py_MANAGED_BUFFER_FREE_FORMAT = 2
View Source
const X_Py_MANAGED_BUFFER_RELEASED = 1
View Source
const X_Py_MAX_SCRIPT_PATH_SIZE = 512
View Source
const X_Py_MEMORYVIEW_C = 2
View Source
const X_Py_MEMORYVIEW_FORTRAN = 4
View Source
const X_Py_MEMORYVIEW_PIL = 16
View Source
const X_Py_MEMORYVIEW_RELEASED = 1
View Source
const X_Py_MEMORYVIEW_RESTRICTED = 32
View Source
const X_Py_MEMORYVIEW_SCALAR = 8
View Source
const X_Py_PARSE_INTPTR = "l"
View Source
const X_Py_PARSE_PID = "i"
View Source
const X_Py_PARSE_UINTPTR = "k"
View Source
const X_Py_STACK_GROWS_DOWN = 1
View Source
const X_Py_STATICALLY_ALLOCATED_FLAG = 4
View Source
const X_Py_TPFLAGS_STATIC_BUILTIN = 2
View Source
const X_Py_T_NONE = 20
View Source
const X_Py_T_OBJECT = 6
View Source
const X_Py_UNLOCKED = 0
View Source
const X_Py_USE_GCC_BUILTIN_ATOMICS = 1
View Source
const X_Py_WRITE_RESTRICTED = 4
View Source
const X_REENTRANT = 1
View Source
const X_TANDEM_SOURCE = 1
View Source
const X__BSD_VISIBLE = 1
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

Variables

View Source
var PY_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 PyHexdigits *c.Char
View Source
var PyOS_InputHook func() c.Int

Stuff with no proper home (yet)

View Source
var PyOS_ReadlineFunctionPointer func(_llcppg_param1 *c.FILE, _llcppg_param2 *c.FILE, _llcppg_param3 *c.Char) *c.Char
View Source
var PyStructSequence_UnnamedField *c.Char
View Source
var Py_BytesWarningFlag c.Int
View Source
var Py_DebugFlag c.Int
View Source
var Py_DontWriteBytecodeFlag c.Int
View Source
var Py_FileSystemDefaultEncodeErrors *c.Char
View Source
var Py_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 Py_FrozenFlag c.Int
View Source
var Py_HasFileSystemDefaultEncoding c.Int
View Source
var Py_HashRandomizationFlag c.Int
View Source
var Py_IgnoreEnvironmentFlag c.Int
View Source
var Py_InspectFlag c.Int
View Source
var Py_InteractiveFlag c.Int
View Source
var Py_IsolatedFlag c.Int
View Source
var Py_NoSiteFlag c.Int
View Source
var Py_NoUserSiteDirectory c.Int
View Source
var Py_OptimizeFlag c.Int
View Source
var Py_QuietFlag c.Int
View Source
var Py_UTF8Mode c.Int
View Source
var Py_UnbufferedStdioFlag c.Int
View Source
var Py_VerboseFlag c.Int
View Source
var Py_Version c.Ulong
View Source
var X_PyAsciiWhitespace *uint8

Helper array used by Py_UNICODE_ISSPACE().

View Source
var X_PyByteArrayEmptyString *c.Char
View Source
var X_PyCtypeTable [256]c.Uint
View Source
var X_PyCtypeTolower [256]uint8
View Source
var X_PyCtypeToupper [256]uint8

Functions

func PyBuffer_FillContiguousStrides

func PyBuffer_FillContiguousStrides(ndims c.Int, shape *PySsizeT, strides *PySsizeT, 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 PyBuffer_ToContiguous

func PyBuffer_ToContiguous(buf unsafe.Pointer, view *PyBuffer, len PySsizeT, order c.Char) c.Int

Implementation in memoryobject.c

func PyBytes_Concat

func PyBytes_Concat(_llcppg_param1 **PyObject, _llcppg_param2 *PyObject)

func PyBytes_ConcatAndDel

func PyBytes_ConcatAndDel(_llcppg_param1 **PyObject, _llcppg_param2 *PyObject)

func PyCapsule_Import

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

func PyCode_AddWatcher

func PyCode_AddWatcher(callback PyCode_WatchCallback) 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 PyCode_ClearWatcher

func PyCode_ClearWatcher(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 PyCodec_KnownEncoding

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

Codec registry encoding check API.

Returns 1/0 depending on whether there is a registered codec for the given encoding.

func PyCodec_RegisterError

func PyCodec_RegisterError(name *c.Char, error *PyObject) 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 PyCompile_OpcodeStackEffect

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

func PyCompile_OpcodeStackEffectWithJump

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

func PyConfig_GetInt

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

func PyConfig_Set

func PyConfig_Set(name *c.Char, value *PyObject) c.Int

func PyContext_AddWatcher

func PyContext_AddWatcher(callback PyContext_WatchCallback) 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 PyContext_ClearWatcher

func PyContext_ClearWatcher(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 PyDict_AddWatcher

func PyDict_AddWatcher(callback PyDict_WatchCallback) c.Int

Register/unregister a dict-watcher callback

func PyDict_ClearWatcher

func PyDict_ClearWatcher(watcher_id c.Int) c.Int

func PyDict_Unwatch

func PyDict_Unwatch(watcher_id c.Int, dict *PyObject) c.Int

func PyDict_Watch

func PyDict_Watch(watcher_id c.Int, dict *PyObject) c.Int

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

func PyErr_BadArgument

func PyErr_BadArgument() c.Int

Convenience functions

func PyErr_BadInternalCall

func PyErr_BadInternalCall()

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

func PyErr_CheckSignals

func PyErr_CheckSignals() c.Int

In signalmodule.c

func PyErr_Clear

func PyErr_Clear()

func PyErr_Fetch

func PyErr_Fetch(_llcppg_param1 **PyObject, _llcppg_param2 **PyObject, _llcppg_param3 **PyObject)

func PyErr_FormatUnraisable

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

func PyErr_GetExcInfo

func PyErr_GetExcInfo(_llcppg_param1 **PyObject, _llcppg_param2 **PyObject, _llcppg_param3 **PyObject)

func PyErr_NormalizeException

func PyErr_NormalizeException(_llcppg_param1 **PyObject, _llcppg_param2 **PyObject, _llcppg_param3 **PyObject)

func PyErr_Print

func PyErr_Print()

func PyErr_PrintEx

func PyErr_PrintEx(_llcppg_param1 c.Int)

func PyErr_SetInterrupt

func PyErr_SetInterrupt()

func PyErr_SetInterruptEx

func PyErr_SetInterruptEx(signum c.Int) c.Int

func PyErr_SyntaxLocation

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

Support for adding program text to SyntaxErrors

func PyErr_SyntaxLocationEx

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

func PyEval_InitThreads

func PyEval_InitThreads()

func PyEval_SetProfile

func PyEval_SetProfile(_llcppg_param1 PyTracefunc, _llcppg_param2 *PyObject)

func PyEval_SetProfileAllThreads

func PyEval_SetProfileAllThreads(_llcppg_param1 PyTracefunc, _llcppg_param2 *PyObject)

func PyEval_SetTrace

func PyEval_SetTrace(_llcppg_param1 PyTracefunc, _llcppg_param2 *PyObject)

func PyEval_SetTraceAllThreads

func PyEval_SetTraceAllThreads(_llcppg_param1 PyTracefunc, _llcppg_param2 *PyObject)

func PyFclose

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

func PyFile_SetOpenCodeHook

func PyFile_SetOpenCodeHook(hook Py_OpenCodeHookFunction, userData unsafe.Pointer) c.Int

func PyFile_WriteString

func PyFile_WriteString(_llcppg_param1 *c.Char, _llcppg_param2 *PyObject) c.Int

func PyFloat_GetMax

func PyFloat_GetMax() c.Double

func PyFloat_GetMin

func PyFloat_GetMin() c.Double

func PyFloat_Pack2

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

func PyFloat_Pack4

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

func PyFloat_Pack8

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

func PyFloat_Unpack2

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

func PyFloat_Unpack4

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

func PyFloat_Unpack8

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

func PyFunction_AddWatcher

func PyFunction_AddWatcher(callback PyFunction_WatchCallback) 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 PyFunction_ClearWatcher

func PyFunction_ClearWatcher(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 PyGC_Disable

func PyGC_Disable() c.Int

func PyGC_Enable

func PyGC_Enable() c.Int

C API for controlling the state of the garbage collector

func PyGC_IsEnabled

func PyGC_IsEnabled() c.Int

func PyGILState_Check

func PyGILState_Check() 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 PyImport_AppendInittab

func PyImport_AppendInittab(name *c.Char, initfunc func() *PyObject) c.Int

func PyImport_GetMagicNumber

func PyImport_GetMagicNumber() c.Long

func PyImport_GetMagicTag

func PyImport_GetMagicTag() *c.Char

func PyImport_ImportFrozenModule

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

func PyInitConfig_FreeStrList

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

func PyMem_Calloc

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

func PyMem_Free

func PyMem_Free(ptr unsafe.Pointer)

func PyMem_Malloc

func PyMem_Malloc(size c.SizeT) unsafe.Pointer

Functions

Functions supplying platform-independent semantics for malloc/realloc/ free. These functions make sure that allocating 0 bytes returns a distinct non-NULL pointer (whenever possible -- if we're flat out of memory, NULL may be returned), even if the platform malloc and realloc don't. Returned pointers must be checked for NULL explicitly. No action is performed on failure (no exception is set, no warning is printed, etc).

func PyMem_RawCalloc

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

func PyMem_RawFree

func PyMem_RawFree(ptr unsafe.Pointer)

func PyMem_RawMalloc

func PyMem_RawMalloc(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 PyMem_RawRealloc

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

func PyMem_Realloc

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

func PyMem_SetupDebugHooks

func PyMem_SetupDebugHooks()

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 PyMember_SetOne

func PyMember_SetOne(_llcppg_param1 *c.Char, _llcppg_param2 *PyMemberDef, _llcppg_param3 *PyObject) c.Int

func PyMonitoring_ExitScope

func PyMonitoring_ExitScope() c.Int

func PyOSDoubleToString

func PyOSDoubleToString(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 PyOSMystricmp

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

func PyOSMystrnicmp

func PyOSMystrnicmp(_llcppg_param1 *c.Char, _llcppg_param2 *c.Char, _llcppg_param3 PySsizeT) c.Int

func PyOSSnprintf

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

func PyOSStringToDouble

func PyOSStringToDouble(str *c.Char, endptr **c.Char, overflow_exception *PyObject) c.Double

func PyOSStrtol

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

func PyOSStrtoul

func PyOSStrtoul(_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 PyOSVsnprintf

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

func PyOS_AfterFork

func PyOS_AfterFork()

Deprecated, please use PyOS_AfterFork_Child() instead

func PyOS_AfterFork_Child

func PyOS_AfterFork_Child()

func PyOS_AfterFork_Parent

func PyOS_AfterFork_Parent()

func PyOS_BeforeFork

func PyOS_BeforeFork()

func PyOS_InterruptOccurred

func PyOS_InterruptOccurred() c.Int

func PyOS_Readline

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

Stuff with no proper home (yet)

func PyObject_Calloc

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

func PyObject_Free

func PyObject_Free(ptr unsafe.Pointer)

func PyObject_GC_Del

func PyObject_GC_Del(_llcppg_param1 unsafe.Pointer)

func PyObject_GC_Track

func PyObject_GC_Track(_llcppg_param1 unsafe.Pointer)

Tell the GC to track this object.

See also private _PyObject_GC_TRACK() macro.

func PyObject_GC_UnTrack

func PyObject_GC_UnTrack(_llcppg_param1 unsafe.Pointer)

Tell the GC to stop tracking this object.

See also private _PyObject_GC_UNTRACK() macro.

func PyObject_Malloc

func PyObject_Malloc(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 PyObject_Realloc

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

func PyRefTracer_SetTracer

func PyRefTracer_SetTracer(tracer PyRefTracer, data unsafe.Pointer) c.Int

func PyRun_AnyFile

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

func PyRun_AnyFileEx

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

func PyRun_AnyFileExFlags

func PyRun_AnyFileExFlags(fp *c.FILE, filename *c.Char, closeit c.Int, flags *PyCompilerFlags) c.Int

func PyRun_AnyFileFlags

func PyRun_AnyFileFlags(_llcppg_param1 *c.FILE, _llcppg_param2 *c.Char, _llcppg_param3 *PyCompilerFlags) c.Int

func PyRun_InteractiveLoop

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

func PyRun_InteractiveLoopFlags

func PyRun_InteractiveLoopFlags(fp *c.FILE, filename *c.Char, flags *PyCompilerFlags) c.Int

func PyRun_InteractiveOne

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

func PyRun_InteractiveOneFlags

func PyRun_InteractiveOneFlags(fp *c.FILE, filename *c.Char, flags *PyCompilerFlags) c.Int

func PyRun_InteractiveOneObject

func PyRun_InteractiveOneObject(fp *c.FILE, filename *PyObject, flags *PyCompilerFlags) c.Int

func PyRun_SimpleFile

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

func PyRun_SimpleFileEx

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

func PyRun_SimpleFileExFlags

func PyRun_SimpleFileExFlags(fp *c.FILE, filename *c.Char, closeit c.Int, flags *PyCompilerFlags) c.Int

func PyRun_SimpleString

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

func PyRun_SimpleStringFlags

func PyRun_SimpleStringFlags(_llcppg_param1 *c.Char, _llcppg_param2 *PyCompilerFlags) c.Int

func PySignal_SetWakeupFd

func PySignal_SetWakeupFd(fd c.Int) c.Int

In signalmodule.c

func PySys_AddAuditHook

func PySys_AddAuditHook(_llcppg_param1 Py_AuditHookFunction, _llcppg_param2 unsafe.Pointer) c.Int

func PySys_Audit

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

func PySys_AuditTuple

func PySys_AuditTuple(event *c.Char, args *PyObject) c.Int

func PySys_FormatStderr

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

func PySys_FormatStdout

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

func PySys_ResetWarnOptions

func PySys_ResetWarnOptions()

func PySys_SetArgv

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

func PySys_SetArgvEx

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

func PySys_SetObject

func PySys_SetObject(_llcppg_param1 *c.Char, _llcppg_param2 *PyObject) c.Int

func PySys_WriteStderr

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

func PySys_WriteStdout

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

func PyThreadCreateKey

func PyThreadCreateKey() 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 PyThreadDeleteKey

func PyThreadDeleteKey(key c.Int)

func PyThreadDeleteKeyValue

func PyThreadDeleteKeyValue(key c.Int)

func PyThreadExitThread

func PyThreadExitThread()

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 PyThreadGetKeyValue

func PyThreadGetKeyValue(key c.Int) unsafe.Pointer

func PyThreadGetStacksize

func PyThreadGetStacksize() c.SizeT

func PyThreadGetThreadIdent

func PyThreadGetThreadIdent() c.Ulong

func PyThreadGetThreadNativeId

func PyThreadGetThreadNativeId() c.Ulong

func PyThreadInitThread

func PyThreadInitThread()

func PyThreadSetKeyValue

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

func PyThreadSetStacksize

func PyThreadSetStacksize(_llcppg_param1 c.SizeT) c.Int

func PyThreadStartNewThread

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

func PyThreadState_DeleteCurrent

func PyThreadState_DeleteCurrent()

func PyThreadState_SetAsyncExc

func PyThreadState_SetAsyncExc(_llcppg_param1 c.Ulong, _llcppg_param2 *PyObject) c.Int

func PyThread_ReInitTLS

func PyThread_ReInitTLS()

Cleanup after a fork

func PyTime_AsSecondsDouble

func PyTime_AsSecondsDouble(t PyTimeT) c.Double

func PyTime_Monotonic

func PyTime_Monotonic(result *PyTimeT) c.Int

func PyTime_MonotonicRaw

func PyTime_MonotonicRaw(result *PyTimeT) c.Int

func PyTime_PerfCounter

func PyTime_PerfCounter(result *PyTimeT) c.Int

func PyTime_PerfCounterRaw

func PyTime_PerfCounterRaw(result *PyTimeT) c.Int

func PyTime_Time

func PyTime_Time(result *PyTimeT) c.Int

func PyTime_TimeRaw

func PyTime_TimeRaw(result *PyTimeT) c.Int

func PyTraceMalloc_Track

func PyTraceMalloc_Track(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 PyTraceMalloc_Untrack

func PyTraceMalloc_Untrack(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 PyType_AddWatcher

func PyType_AddWatcher(callback PyType_WatchCallback) c.Int

func PyType_ClearCache

func PyType_ClearCache() c.Uint

func PyType_ClearWatcher

func PyType_ClearWatcher(watcher_id c.Int) c.Int

func PyType_Unwatch

func PyType_Unwatch(watcher_id c.Int, type_ *PyObject) c.Int

func PyType_Watch

func PyType_Watch(watcher_id c.Int, type_ *PyObject) c.Int

func PyUnicode_Append

func PyUnicode_Append(pleft **PyObject, right *PyObject)

Concat two strings and put the result in *pleft (sets *pleft to NULL on error)

func PyUnicode_AppendAndDel

func PyUnicode_AppendAndDel(pleft **PyObject, right *PyObject)

Concat two strings, put the result in *pleft and drop the right object (sets *pleft to NULL on error)

func PyUnicode_GetDefaultEncoding

func PyUnicode_GetDefaultEncoding() *c.Char

Returns "utf-8".

func PyUnicode_InternInPlace

func PyUnicode_InternInPlace(_llcppg_param1 **PyObject)

func PyUnicode_Resize

func PyUnicode_Resize(unicode **PyObject, length PySsizeT) c.Int

Resize a Unicode object. The length is the number of codepoints.

unicode is modified to point to the new (resized) object and 0 returned on success.

Try to resize the string in place (which is usually faster than allocating a new string and copy characters), or create a new string.

Error handling is implemented as follows: an exception is set, -1 is returned and *unicode left untouched.

WARNING: The function doesn't check string content, the result may not be a string in canonical representation.

func PyUnstable_CopyPerfMapFile

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

func PyUnstable_GC_VisitObjects

func PyUnstable_GC_VisitObjects(callback GcvisitobjectsT, arg unsafe.Pointer)

func PyUnstable_PerfMapState_Fini

func PyUnstable_PerfMapState_Fini()

func PyUnstable_PerfMapState_Init

func PyUnstable_PerfMapState_Init() c.Int

func PyUnstable_PerfTrampoline_SetPersistAfterFork

func PyUnstable_PerfTrampoline_SetPersistAfterFork(enable c.Int) c.Int

func PyUnstable_WritePerfMapEntry

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

func Py_AddPendingCall

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

func Py_AtExit

func Py_AtExit(func_ func()) c.Int

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

func Py_BytesMain

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

func Py_DecodeLocale

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

func Py_EncodeLocale

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

func Py_EnterRecursiveCall

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

func Py_Exit

func Py_Exit(_llcppg_param1 c.Int)

func Py_FatalError

func Py_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 Py_FdIsInteractive

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

func Py_Finalize

func Py_Finalize()

func Py_FinalizeEx

func Py_FinalizeEx() c.Int

func Py_FrozenMain

func Py_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 Py_GETENV

func Py_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 Py_GetArgcArgv

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

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

See also PyConfig.orig_argv.

func Py_GetBuildInfo

func Py_GetBuildInfo() *c.Char

func Py_GetCompiler

func Py_GetCompiler() *c.Char

func Py_GetCopyright

func Py_GetCopyright() *c.Char

func Py_GetExecPrefix

func Py_GetExecPrefix() *c.WcharT

func Py_GetPath

func Py_GetPath() *c.WcharT

func Py_GetPlatform

func Py_GetPlatform() *c.Char

func Py_GetPrefix

func Py_GetPrefix() *c.WcharT

func Py_GetProgramFullPath

func Py_GetProgramFullPath() *c.WcharT

func Py_GetProgramName

func Py_GetProgramName() *c.WcharT

func Py_GetPythonHome

func Py_GetPythonHome() *c.WcharT

func Py_GetRecursionLimit

func Py_GetRecursionLimit() c.Int

func Py_GetVersion

func Py_GetVersion() *c.Char

In their own files

func Py_Initialize

func Py_Initialize()

Initialization and finalization

func Py_InitializeEx

func Py_InitializeEx(_llcppg_param1 c.Int)

func Py_IsFinalizing

func Py_IsFinalizing() c.Int

func Py_IsInitialized

func Py_IsInitialized() c.Int

func Py_LeaveRecursiveCall

func Py_LeaveRecursiveCall()

func Py_Main

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

Bootstrap __main__ (defined in Modules/main.c)

func Py_MakePendingCalls

func Py_MakePendingCalls() c.Int

func Py_PACK_FULL_VERSION

func Py_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 Py_PACK_VERSION

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

func Py_RunMain

func Py_RunMain() c.Int

func Py_SetProgramName

func Py_SetProgramName(_llcppg_param1 *c.WcharT)

In pathconfig.c

func Py_SetPythonHome

func Py_SetPythonHome(_llcppg_param1 *c.WcharT)

func Py_SetRecursionLimit

func Py_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 Py_UniversalNewlineFgets

func Py_UniversalNewlineFgets(_llcppg_param1 *c.Char, _llcppg_param2 c.Int, _llcppg_param3 *c.FILE, _llcppg_param4 *PyObject) *c.Char

func X_PyBytes_Resize

func X_PyBytes_Resize(_llcppg_param1 **PyObject, _llcppg_param2 PySsizeT) c.Int

func X_PyCode_CheckLineNumber

func X_PyCode_CheckLineNumber(lasti c.Int, bounds *PyCodeAddressRange) 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_PyErr_BadInternalCall

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

func X_PyTuple_Resize

func X_PyTuple_Resize(_llcppg_param1 **PyObject, _llcppg_param2 PySsizeT) c.Int

func X_PyUnicode_IsAlpha

func X_PyUnicode_IsAlpha(ch Py_UCS4) c.Int

func X_PyUnicode_IsDecimalDigit

func X_PyUnicode_IsDecimalDigit(ch Py_UCS4) c.Int

func X_PyUnicode_IsDigit

func X_PyUnicode_IsDigit(ch Py_UCS4) c.Int

func X_PyUnicode_IsLinebreak

func X_PyUnicode_IsLinebreak(ch Py_UCS4) c.Int

func X_PyUnicode_IsLowercase

func X_PyUnicode_IsLowercase(ch Py_UCS4) c.Int

These should not be used directly. Use the Py_UNICODE_IS* and Py_UNICODE_TO* macros instead.

These APIs are implemented in Objects/unicodectype.c.

func X_PyUnicode_IsNumeric

func X_PyUnicode_IsNumeric(ch Py_UCS4) c.Int

func X_PyUnicode_IsPrintable

func X_PyUnicode_IsPrintable(ch Py_UCS4) c.Int

func X_PyUnicode_IsTitlecase

func X_PyUnicode_IsTitlecase(ch Py_UCS4) c.Int

func X_PyUnicode_IsUppercase

func X_PyUnicode_IsUppercase(ch Py_UCS4) c.Int

func X_PyUnicode_IsWhitespace

func X_PyUnicode_IsWhitespace(ch Py_UCS4) c.Int

func X_PyUnicode_ToDecimalDigit

func X_PyUnicode_ToDecimalDigit(ch Py_UCS4) c.Int

func X_PyUnicode_ToDigit

func X_PyUnicode_ToDigit(ch Py_UCS4) c.Int

func X_PyUnicode_ToNumeric

func X_PyUnicode_ToNumeric(ch Py_UCS4) c.Double

func X_Py_BreakPoint

func X_Py_BreakPoint()

func X_Py_FatalErrorFunc

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

Types

type Allocfunc

type Allocfunc = func(_llcppg_param1 *PyTypeObject, _llcppg_param2 PySsizeT) *PyObject

llgo:type C

type AtexitDatacallbackfunc

type AtexitDatacallbackfunc = func(_llcppg_param1 unsafe.Pointer)

llgo:type C

type Binaryfunc

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

llgo:type C

type Descrgetfunc

type Descrgetfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

llgo:type C

type Descrsetfunc

type Descrsetfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 *PyObject) c.Int

llgo:type C

type Destructor

type Destructor = func(_llcppg_param1 *PyObject)

llgo:type C

type Digit

type Digit = c.Uint32T

type Freefunc

type Freefunc = func(_llcppg_param1 unsafe.Pointer)

llgo:type C

type GcvisitobjectsT

type GcvisitobjectsT = func(_llcppg_param1 *PyObject, _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 Getattrfunc

type Getattrfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *c.Char) *PyObject

llgo:type C

type Getattrofunc

type Getattrofunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject) *PyObject

llgo:type C

type Getbufferproc

type Getbufferproc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyBuffer, _llcppg_param3 c.Int) c.Int

llgo:type C

type Getiterfunc

type Getiterfunc = func(_llcppg_param1 *PyObject) *PyObject

llgo:type C

type Getter

type Getter = func(_llcppg_param1 *PyObject, _llcppg_param2 unsafe.Pointer) *PyObject

llgo:type C

type Hashfunc

type Hashfunc = func(_llcppg_param1 *PyObject) PyHashT

llgo:type C

type Initproc

type Initproc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 *PyObject) c.Int

llgo:type C

type Inquiry

type Inquiry = func(_llcppg_param1 *PyObject) c.Int

llgo:type C

type Iternextfunc

type Iternextfunc = func(_llcppg_param1 *PyObject) *PyObject

llgo:type C

type Lenfunc

type Lenfunc = func(_llcppg_param1 *PyObject) PySsizeT

llgo:type C

type Newfunc

type Newfunc = func(_llcppg_param1 *PyTypeObject, _llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

llgo:type C

type Objobjargproc

type Objobjargproc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 *PyObject) c.Int

llgo:type C

type Objobjproc

type Objobjproc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject) c.Int

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 PyThreadTypeLock
}

Trampoline API

type Printfunc

type Printfunc = PySsizeT

Allow printfunc in the tp_vectorcall_offset slot for backwards-compatibility

type PyASCIIObject

type PyASCIIObject struct {
	ObBase PyObject
	Length PySsizeT
	Hash   PyHashT
	State  _llcppg_anon_2
}

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 PyAsyncGenObject

type PyAsyncGenObject = X_PyAsyncGenObject

--- Asynchronous Generators --------------------------------------------

type PyAsyncMethods

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

type PyAttributeErrorObject

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

type PyBaseExceptionGroupObject

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

type PyBaseExceptionObject

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

type PyBuffer

type PyBuffer struct {
	Buf        unsafe.Pointer
	Obj        *PyObject
	Len        PySsizeT
	Itemsize   PySsizeT
	Readonly   c.Int
	Ndim       c.Int
	Format     *c.Char
	Shape      *PySsizeT
	Strides    *PySsizeT
	Suboffsets *PySsizeT
	Internal   unsafe.Pointer
}

=== New Buffer API ============================================ Limited API and stable ABI since Python 3.11

Py_buffer struct layout and size is now part of the stable abi3. The struct layout and size must not be changed in any way, as it would break the ABI.

func (*PyBuffer) FillInfo

func (self *PyBuffer) FillInfo(o *PyObject, buf unsafe.Pointer, len PySsizeT, 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 (*PyBuffer).FillInfo C.PyBuffer_FillInfo

func (*PyBuffer) FromContiguous

func (self *PyBuffer) FromContiguous(buf unsafe.Pointer, len PySsizeT, order c.Char) c.Int

llgo:link (*PyBuffer).FromContiguous C.PyBuffer_FromContiguous

func (*PyBuffer) IsContiguous

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

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

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

func (*PyBuffer) Pointer

func (self *PyBuffer) Pointer(indices *PySsizeT) 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 (*PyBuffer).Pointer C.PyBuffer_GetPointer

func (*PyBuffer) PyMemoryView_FromBuffer

func (self *PyBuffer) PyMemoryView_FromBuffer() *PyObject

llgo:link (*PyBuffer).PyMemoryView_FromBuffer C.PyMemoryView_FromBuffer

func (*PyBuffer) Release

func (self *PyBuffer) Release()

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

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

type PyBufferProcs

type PyBufferProcs struct {
	BfGetbuffer     Getbufferproc
	BfReleasebuffer Releasebufferproc
}

type PyByteArrayObject

type PyByteArrayObject struct {
	ObBase    PyVarObject
	ObAlloc   PySsizeT
	ObBytes   *c.Char
	ObStart   *c.Char
	ObExports PySsizeT
}

Object layout

type PyBytesObject

type PyBytesObject struct {
	ObBase  PyVarObject
	ObShash PyHashT
	ObSval  [1]c.Char
}

type PyCFunction

type PyCFunction = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject) *PyObject

llgo:type C

type PyCFunctionFast

type PyCFunctionFast = func(_llcppg_param1 *PyObject, _llcppg_param2 **PyObject, _llcppg_param3 PySsizeT) *PyObject

llgo:type C

type PyCFunctionFastWithKeywords

type PyCFunctionFastWithKeywords = func(_llcppg_param1 *PyObject, _llcppg_param2 **PyObject, _llcppg_param3 PySsizeT, _llcppg_param4 *PyObject) *PyObject

llgo:type C

type PyCFunctionObject

type PyCFunctionObject struct {
	ObBase       PyObject
	MMl          *PyMethodDef
	MSelf        *PyObject
	MModule      *PyObject
	MWeakreflist *PyObject
	Vectorcall   Vectorcallfunc
}

PyCFunctionObject structure

type PyCFunctionWithKeywords

type PyCFunctionWithKeywords = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

llgo:type C

type PyCMethod

type PyCMethod = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyTypeObject, _llcppg_param3 **PyObject, _llcppg_param4 PySsizeT, _llcppg_param5 *PyObject) *PyObject

llgo:type C

type PyCMethodObject

type PyCMethodObject struct {
	Func    PyCFunctionObject
	MmClass *PyTypeObject
}

PyCMethodObject structure

type PyCapsule_Destructor

type PyCapsule_Destructor = func(_llcppg_param1 *PyObject)

llgo:type C

type PyCellObject

type PyCellObject struct {
	ObBase PyObject
	ObRef  *PyObject
}

type PyCodeAddressRange

type PyCodeAddressRange = X_lineOffsets

type PyCodeEvent

type PyCodeEvent c.Uint
const (
	PY_CODE_EVENT_CREATE  PyCodeEvent = 0
	PY_CODE_EVENT_DESTROY PyCodeEvent = 1
)

type PyCodeObject

type PyCodeObject struct {
	ObBase                     PyVarObject
	CoConsts                   *PyObject
	CoNames                    *PyObject
	CoExceptiontable           *PyObject
	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          *PyObject
	CoLocalspluskinds          *PyObject
	CoFilename                 *PyObject
	CoName                     *PyObject
	CoQualname                 *PyObject
	CoLinetable                *PyObject
	CoWeakreflist              *PyObject
	CoExecutors                *X_PyExecutorArray
	X_coCached                 *X_PyCoCached
	X_coInstrumentationVersion c.UintptrT
	X_coMonitoring             *X_PyCoMonitoringData
	X_coUniqueId               PySsizeT
	X_coFirsttraceable         c.Int
	CoExtra                    unsafe.Pointer
	CoCodeAdaptive             [1]c.Char
}

Bytecode object

func PyCode_NewEmpty

func PyCode_NewEmpty(filename *c.Char, funcname *c.Char, firstlineno c.Int) *PyCodeObject

Creates a new empty code object with the specified source location.

func PyUnstable_Code_New

func PyUnstable_Code_New(_llcppg_param1 c.Int, _llcppg_param2 c.Int, _llcppg_param3 c.Int, _llcppg_param4 c.Int, _llcppg_param5 c.Int, _llcppg_param6 *PyObject, _llcppg_param7 *PyObject, _llcppg_param8 *PyObject, _llcppg_param9 *PyObject, _llcppg_param10 *PyObject, _llcppg_param11 *PyObject, _llcppg_param12 *PyObject, _llcppg_param13 *PyObject, _llcppg_param14 *PyObject, _llcppg_param15 c.Int, _llcppg_param16 *PyObject, _llcppg_param17 *PyObject) *PyCodeObject

Unstable public interface

func PyUnstable_Code_NewWithPosOnlyArgs

func PyUnstable_Code_NewWithPosOnlyArgs(_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 *PyObject, _llcppg_param8 *PyObject, _llcppg_param9 *PyObject, _llcppg_param10 *PyObject, _llcppg_param11 *PyObject, _llcppg_param12 *PyObject, _llcppg_param13 *PyObject, _llcppg_param14 *PyObject, _llcppg_param15 *PyObject, _llcppg_param16 c.Int, _llcppg_param17 *PyObject, _llcppg_param18 *PyObject) *PyCodeObject

func (*PyCodeObject) PyCode_Addr2Line

func (self *PyCodeObject) PyCode_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 (*PyCodeObject).PyCode_Addr2Line C.PyCode_Addr2Line

func (*PyCodeObject) PyCode_Addr2Location

func (self *PyCodeObject) PyCode_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 (*PyCodeObject).PyCode_Addr2Location C.PyCode_Addr2Location

func (*PyCodeObject) PyCode_GetCellvars

func (self *PyCodeObject) PyCode_GetCellvars() *PyObject

Equivalent to getattr(code, 'co_cellvars') in Python.

llgo:link (*PyCodeObject).PyCode_GetCellvars C.PyCode_GetCellvars

func (*PyCodeObject) PyCode_GetCode

func (self *PyCodeObject) PyCode_GetCode() *PyObject

Equivalent to getattr(code, 'co_code') in Python. Returns a strong reference to a bytes object.

llgo:link (*PyCodeObject).PyCode_GetCode C.PyCode_GetCode

func (*PyCodeObject) PyCode_GetFreevars

func (self *PyCodeObject) PyCode_GetFreevars() *PyObject

Equivalent to getattr(code, 'co_freevars') in Python.

llgo:link (*PyCodeObject).PyCode_GetFreevars C.PyCode_GetFreevars

func (*PyCodeObject) PyCode_GetVarnames

func (self *PyCodeObject) PyCode_GetVarnames() *PyObject

Equivalent to getattr(code, 'co_varnames') in Python.

llgo:link (*PyCodeObject).PyCode_GetVarnames C.PyCode_GetVarnames

func (*PyCodeObject) PyUnstable_PerfTrampoline_CompileCode

func (self *PyCodeObject) PyUnstable_PerfTrampoline_CompileCode() c.Int

llgo:link (*PyCodeObject).PyUnstable_PerfTrampoline_CompileCode C.PyUnstable_PerfTrampoline_CompileCode

type PyCode_WatchCallback

type PyCode_WatchCallback = func(_llcppg_param1 PyCodeEvent, _llcppg_param2 *PyCodeObject) 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 PyCompactUnicodeObject

type PyCompactUnicodeObject struct {
	X_base     PyASCIIObject
	Utf8Length PySsizeT
	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 PyCompilerFlags

type PyCompilerFlags struct {
	CfFlags          c.Int
	CfFeatureVersion c.Int
}

func (*PyCompilerFlags) PyEval_MergeCompilerFlags

func (self *PyCompilerFlags) PyEval_MergeCompilerFlags() 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.

llgo:link (*PyCompilerFlags).PyEval_MergeCompilerFlags C.PyEval_MergeCompilerFlags

type PyComplex

type PyComplex struct {
	Real c.Double
	Imag c.Double
}

func X_PyCDiff

func X_PyCDiff(_llcppg_param1 PyComplex, _llcppg_param2 PyComplex) PyComplex

func X_PyCPow

func X_PyCPow(_llcppg_param1 PyComplex, _llcppg_param2 PyComplex) PyComplex

func X_PyCProd

func X_PyCProd(_llcppg_param1 PyComplex, _llcppg_param2 PyComplex) PyComplex

func X_PyCQuot

func X_PyCQuot(_llcppg_param1 PyComplex, _llcppg_param2 PyComplex) PyComplex

func X_PyCSum

func X_PyCSum(_llcppg_param1 PyComplex, _llcppg_param2 PyComplex) PyComplex

Operations on complex numbers.

func (PyComplex) FromCComplex

func (self PyComplex) FromCComplex() *PyObject

llgo:link PyComplex.FromCComplex C.PyComplex_FromCComplex

func (PyComplex) X_PyCAbs

func (self PyComplex) X_PyCAbs() c.Double

llgo:link PyComplex.X_PyCAbs C._Py_c_abs

func (PyComplex) X_PyCNeg

func (self PyComplex) X_PyCNeg() PyComplex

llgo:link PyComplex.X_PyCNeg C._Py_c_neg

type PyComplexObject

type PyComplexObject struct {
	ObBase PyObject
	Cval   PyComplex
}

PyComplexObject represents a complex number with double-precision real and imaginary parts.

type PyConfig

type PyConfig 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              PyWideStringList
	Argv                  PyWideStringList
	Xoptions              PyWideStringList
	Warnoptions           PyWideStringList
	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     PyWideStringList
	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 (*PyConfig) Clear

func (self *PyConfig) Clear()

llgo:link (*PyConfig).Clear C.PyConfig_Clear

func (*PyConfig) InitIsolatedConfig

func (self *PyConfig) InitIsolatedConfig()

llgo:link (*PyConfig).InitIsolatedConfig C.PyConfig_InitIsolatedConfig

func (*PyConfig) InitPythonConfig

func (self *PyConfig) InitPythonConfig()

llgo:link (*PyConfig).InitPythonConfig C.PyConfig_InitPythonConfig

func (*PyConfig) Py_InitializeFromConfig

func (self *PyConfig) Py_InitializeFromConfig() PyStatus

Initialization and finalization

llgo:link (*PyConfig).Py_InitializeFromConfig C.Py_InitializeFromConfig

func (*PyConfig) Read

func (self *PyConfig) Read() PyStatus

llgo:link (*PyConfig).Read C.PyConfig_Read

func (*PyConfig) SetArgv

func (self *PyConfig) SetArgv(argc PySsizeT, argv **c.WcharT) PyStatus

llgo:link (*PyConfig).SetArgv C.PyConfig_SetArgv

func (*PyConfig) SetBytesArgv

func (self *PyConfig) SetBytesArgv(argc PySsizeT, argv **c.Char) PyStatus

llgo:link (*PyConfig).SetBytesArgv C.PyConfig_SetBytesArgv

func (*PyConfig) SetBytesString

func (self *PyConfig) SetBytesString(config_str **c.WcharT, str *c.Char) PyStatus

llgo:link (*PyConfig).SetBytesString C.PyConfig_SetBytesString

func (*PyConfig) SetString

func (self *PyConfig) SetString(config_str **c.WcharT, str *c.WcharT) PyStatus

llgo:link (*PyConfig).SetString C.PyConfig_SetString

func (*PyConfig) SetWideStringList

func (self *PyConfig) SetWideStringList(list *PyWideStringList, length PySsizeT, items **c.WcharT) PyStatus

llgo:link (*PyConfig).SetWideStringList C.PyConfig_SetWideStringList

type PyContext

type PyContext = X_pycontextobject

type PyContextEvent

type PyContextEvent c.Uint
const Py_CONTEXT_SWITCHED PyContextEvent = 1

type PyContextToken

type PyContextToken = X_pycontexttokenobject

type PyContextVar

type PyContextVar = X_pycontextvarobject

type PyContext_WatchCallback

type PyContext_WatchCallback = func(_llcppg_param1 PyContextEvent, _llcppg_param2 *PyObject) 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 PyCoroObject

type PyCoroObject = X_PyCoroObject

--- PyCoroObject -------------------------------------------------------

type PyCriticalSection

type PyCriticalSection struct {
}

func (*PyCriticalSection) Begin

func (self *PyCriticalSection) Begin(op *PyObject)

llgo:link (*PyCriticalSection).Begin C.PyCriticalSection_Begin

func (*PyCriticalSection) BeginMutex

func (self *PyCriticalSection) BeginMutex(m *PyMutex)

llgo:link (*PyCriticalSection).BeginMutex C.PyCriticalSection_BeginMutex

func (*PyCriticalSection) End

func (self *PyCriticalSection) End()

llgo:link (*PyCriticalSection).End C.PyCriticalSection_End

type PyCriticalSection2

type PyCriticalSection2 struct {
}

func (*PyCriticalSection2) Begin

func (self *PyCriticalSection2) Begin(a *PyObject, b *PyObject)

llgo:link (*PyCriticalSection2).Begin C.PyCriticalSection2_Begin

func (*PyCriticalSection2) BeginMutex

func (self *PyCriticalSection2) BeginMutex(m1 *PyMutex, m2 *PyMutex)

llgo:link (*PyCriticalSection2).BeginMutex C.PyCriticalSection2_BeginMutex

func (*PyCriticalSection2) End

func (self *PyCriticalSection2) End()

llgo:link (*PyCriticalSection2).End C.PyCriticalSection2_End

type PyDescrObject

type PyDescrObject struct {
	ObBase    PyObject
	DType     *PyTypeObject
	DName     *PyObject
	DQualname *PyObject
}

Various kinds of descriptor objects

type PyDictKeysObject

type PyDictKeysObject = X_dictkeysobject

type PyDictObject

type PyDictObject struct {
	ObBase         PyObject
	MaUsed         PySsizeT
	X_maWatcherTag c.Uint64T
	MaKeys         *PyDictKeysObject
	MaValues       *PyDictValues
}

The ma_values pointer is NULL for a combined table or points to an array of PyObject* for a split table

type PyDictValues

type PyDictValues = X_dictvalues

type PyDict_WatchCallback

type PyDict_WatchCallback = func(_llcppg_param1 PyDict_WatchEvent, _llcppg_param2 *PyObject, _llcppg_param3 *PyObject, _llcppg_param4 *PyObject) 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 PyDict_WatchEvent

type PyDict_WatchEvent c.Uint
const (
	PyDict_EVENT_ADDED       PyDict_WatchEvent = 0
	PyDict_EVENT_MODIFIED    PyDict_WatchEvent = 1
	PyDict_EVENT_DELETED     PyDict_WatchEvent = 2
	PyDict_EVENT_CLONED      PyDict_WatchEvent = 3
	PyDict_EVENT_CLEARED     PyDict_WatchEvent = 4
	PyDict_EVENT_DEALLOCATED PyDict_WatchEvent = 5
)

type PyEnvironmentErrorObject

type PyEnvironmentErrorObject = PyOSErrorObject

Compatibility typedefs

type PyFloatObject

type PyFloatObject struct {
	ObBase PyObject
	ObFval c.Double
}

type PyFrameConstructor

type PyFrameConstructor struct {
	FcGlobals    *PyObject
	FcBuiltins   *PyObject
	FcName       *PyObject
	FcQualname   *PyObject
	FcCode       *PyObject
	FcDefaults   *PyObject
	FcKwdefaults *PyObject
	FcClosure    *PyObject
}

type PyFrameObject

type PyFrameObject = X_frame

func PyEval_GetFrame

func PyEval_GetFrame() *PyFrameObject

func (*PyFrameObject) PyAsyncGen_New

func (self *PyFrameObject) PyAsyncGen_New(name *PyObject, qualname *PyObject) *PyObject

llgo:link (*PyFrameObject).PyAsyncGen_New C.PyAsyncGen_New

func (*PyFrameObject) PyCoro_New

func (self *PyFrameObject) PyCoro_New(name *PyObject, qualname *PyObject) *PyObject

llgo:link (*PyFrameObject).PyCoro_New C.PyCoro_New

func (*PyFrameObject) PyEval_EvalFrame

func (self *PyFrameObject) PyEval_EvalFrame() *PyObject

llgo:link (*PyFrameObject).PyEval_EvalFrame C.PyEval_EvalFrame

func (*PyFrameObject) PyEval_EvalFrameEx

func (self *PyFrameObject) PyEval_EvalFrameEx(exc c.Int) *PyObject

llgo:link (*PyFrameObject).PyEval_EvalFrameEx C.PyEval_EvalFrameEx

func (*PyFrameObject) PyFrame_GetBack

func (self *PyFrameObject) PyFrame_GetBack() *PyFrameObject

llgo:link (*PyFrameObject).PyFrame_GetBack C.PyFrame_GetBack

func (*PyFrameObject) PyFrame_GetBuiltins

func (self *PyFrameObject) PyFrame_GetBuiltins() *PyObject

llgo:link (*PyFrameObject).PyFrame_GetBuiltins C.PyFrame_GetBuiltins

func (*PyFrameObject) PyFrame_GetCode

func (self *PyFrameObject) PyFrame_GetCode() *PyCodeObject

llgo:link (*PyFrameObject).PyFrame_GetCode C.PyFrame_GetCode

func (*PyFrameObject) PyFrame_GetGenerator

func (self *PyFrameObject) PyFrame_GetGenerator() *PyObject

llgo:link (*PyFrameObject).PyFrame_GetGenerator C.PyFrame_GetGenerator

func (*PyFrameObject) PyFrame_GetGlobals

func (self *PyFrameObject) PyFrame_GetGlobals() *PyObject

llgo:link (*PyFrameObject).PyFrame_GetGlobals C.PyFrame_GetGlobals

func (*PyFrameObject) PyFrame_GetLasti

func (self *PyFrameObject) PyFrame_GetLasti() c.Int

llgo:link (*PyFrameObject).PyFrame_GetLasti C.PyFrame_GetLasti

func (*PyFrameObject) PyFrame_GetLineNumber

func (self *PyFrameObject) PyFrame_GetLineNumber() c.Int

Return the line of code the frame is currently executing.

llgo:link (*PyFrameObject).PyFrame_GetLineNumber C.PyFrame_GetLineNumber

func (*PyFrameObject) PyFrame_GetLocals

func (self *PyFrameObject) PyFrame_GetLocals() *PyObject

llgo:link (*PyFrameObject).PyFrame_GetLocals C.PyFrame_GetLocals

func (*PyFrameObject) PyFrame_GetVar

func (self *PyFrameObject) PyFrame_GetVar(name *PyObject) *PyObject

llgo:link (*PyFrameObject).PyFrame_GetVar C.PyFrame_GetVar

func (*PyFrameObject) PyFrame_GetVarString

func (self *PyFrameObject) PyFrame_GetVarString(name *c.Char) *PyObject

llgo:link (*PyFrameObject).PyFrame_GetVarString C.PyFrame_GetVarString

func (*PyFrameObject) PyGen_New

func (self *PyFrameObject) PyGen_New() *PyObject

llgo:link (*PyFrameObject).PyGen_New C.PyGen_New

func (*PyFrameObject) PyGen_NewWithQualName

func (self *PyFrameObject) PyGen_NewWithQualName(name *PyObject, qualname *PyObject) *PyObject

llgo:link (*PyFrameObject).PyGen_NewWithQualName C.PyGen_NewWithQualName

func (*PyFrameObject) PyTraceBack_Here

func (self *PyFrameObject) PyTraceBack_Here() c.Int

Traceback interface

llgo:link (*PyFrameObject).PyTraceBack_Here C.PyTraceBack_Here

type PyFunctionObject

type PyFunctionObject struct {
	ObBase          PyObject
	FuncGlobals     *PyObject
	FuncBuiltins    *PyObject
	FuncName        *PyObject
	FuncQualname    *PyObject
	FuncCode        *PyObject
	FuncDefaults    *PyObject
	FuncKwdefaults  *PyObject
	FuncClosure     *PyObject
	FuncDoc         *PyObject
	FuncDict        *PyObject
	FuncWeakreflist *PyObject
	FuncModule      *PyObject
	FuncAnnotations *PyObject
	FuncAnnotate    *PyObject
	FuncTypeparams  *PyObject
	Vectorcall      Vectorcallfunc
	FuncVersion     c.Uint32T
}

Function objects and code objects should not be confused with each other:

Function objects are created by the execution of the 'def' statement. They reference a code object in their __code__ attribute, which is a purely syntactic object, i.e. nothing more than a compiled version of some source code lines. There is one code object per source code "fragment", but each code object can be referenced by zero or many function objects depending only on how many times the 'def' statement in the source was executed so far.

func (*PyFunctionObject) PyFunction_SetVectorcall

func (self *PyFunctionObject) PyFunction_SetVectorcall(_llcppg_param2 Vectorcallfunc)

llgo:link (*PyFunctionObject).PyFunction_SetVectorcall C.PyFunction_SetVectorcall

type PyFunction_WatchCallback

type PyFunction_WatchCallback = func(_llcppg_param1 PyFunction_WatchEvent, _llcppg_param2 *PyFunctionObject, _llcppg_param3 *PyObject) 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 PyFunction_WatchEvent

type PyFunction_WatchEvent c.Uint
const (
	PyFunction_EVENT_CREATE            PyFunction_WatchEvent = 0
	PyFunction_EVENT_DESTROY           PyFunction_WatchEvent = 1
	PyFunction_EVENT_MODIFY_CODE       PyFunction_WatchEvent = 2
	PyFunction_EVENT_MODIFY_DEFAULTS   PyFunction_WatchEvent = 3
	PyFunction_EVENT_MODIFY_KWDEFAULTS PyFunction_WatchEvent = 4
)

type PyGILState_STATE

type PyGILState_STATE c.Uint
const (
	PyGILState_LOCKED   PyGILState_STATE = 0
	PyGILState_UNLOCKED PyGILState_STATE = 1
)

func PyGILState_Ensure

func PyGILState_Ensure() PyGILState_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.

func (PyGILState_STATE) PyGILState_Release

func (self PyGILState_STATE) PyGILState_Release()

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.

llgo:link PyGILState_STATE.PyGILState_Release C.PyGILState_Release

type PyGenObject

type PyGenObject = X_PyGenObject

--- Generators ---------------------------------------------------------

func (*PyGenObject) PyGen_GetCode

func (self *PyGenObject) PyGen_GetCode() *PyCodeObject

llgo:link (*PyGenObject).PyGen_GetCode C.PyGen_GetCode

type PyGetSetDef

type PyGetSetDef struct {
	Name    *c.Char
	Get     Getter
	Set     Setter
	Doc     *c.Char
	Closure unsafe.Pointer
}

type PyGetSetDescrObject

type PyGetSetDescrObject struct {
	DCommon PyDescrObject
	DGetset *PyGetSetDef
}

type PyHashT

type PyHashT = PySsizeT

func Py_HashBuffer

func Py_HashBuffer(ptr unsafe.Pointer, len PySsizeT) PyHashT

func Py_HashPointer

func Py_HashPointer(ptr unsafe.Pointer) PyHashT

type PyHash_FuncDef

type PyHash_FuncDef struct {
	Hash     func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 PySsizeT) PyHashT
	Name     *c.Char
	HashBits c.Int
	SeedBits c.Int
}

hash function definition

func PyHash_GetFuncDef

func PyHash_GetFuncDef() *PyHash_FuncDef

type PyHeapTypeObject

type PyHeapTypeObject = X_heaptypeobject

The *real* layout of a type object when allocated on the heap

type PyImportErrorObject

type PyImportErrorObject struct {
	ObBase          PyObject
	Dict            *PyObject
	Args            *PyObject
	Notes           *PyObject
	Traceback       *PyObject
	Context         *PyObject
	Cause           *PyObject
	SuppressContext c.Char
	Msg             *PyObject
	Name            *PyObject
	Path            *PyObject
	NameFrom        *PyObject
}

type PyInitConfig

type PyInitConfig struct {
}

func PyInitConfig_Create

func PyInitConfig_Create() *PyInitConfig

func (*PyInitConfig) AddModule

func (self *PyInitConfig) AddModule(name *c.Char, initfunc func() *PyObject) c.Int

llgo:link (*PyInitConfig).AddModule C.PyInitConfig_AddModule

func (*PyInitConfig) Error

func (self *PyInitConfig) Error(err_msg **c.Char) c.Int

llgo:link (*PyInitConfig).Error C.PyInitConfig_GetError

func (*PyInitConfig) ExitCode

func (self *PyInitConfig) ExitCode(exitcode *c.Int) c.Int

llgo:link (*PyInitConfig).ExitCode C.PyInitConfig_GetExitCode

func (*PyInitConfig) Free

func (self *PyInitConfig) Free()

llgo:link (*PyInitConfig).Free C.PyInitConfig_Free

func (*PyInitConfig) HasOption

func (self *PyInitConfig) HasOption(name *c.Char) c.Int

llgo:link (*PyInitConfig).HasOption C.PyInitConfig_HasOption

func (*PyInitConfig) Int

func (self *PyInitConfig) Int(name *c.Char, value *c.Int64T) c.Int

llgo:link (*PyInitConfig).Int C.PyInitConfig_GetInt

func (*PyInitConfig) Py_InitializeFromInitConfig

func (self *PyInitConfig) Py_InitializeFromInitConfig() c.Int

llgo:link (*PyInitConfig).Py_InitializeFromInitConfig C.Py_InitializeFromInitConfig

func (*PyInitConfig) SetInt

func (self *PyInitConfig) SetInt(name *c.Char, value c.Int64T) c.Int

llgo:link (*PyInitConfig).SetInt C.PyInitConfig_SetInt

func (*PyInitConfig) SetStr

func (self *PyInitConfig) SetStr(name *c.Char, value *c.Char) c.Int

llgo:link (*PyInitConfig).SetStr C.PyInitConfig_SetStr

func (*PyInitConfig) SetStrList

func (self *PyInitConfig) SetStrList(name *c.Char, length c.SizeT, items **c.Char) c.Int

llgo:link (*PyInitConfig).SetStrList C.PyInitConfig_SetStrList

func (*PyInitConfig) Str

func (self *PyInitConfig) Str(name *c.Char, value **c.Char) c.Int

llgo:link (*PyInitConfig).Str C.PyInitConfig_GetStr

func (*PyInitConfig) StrList

func (self *PyInitConfig) StrList(name *c.Char, length *c.SizeT, items ***c.Char) c.Int

llgo:link (*PyInitConfig).StrList C.PyInitConfig_GetStrList

type PyInstanceMethodObject

type PyInstanceMethodObject struct {
	ObBase PyObject
	Func   *PyObject
}

type PyInterpreterConfig

type PyInterpreterConfig struct {
	UseMainObmalloc            c.Int
	AllowFork                  c.Int
	AllowExec                  c.Int
	AllowThreads               c.Int
	AllowDaemonThreads         c.Int
	CheckMultiInterpExtensions c.Int
	Gil                        c.Int
}

type PyInterpreterState

type PyInterpreterState = X_is

func PyInterpreterState_Get

func PyInterpreterState_Get() *PyInterpreterState

New in 3.9 */ /* 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 PyInterpreterState_Head

func PyInterpreterState_Head() *PyInterpreterState

func PyInterpreterState_Main

func PyInterpreterState_Main() *PyInterpreterState

Routines for advanced debuggers, requested by David Beazley. Don't use unless you know what you are doing!

func PyInterpreterState_New

func PyInterpreterState_New() *PyInterpreterState

func (*PyInterpreterState) Clear

func (self *PyInterpreterState) Clear()

llgo:link (*PyInterpreterState).Clear C.PyInterpreterState_Clear

func (*PyInterpreterState) Delete

func (self *PyInterpreterState) Delete()

llgo:link (*PyInterpreterState).Delete C.PyInterpreterState_Delete

func (*PyInterpreterState) Dict

func (self *PyInterpreterState) Dict() *PyObject

New in 3.8

llgo:link (*PyInterpreterState).Dict C.PyInterpreterState_GetDict

func (*PyInterpreterState) ID

func (self *PyInterpreterState) ID() c.Int64T

New in 3.7

llgo:link (*PyInterpreterState).ID C.PyInterpreterState_GetID

func (*PyInterpreterState) Next

func (self *PyInterpreterState) Next() *PyInterpreterState

llgo:link (*PyInterpreterState).Next C.PyInterpreterState_Next

func (*PyInterpreterState) PyThreadState_New

func (self *PyInterpreterState) PyThreadState_New() *PyThreadState

llgo:link (*PyInterpreterState).PyThreadState_New C.PyThreadState_New

func (*PyInterpreterState) PyUnstable_AtExit

func (self *PyInterpreterState) PyUnstable_AtExit(_llcppg_param2 AtexitDatacallbackfunc, _llcppg_param3 unsafe.Pointer) c.Int

llgo:link (*PyInterpreterState).PyUnstable_AtExit C.PyUnstable_AtExit

func (*PyInterpreterState) ThreadHead

func (self *PyInterpreterState) ThreadHead() *PyThreadState

llgo:link (*PyInterpreterState).ThreadHead C.PyInterpreterState_ThreadHead

func (*PyInterpreterState) X_PyInterpreterState_GetEvalFrameFunc

func (self *PyInterpreterState) X_PyInterpreterState_GetEvalFrameFunc() X_PyFrameEvalFunction

llgo:link (*PyInterpreterState).X_PyInterpreterState_GetEvalFrameFunc C._PyInterpreterState_GetEvalFrameFunc

func (*PyInterpreterState) X_PyInterpreterState_RequireIDRef

func (self *PyInterpreterState) X_PyInterpreterState_RequireIDRef(_llcppg_param2 c.Int)

llgo:link (*PyInterpreterState).X_PyInterpreterState_RequireIDRef C._PyInterpreterState_RequireIDRef

func (*PyInterpreterState) X_PyInterpreterState_RequiresIDRef

func (self *PyInterpreterState) X_PyInterpreterState_RequiresIDRef() c.Int

private interpreter helpers

llgo:link (*PyInterpreterState).X_PyInterpreterState_RequiresIDRef C._PyInterpreterState_RequiresIDRef

func (*PyInterpreterState) X_PyInterpreterState_SetEvalFrameFunc

func (self *PyInterpreterState) X_PyInterpreterState_SetEvalFrameFunc(eval_frame X_PyFrameEvalFunction)

llgo:link (*PyInterpreterState).X_PyInterpreterState_SetEvalFrameFunc C._PyInterpreterState_SetEvalFrameFunc

type PyIntptrT

type PyIntptrT = c.IntptrT

type PyListObject

type PyListObject struct {
	ObBase    PyVarObject
	ObItem    **PyObject
	Allocated PySsizeT
}

type PyLockStatus

type PyLockStatus c.Uint

Return status codes for Python lock acquisition. Chosen for maximum backwards compatibility, ie failure -> 0, success -> 1.

const (
	PY_LOCK_FAILURE  PyLockStatus = 0
	PY_LOCK_ACQUIRED PyLockStatus = 1
	PY_LOCK_INTR     PyLockStatus = 2
)

type PyLongExport

type PyLongExport struct {
	Value      c.Int64T
	Negative   c.Uint8T
	Ndigits    PySsizeT
	Digits     unsafe.Pointer
	X_reserved PyUintptrT
}

func (*PyLongExport) PyLong_FreeExport

func (self *PyLongExport) PyLong_FreeExport()

llgo:link (*PyLongExport).PyLong_FreeExport C.PyLong_FreeExport

type PyLongLayout

type PyLongLayout struct {
	BitsPerDigit    c.Uint8T
	DigitSize       c.Uint8T
	DigitsOrder     c.Int8T
	DigitEndianness c.Int8T
}

--- Import/Export API --------------------------------------------------

func PyLong_GetNativeLayout

func PyLong_GetNativeLayout() *PyLongLayout

type PyLongObject

type PyLongObject = X_longobject
var X_Py_FalseStruct PyLongObject

Don't use these directly

var X_Py_TrueStruct PyLongObject

func X_PyLong_FromDigits

func X_PyLong_FromDigits(negative c.Int, digit_count PySsizeT, digits *Digit) *PyLongObject

func X_PyLong_New

func X_PyLong_New(_llcppg_param1 PySsizeT) *PyLongObject

func (*PyLongObject) PyUnstable_Long_CompactValue

func (self *PyLongObject) PyUnstable_Long_CompactValue() PySsizeT

llgo:link (*PyLongObject).PyUnstable_Long_CompactValue C.PyUnstable_Long_CompactValue

func (*PyLongObject) PyUnstable_Long_IsCompact

func (self *PyLongObject) PyUnstable_Long_IsCompact() c.Int

llgo:link (*PyLongObject).PyUnstable_Long_IsCompact C.PyUnstable_Long_IsCompact

func (*PyLongObject) X_PyLong_AsByteArray

func (self *PyLongObject) X_PyLong_AsByteArray(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.

llgo:link (*PyLongObject).X_PyLong_AsByteArray C._PyLong_AsByteArray

func (*PyLongObject) X_PyLong_Copy

func (self *PyLongObject) X_PyLong_Copy() *PyObject

Return a copy of src.

llgo:link (*PyLongObject).X_PyLong_Copy C._PyLong_Copy

type PyLongWriter

type PyLongWriter struct {
}

func PyLongWriter_Create

func PyLongWriter_Create(negative c.Int, ndigits PySsizeT, digits *unsafe.Pointer) *PyLongWriter

func (*PyLongWriter) Discard

func (self *PyLongWriter) Discard()

llgo:link (*PyLongWriter).Discard C.PyLongWriter_Discard

func (*PyLongWriter) Finish

func (self *PyLongWriter) Finish() *PyObject

llgo:link (*PyLongWriter).Finish C.PyLongWriter_Finish

type PyMappingMethods

type PyMappingMethods struct {
	MpLength       Lenfunc
	MpSubscript    Binaryfunc
	MpAssSubscript Objobjargproc
}

type PyMemAllocatorDomain

type PyMemAllocatorDomain c.Uint
const (
	// PyMem_RawMalloc(), PyMem_RawRealloc() and PyMem_RawFree()
	PYMEM_DOMAIN_RAW PyMemAllocatorDomain = 0
	// PyMem_Malloc(), PyMem_Realloc() and PyMem_Free()
	PYMEM_DOMAIN_MEM PyMemAllocatorDomain = 1
	// PyObject_Malloc(), PyObject_Realloc() and PyObject_Free()
	PYMEM_DOMAIN_OBJ PyMemAllocatorDomain = 2
)

func (PyMemAllocatorDomain) PyMem_GetAllocator

func (self PyMemAllocatorDomain) PyMem_GetAllocator(allocator *PyMemAllocatorEx)

Get the memory block allocator of the specified domain.

llgo:link PyMemAllocatorDomain.PyMem_GetAllocator C.PyMem_GetAllocator

func (PyMemAllocatorDomain) PyMem_SetAllocator

func (self PyMemAllocatorDomain) PyMem_SetAllocator(allocator *PyMemAllocatorEx)

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.

llgo:link PyMemAllocatorDomain.PyMem_SetAllocator C.PyMem_SetAllocator

type PyMemAllocatorEx

type PyMemAllocatorEx 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)
}

type PyMemAllocatorName

type PyMemAllocatorName c.Uint
const (
	PYMEM_ALLOCATOR_NOT_SET        PyMemAllocatorName = 0
	PYMEM_ALLOCATOR_DEFAULT        PyMemAllocatorName = 1
	PYMEM_ALLOCATOR_DEBUG          PyMemAllocatorName = 2
	PYMEM_ALLOCATOR_MALLOC         PyMemAllocatorName = 3
	PYMEM_ALLOCATOR_MALLOC_DEBUG   PyMemAllocatorName = 4
	PYMEM_ALLOCATOR_PYMALLOC       PyMemAllocatorName = 5
	PYMEM_ALLOCATOR_PYMALLOC_DEBUG PyMemAllocatorName = 6
	PYMEM_ALLOCATOR_MIMALLOC       PyMemAllocatorName = 7
	PYMEM_ALLOCATOR_MIMALLOC_DEBUG PyMemAllocatorName = 8
)

type PyMemberDef

type PyMemberDef struct {
	Name   *c.Char
	Type   c.Int
	Offset PySsizeT
	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 PyMemberDescrObject

type PyMemberDescrObject struct {
	DCommon PyDescrObject
	DMember *PyMemberDef
}

type PyMemoryViewObject

type PyMemoryViewObject struct {
	ObBase      PyVarObject
	Mbuf        *X_PyManagedBufferObject
	Hash        PyHashT
	Flags       c.Int
	Exports     PySsizeT
	View        PyBuffer
	Weakreflist *PyObject
	ObArray     [1]PySsizeT
}

type PyMethodDef

type PyMethodDef struct {
	MlName  *c.Char
	MlMeth  PyCFunction
	MlFlags c.Int
	MlDoc   *c.Char
}

func (*PyMethodDef) PyCFunction_New

func (self *PyMethodDef) PyCFunction_New(_llcppg_param2 *PyObject) *PyObject

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.

llgo:link (*PyMethodDef).PyCFunction_New C.PyCFunction_New

func (*PyMethodDef) PyCFunction_NewEx

func (self *PyMethodDef) PyCFunction_NewEx(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

PyCFunction_NewEx is similar: on 3.9+, this calls PyCMethod_New.

llgo:link (*PyMethodDef).PyCFunction_NewEx C.PyCFunction_NewEx

func (*PyMethodDef) PyCMethod_New

func (self *PyMethodDef) PyCMethod_New(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject, _llcppg_param4 *PyTypeObject) *PyObject

llgo:link (*PyMethodDef).PyCMethod_New C.PyCMethod_New

type PyMethodDescrObject

type PyMethodDescrObject struct {
	DCommon    PyDescrObject
	DMethod    *PyMethodDef
	Vectorcall Vectorcallfunc
}

type PyMethodObject

type PyMethodObject struct {
	ObBase        PyObject
	ImFunc        *PyObject
	ImSelf        *PyObject
	ImWeakreflist *PyObject
	Vectorcall    Vectorcallfunc
}

type PyModuleDef

type PyModuleDef struct {
	MBase     PyModuleDef_Base
	MName     *c.Char
	MDoc      *c.Char
	MSize     PySsizeT
	MMethods  *PyMethodDef
	MSlots    *PyModuleDef_Slot
	MTraverse Traverseproc
	MClear    Inquiry
	MFree     Freefunc
}

func (*PyModuleDef) Init

func (self *PyModuleDef) Init() *PyObject

New in 3.5

llgo:link (*PyModuleDef).Init C.PyModuleDef_Init

func (*PyModuleDef) PyModule_Create2

func (self *PyModuleDef) PyModule_Create2(apiver c.Int) *PyObject

llgo:link (*PyModuleDef).PyModule_Create2 C.PyModule_Create2

func (*PyModuleDef) PyModule_FromDefAndSpec2

func (self *PyModuleDef) PyModule_FromDefAndSpec2(spec *PyObject, module_api_version c.Int) *PyObject

New in 3.5

llgo:link (*PyModuleDef).PyModule_FromDefAndSpec2 C.PyModule_FromDefAndSpec2

func (*PyModuleDef) PyState_FindModule

func (self *PyModuleDef) PyState_FindModule() *PyObject

llgo:link (*PyModuleDef).PyState_FindModule C.PyState_FindModule

func (*PyModuleDef) PyState_RemoveModule

func (self *PyModuleDef) PyState_RemoveModule() c.Int

llgo:link (*PyModuleDef).PyState_RemoveModule C.PyState_RemoveModule

type PyModuleDef_Base

type PyModuleDef_Base struct {
	ObBase PyObject
	MInit  func() *PyObject
	MIndex PySsizeT
	MCopy  *PyObject
}

type PyModuleDef_Slot

type PyModuleDef_Slot struct {
	Slot  c.Int
	Value unsafe.Pointer
}

New in 3.5

type PyMonitoringState

type PyMonitoringState = X_PyMonitoringState

func (*PyMonitoringState) PyMonitoring_EnterScope

func (self *PyMonitoringState) PyMonitoring_EnterScope(version *c.Uint64T, event_types *c.Uint8T, length PySsizeT) c.Int

llgo:link (*PyMonitoringState).PyMonitoring_EnterScope C.PyMonitoring_EnterScope

func (*PyMonitoringState) X_PyMonitoring_FireBranchEvent

func (self *PyMonitoringState) X_PyMonitoring_FireBranchEvent(codelike *PyObject, offset c.Int32T, target_offset *PyObject) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireBranchEvent C._PyMonitoring_FireBranchEvent

func (*PyMonitoringState) X_PyMonitoring_FireBranchLeftEvent

func (self *PyMonitoringState) X_PyMonitoring_FireBranchLeftEvent(codelike *PyObject, offset c.Int32T, target_offset *PyObject) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireBranchLeftEvent C._PyMonitoring_FireBranchLeftEvent

func (*PyMonitoringState) X_PyMonitoring_FireBranchRightEvent

func (self *PyMonitoringState) X_PyMonitoring_FireBranchRightEvent(codelike *PyObject, offset c.Int32T, target_offset *PyObject) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireBranchRightEvent C._PyMonitoring_FireBranchRightEvent

func (*PyMonitoringState) X_PyMonitoring_FireCRaiseEvent

func (self *PyMonitoringState) X_PyMonitoring_FireCRaiseEvent(codelike *PyObject, offset c.Int32T) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireCRaiseEvent C._PyMonitoring_FireCRaiseEvent

func (*PyMonitoringState) X_PyMonitoring_FireCReturnEvent

func (self *PyMonitoringState) X_PyMonitoring_FireCReturnEvent(codelike *PyObject, offset c.Int32T, retval *PyObject) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireCReturnEvent C._PyMonitoring_FireCReturnEvent

func (*PyMonitoringState) X_PyMonitoring_FireCallEvent

func (self *PyMonitoringState) X_PyMonitoring_FireCallEvent(codelike *PyObject, offset c.Int32T, callable *PyObject, arg0 *PyObject) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireCallEvent C._PyMonitoring_FireCallEvent

func (*PyMonitoringState) X_PyMonitoring_FireExceptionHandledEvent

func (self *PyMonitoringState) X_PyMonitoring_FireExceptionHandledEvent(codelike *PyObject, offset c.Int32T) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireExceptionHandledEvent C._PyMonitoring_FireExceptionHandledEvent

func (*PyMonitoringState) X_PyMonitoring_FireJumpEvent

func (self *PyMonitoringState) X_PyMonitoring_FireJumpEvent(codelike *PyObject, offset c.Int32T, target_offset *PyObject) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireJumpEvent C._PyMonitoring_FireJumpEvent

func (*PyMonitoringState) X_PyMonitoring_FireLineEvent

func (self *PyMonitoringState) X_PyMonitoring_FireLineEvent(codelike *PyObject, offset c.Int32T, lineno c.Int) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireLineEvent C._PyMonitoring_FireLineEvent

func (*PyMonitoringState) X_PyMonitoring_FirePyResumeEvent

func (self *PyMonitoringState) X_PyMonitoring_FirePyResumeEvent(codelike *PyObject, offset c.Int32T) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FirePyResumeEvent C._PyMonitoring_FirePyResumeEvent

func (*PyMonitoringState) X_PyMonitoring_FirePyReturnEvent

func (self *PyMonitoringState) X_PyMonitoring_FirePyReturnEvent(codelike *PyObject, offset c.Int32T, retval *PyObject) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FirePyReturnEvent C._PyMonitoring_FirePyReturnEvent

func (*PyMonitoringState) X_PyMonitoring_FirePyStartEvent

func (self *PyMonitoringState) X_PyMonitoring_FirePyStartEvent(codelike *PyObject, offset c.Int32T) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FirePyStartEvent C._PyMonitoring_FirePyStartEvent

func (*PyMonitoringState) X_PyMonitoring_FirePyThrowEvent

func (self *PyMonitoringState) X_PyMonitoring_FirePyThrowEvent(codelike *PyObject, offset c.Int32T) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FirePyThrowEvent C._PyMonitoring_FirePyThrowEvent

func (*PyMonitoringState) X_PyMonitoring_FirePyUnwindEvent

func (self *PyMonitoringState) X_PyMonitoring_FirePyUnwindEvent(codelike *PyObject, offset c.Int32T) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FirePyUnwindEvent C._PyMonitoring_FirePyUnwindEvent

func (*PyMonitoringState) X_PyMonitoring_FirePyYieldEvent

func (self *PyMonitoringState) X_PyMonitoring_FirePyYieldEvent(codelike *PyObject, offset c.Int32T, retval *PyObject) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FirePyYieldEvent C._PyMonitoring_FirePyYieldEvent

func (*PyMonitoringState) X_PyMonitoring_FireRaiseEvent

func (self *PyMonitoringState) X_PyMonitoring_FireRaiseEvent(codelike *PyObject, offset c.Int32T) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireRaiseEvent C._PyMonitoring_FireRaiseEvent

func (*PyMonitoringState) X_PyMonitoring_FireReraiseEvent

func (self *PyMonitoringState) X_PyMonitoring_FireReraiseEvent(codelike *PyObject, offset c.Int32T) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireReraiseEvent C._PyMonitoring_FireReraiseEvent

func (*PyMonitoringState) X_PyMonitoring_FireStopIterationEvent

func (self *PyMonitoringState) X_PyMonitoring_FireStopIterationEvent(codelike *PyObject, offset c.Int32T, value *PyObject) c.Int

llgo:link (*PyMonitoringState).X_PyMonitoring_FireStopIterationEvent C._PyMonitoring_FireStopIterationEvent

type PyMutex

type PyMutex 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 (*PyMutex) IsLocked

func (self *PyMutex) IsLocked() c.Int

exported function for checking if the mutex is locked

llgo:link (*PyMutex).IsLocked C.PyMutex_IsLocked

func (*PyMutex) Lock

func (self *PyMutex) Lock()

exported function for locking the mutex

llgo:link (*PyMutex).Lock C.PyMutex_Lock

func (*PyMutex) Unlock

func (self *PyMutex) Unlock()

exported function for unlocking the mutex

llgo:link (*PyMutex).Unlock C.PyMutex_Unlock

type PyNameErrorObject

type PyNameErrorObject struct {
	ObBase          PyObject
	Dict            *PyObject
	Args            *PyObject
	Notes           *PyObject
	Traceback       *PyObject
	Context         *PyObject
	Cause           *PyObject
	SuppressContext c.Char
	Name            *PyObject
}

type PyNumberMethods

type PyNumberMethods 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 PyODictObject

type PyODictObject = X_odictobject

type PyOSErrorObject

type PyOSErrorObject struct {
	ObBase          PyObject
	Dict            *PyObject
	Args            *PyObject
	Notes           *PyObject
	Traceback       *PyObject
	Context         *PyObject
	Cause           *PyObject
	SuppressContext c.Char
	Myerrno         *PyObject
	Strerror        *PyObject
	Filename        *PyObject
	Filename2       *PyObject
	Written         PySsizeT
}

type PyOSSighandlerT

type PyOSSighandlerT = func(_llcppg_param1 c.Int)

Signals

llgo:type C

func PyOSGetsig

func PyOSGetsig(_llcppg_param1 c.Int) PyOSSighandlerT

func PyOSSetsig

func PyOSSetsig(_llcppg_param1 c.Int, _llcppg_param2 PyOSSighandlerT) PyOSSighandlerT

type PyObject

type PyObject = X_object
var PyExc_ArithmeticError *PyObject
var PyExc_AssertionError *PyObject
var PyExc_AttributeError *PyObject
var PyExc_BaseException *PyObject

Predefined exceptions

var PyExc_BaseExceptionGroup *PyObject
var PyExc_BlockingIOError *PyObject
var PyExc_BrokenPipeError *PyObject
var PyExc_BufferError *PyObject
var PyExc_BytesWarning *PyObject
var PyExc_ChildProcessError *PyObject
var PyExc_ConnectionAbortedError *PyObject
var PyExc_ConnectionError *PyObject
var PyExc_ConnectionRefusedError *PyObject
var PyExc_ConnectionResetError *PyObject
var PyExc_DeprecationWarning *PyObject
var PyExc_EOFError *PyObject
var PyExc_EncodingWarning *PyObject
var PyExc_EnvironmentError *PyObject

Compatibility aliases

var PyExc_Exception *PyObject
var PyExc_FileExistsError *PyObject
var PyExc_FileNotFoundError *PyObject
var PyExc_FloatingPointError *PyObject
var PyExc_FutureWarning *PyObject
var PyExc_GeneratorExit *PyObject
var PyExc_IOError *PyObject
var PyExc_ImportError *PyObject
var PyExc_ImportWarning *PyObject
var PyExc_IndentationError *PyObject
var PyExc_IndexError *PyObject
var PyExc_InterruptedError *PyObject
var PyExc_IsADirectoryError *PyObject
var PyExc_KeyError *PyObject
var PyExc_KeyboardInterrupt *PyObject
var PyExc_LookupError *PyObject
var PyExc_MemoryError *PyObject
var PyExc_ModuleNotFoundError *PyObject
var PyExc_NameError *PyObject
var PyExc_NotADirectoryError *PyObject
var PyExc_NotImplementedError *PyObject
var PyExc_OSError *PyObject
var PyExc_OverflowError *PyObject
var PyExc_PendingDeprecationWarning *PyObject
var PyExc_PermissionError *PyObject
var PyExc_ProcessLookupError *PyObject
var PyExc_PythonFinalizationError *PyObject
var PyExc_RecursionError *PyObject
var PyExc_ReferenceError *PyObject
var PyExc_ResourceWarning *PyObject
var PyExc_RuntimeError *PyObject
var PyExc_RuntimeWarning *PyObject
var PyExc_StopAsyncIteration *PyObject
var PyExc_StopIteration *PyObject
var PyExc_SyntaxError *PyObject
var PyExc_SyntaxWarning *PyObject
var PyExc_SystemError *PyObject
var PyExc_SystemExit *PyObject
var PyExc_TabError *PyObject
var PyExc_TimeoutError *PyObject
var PyExc_TypeError *PyObject
var PyExc_UnboundLocalError *PyObject
var PyExc_UnicodeDecodeError *PyObject
var PyExc_UnicodeEncodeError *PyObject
var PyExc_UnicodeError *PyObject
var PyExc_UnicodeTranslateError *PyObject
var PyExc_UnicodeWarning *PyObject
var PyExc_UserWarning *PyObject
var PyExc_ValueError *PyObject
var PyExc_Warning *PyObject

Predefined warning categories

var PyExc_ZeroDivisionError *PyObject
var X_Py_EllipsisObject PyObject

Don't use this directly

var X_Py_NoneStruct PyObject

Don't use this directly

var X_Py_NotImplementedStruct PyObject

Don't use this directly

func PyBool_FromLong

func PyBool_FromLong(_llcppg_param1 c.Long) *PyObject

Function to return a bool from a C long

func PyByteArray_FromStringAndSize

func PyByteArray_FromStringAndSize(_llcppg_param1 *c.Char, _llcppg_param2 PySsizeT) *PyObject

func PyBytes_DecodeEscape

func PyBytes_DecodeEscape(_llcppg_param1 *c.Char, _llcppg_param2 PySsizeT, _llcppg_param3 *c.Char, _llcppg_param4 PySsizeT, _llcppg_param5 *c.Char) *PyObject

func PyBytes_FromFormat

func PyBytes_FromFormat(_llcppg_param1 *c.Char, __llgo_va_list ...any) *PyObject

func PyBytes_FromFormatV

func PyBytes_FromFormatV(_llcppg_param1 *c.Char, _llcppg_param2 c.VaList) *PyObject

func PyBytes_FromString

func PyBytes_FromString(_llcppg_param1 *c.Char) *PyObject

func PyBytes_FromStringAndSize

func PyBytes_FromStringAndSize(_llcppg_param1 *c.Char, _llcppg_param2 PySsizeT) *PyObject

func PyCapsule_New

func PyCapsule_New(pointer unsafe.Pointer, name *c.Char, destructor PyCapsule_Destructor) *PyObject

func PyCodec_Decoder

func PyCodec_Decoder(encoding *c.Char) *PyObject

Get a decoder function for the given encoding.

func PyCodec_Encoder

func PyCodec_Encoder(encoding *c.Char) *PyObject

Get an encoder function for the given encoding.

func PyCodec_IncrementalDecoder

func PyCodec_IncrementalDecoder(encoding *c.Char, errors *c.Char) *PyObject

Get an IncrementalDecoder object function for the given encoding.

func PyCodec_IncrementalEncoder

func PyCodec_IncrementalEncoder(encoding *c.Char, errors *c.Char) *PyObject

Get an IncrementalEncoder object for the given encoding.

func PyCodec_LookupError

func PyCodec_LookupError(name *c.Char) *PyObject

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 PyCodec_StreamReader

func PyCodec_StreamReader(encoding *c.Char, stream *PyObject, errors *c.Char) *PyObject

Get a StreamReader factory function for the given encoding.

func PyCodec_StreamWriter

func PyCodec_StreamWriter(encoding *c.Char, stream *PyObject, errors *c.Char) *PyObject

Get a StreamWriter factory function for the given encoding.

func PyComplex_FromDoubles

func PyComplex_FromDoubles(real c.Double, imag c.Double) *PyObject

func PyConfig_Get

func PyConfig_Get(name *c.Char) *PyObject

--- PyConfig_Get() -----------------------------------------

func PyConfig_Names

func PyConfig_Names() *PyObject

func PyContextVar_New

func PyContextVar_New(name *c.Char, default_value *PyObject) *PyObject

Create a new context variable.

default_value can be NULL.

func PyContext_CopyCurrent

func PyContext_CopyCurrent() *PyObject

func PyContext_New

func PyContext_New() *PyObject

func PyDict_New

func PyDict_New() *PyObject

func PyErr_GetHandledException

func PyErr_GetHandledException() *PyObject

func PyErr_GetRaisedException

func PyErr_GetRaisedException() *PyObject

func PyErr_NewException

func PyErr_NewException(name *c.Char, base *PyObject, dict *PyObject) *PyObject

Function to create a new exception

func PyErr_NewExceptionWithDoc

func PyErr_NewExceptionWithDoc(name *c.Char, doc *c.Char, base *PyObject, dict *PyObject) *PyObject

func PyErr_NoMemory

func PyErr_NoMemory() *PyObject

func PyErr_Occurred

func PyErr_Occurred() *PyObject

func PyErr_ProgramText

func PyErr_ProgramText(filename *c.Char, lineno c.Int) *PyObject

func PyEval_GetBuiltins

func PyEval_GetBuiltins() *PyObject

func PyEval_GetFrameBuiltins

func PyEval_GetFrameBuiltins() *PyObject

func PyEval_GetFrameGlobals

func PyEval_GetFrameGlobals() *PyObject

func PyEval_GetFrameLocals

func PyEval_GetFrameLocals() *PyObject

func PyEval_GetGlobals

func PyEval_GetGlobals() *PyObject

func PyEval_GetLocals

func PyEval_GetLocals() *PyObject

func PyFile_FromFd

func PyFile_FromFd(_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) *PyObject

func PyFile_NewStdPrinter

func PyFile_NewStdPrinter(_llcppg_param1 c.Int) *PyObject

The std printer acts as a preliminary sys.stderr until the new io infrastructure is in place.

func PyFile_OpenCode

func PyFile_OpenCode(utf8path *c.Char) *PyObject

func PyFloat_FromDouble

func PyFloat_FromDouble(_llcppg_param1 c.Double) *PyObject

Return Python float from C double.

func PyFloat_GetInfo

func PyFloat_GetInfo() *PyObject

func PyImport_AddModule

func PyImport_AddModule(name *c.Char) *PyObject

func PyImport_AddModuleRef

func PyImport_AddModuleRef(name *c.Char) *PyObject

func PyImport_ExecCodeModule

func PyImport_ExecCodeModule(name *c.Char, co *PyObject) *PyObject

func PyImport_ExecCodeModuleEx

func PyImport_ExecCodeModuleEx(name *c.Char, co *PyObject, pathname *c.Char) *PyObject

func PyImport_ExecCodeModuleWithPathnames

func PyImport_ExecCodeModuleWithPathnames(name *c.Char, co *PyObject, pathname *c.Char, cpathname *c.Char) *PyObject

func PyImport_GetModuleDict

func PyImport_GetModuleDict() *PyObject

func PyImport_ImportModule

func PyImport_ImportModule(name *c.Char) *PyObject

func PyImport_ImportModuleAttrString

func PyImport_ImportModuleAttrString(mod_name *c.Char, attr_name *c.Char) *PyObject

func PyImport_ImportModuleLevel

func PyImport_ImportModuleLevel(name *c.Char, globals *PyObject, locals *PyObject, fromlist *PyObject, level c.Int) *PyObject

func PyImport_ImportModuleNoBlock

func PyImport_ImportModuleNoBlock(name *c.Char) *PyObject

func PyList_New

func PyList_New(size PySsizeT) *PyObject

func PyLongFromSizeT

func PyLongFromSizeT(_llcppg_param1 c.SizeT) *PyObject

func PyLongFromSsizeT

func PyLongFromSsizeT(_llcppg_param1 PySsizeT) *PyObject

func PyLong_FromDouble

func PyLong_FromDouble(_llcppg_param1 c.Double) *PyObject

func PyLong_FromInt32

func PyLong_FromInt32(value c.Int32T) *PyObject

func PyLong_FromInt64

func PyLong_FromInt64(value c.Int64T) *PyObject

func PyLong_FromLong

func PyLong_FromLong(_llcppg_param1 c.Long) *PyObject

func PyLong_FromLongLong

func PyLong_FromLongLong(_llcppg_param1 c.LongLong) *PyObject

func PyLong_FromNativeBytes

func PyLong_FromNativeBytes(buffer unsafe.Pointer, n_bytes c.SizeT, flags c.Int) *PyObject

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 PyLong_FromString

func PyLong_FromString(_llcppg_param1 *c.Char, _llcppg_param2 **c.Char, _llcppg_param3 c.Int) *PyObject

func PyLong_FromUInt32

func PyLong_FromUInt32(value c.Uint32T) *PyObject

func PyLong_FromUInt64

func PyLong_FromUInt64(value c.Uint64T) *PyObject

func PyLong_FromUnsignedLong

func PyLong_FromUnsignedLong(_llcppg_param1 c.Ulong) *PyObject

func PyLong_FromUnsignedLongLong

func PyLong_FromUnsignedLongLong(_llcppg_param1 c.UlongLong) *PyObject

func PyLong_FromUnsignedNativeBytes

func PyLong_FromUnsignedNativeBytes(buffer unsafe.Pointer, n_bytes c.SizeT, flags c.Int) *PyObject

func PyLong_FromVoidPtr

func PyLong_FromVoidPtr(_llcppg_param1 unsafe.Pointer) *PyObject

func PyLong_GetInfo

func PyLong_GetInfo() *PyObject

func PyMember_GetOne

func PyMember_GetOne(_llcppg_param1 *c.Char, _llcppg_param2 *PyMemberDef) *PyObject

func PyMemoryView_FromMemory

func PyMemoryView_FromMemory(mem *c.Char, size PySsizeT, flags c.Int) *PyObject

func PyModule_New

func PyModule_New(name *c.Char) *PyObject

func PyODict_New

func PyODict_New() *PyObject

func PyRun_File

func PyRun_File(fp *c.FILE, p *c.Char, s c.Int, g *PyObject, l *PyObject) *PyObject

func PyRun_FileEx

func PyRun_FileEx(fp *c.FILE, p *c.Char, s c.Int, g *PyObject, l *PyObject, c c.Int) *PyObject

func PyRun_FileExFlags

func PyRun_FileExFlags(fp *c.FILE, filename *c.Char, start c.Int, globals *PyObject, locals *PyObject, closeit c.Int, flags *PyCompilerFlags) *PyObject

func PyRun_FileFlags

func PyRun_FileFlags(fp *c.FILE, p *c.Char, s c.Int, g *PyObject, l *PyObject, flags *PyCompilerFlags) *PyObject

func PyRun_String

func PyRun_String(str *c.Char, s c.Int, g *PyObject, l *PyObject) *PyObject

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 PyRun_StringFlags

func PyRun_StringFlags(_llcppg_param1 *c.Char, _llcppg_param2 c.Int, _llcppg_param3 *PyObject, _llcppg_param4 *PyObject, _llcppg_param5 *PyCompilerFlags) *PyObject

func PySys_GetObject

func PySys_GetObject(_llcppg_param1 *c.Char) *PyObject

func PySys_GetXOptions

func PySys_GetXOptions() *PyObject

func PyThreadState_GetDict

func PyThreadState_GetDict() *PyObject

func PyThread_GetInfo

func PyThread_GetInfo() *PyObject

func PyTuple_New

func PyTuple_New(size PySsizeT) *PyObject

func PyTuple_Pack

func PyTuple_Pack(_llcppg_param1 PySsizeT, __llgo_va_list ...any) *PyObject

func PyUnicodeDecodeError_Create

func PyUnicodeDecodeError_Create(encoding *c.Char, object *c.Char, length PySsizeT, start PySsizeT, end PySsizeT, reason *c.Char) *PyObject

create a UnicodeDecodeError object

func PyUnicode_Decode

func PyUnicode_Decode(s *c.Char, size PySsizeT, encoding *c.Char, errors *c.Char) *PyObject

Create a Unicode object by decoding the encoded string s of the given size.

func PyUnicode_DecodeASCII

func PyUnicode_DecodeASCII(string *c.Char, length PySsizeT, errors *c.Char) *PyObject

--- ASCII Codecs -------------------------------------------------------

Only 7-bit ASCII data is expected. All other codes generate errors.

func PyUnicode_DecodeCharmap

func PyUnicode_DecodeCharmap(string *c.Char, length PySsizeT, mapping *PyObject, errors *c.Char) *PyObject

--- Character Map Codecs -----------------------------------------------

This codec uses mappings to encode and decode characters.

Decoding mappings must map byte ordinals (integers in the range from 0 to 255) to Unicode strings, integers (which are then interpreted as Unicode ordinals) or None. Unmapped data bytes (ones which cause a LookupError) as well as mapped to None, 0xFFFE or '\ufffe' are treated as "undefined mapping" and cause an error.

Encoding mappings must map Unicode ordinal integers to bytes objects, integers in the range from 0 to 255 or None. Unmapped character ordinals (ones which cause a LookupError) as well as mapped to None are treated as "undefined mapping" and cause an error.

func PyUnicode_DecodeFSDefault

func PyUnicode_DecodeFSDefault(s *c.Char) *PyObject

Decode a null-terminated string from the Python filesystem encoding and error handler.

If the string length is known, use PyUnicode_DecodeFSDefaultAndSize().

func PyUnicode_DecodeFSDefaultAndSize

func PyUnicode_DecodeFSDefaultAndSize(s *c.Char, size PySsizeT) *PyObject

Decode a string from the Python filesystem encoding and error handler.

func PyUnicode_DecodeLatin1

func PyUnicode_DecodeLatin1(string *c.Char, length PySsizeT, errors *c.Char) *PyObject

--- Latin-1 Codecs -----------------------------------------------------

Note: Latin-1 corresponds to the first 256 Unicode ordinals.

func PyUnicode_DecodeLocale

func PyUnicode_DecodeLocale(str *c.Char, errors *c.Char) *PyObject

Similar to PyUnicode_DecodeLocaleAndSize(), but compute the string length using strlen().

func PyUnicode_DecodeLocaleAndSize

func PyUnicode_DecodeLocaleAndSize(str *c.Char, len PySsizeT, errors *c.Char) *PyObject

Decode a string from the current locale encoding. The decoder is strict if surrogateescape* is equal to zero, otherwise it uses the 'surrogateescape' error handler (PEP 383) to escape undecodable bytes. If a byte sequence can be decoded as a surrogate character and *surrogateescape* is not equal to zero, the byte sequence is escaped using the 'surrogateescape' error handler instead of being decoded. *str* must end with a null character but cannot contain embedded null characters.

func PyUnicode_DecodeRawUnicodeEscape

func PyUnicode_DecodeRawUnicodeEscape(string *c.Char, length PySsizeT, errors *c.Char) *PyObject

--- Raw-Unicode-Escape Codecs ------------------------------------------

func PyUnicode_DecodeUTF7

func PyUnicode_DecodeUTF7(string *c.Char, length PySsizeT, errors *c.Char) *PyObject

--- UTF-7 Codecs -------------------------------------------------------

func PyUnicode_DecodeUTF7Stateful

func PyUnicode_DecodeUTF7Stateful(string *c.Char, length PySsizeT, errors *c.Char, consumed *PySsizeT) *PyObject

func PyUnicode_DecodeUTF8

func PyUnicode_DecodeUTF8(string *c.Char, length PySsizeT, errors *c.Char) *PyObject

--- UTF-8 Codecs -------------------------------------------------------

func PyUnicode_DecodeUTF8Stateful

func PyUnicode_DecodeUTF8Stateful(string *c.Char, length PySsizeT, errors *c.Char, consumed *PySsizeT) *PyObject

func PyUnicode_DecodeUTF16

func PyUnicode_DecodeUTF16(string *c.Char, length PySsizeT, errors *c.Char, byteorder *c.Int) *PyObject

Decodes length bytes from a UTF-16 encoded buffer string and returns the corresponding Unicode object.

errors (if non-NULL) defines the error handling. It defaults to "strict".

If byteorder is non-NULL, the decoder starts decoding using the given byte order:

byteorder == -1: little endian byteorder == 0: native order byteorder == 1: big endian

In native mode, the first two bytes of the stream are checked for a BOM mark. If found, the BOM mark is analysed, the byte order adjusted and the BOM skipped. In the other modes, no BOM mark interpretation is done. After completion, *byteorder is set to the current byte order at the end of input data.

If byteorder is NULL, the codec starts in native order mode.

func PyUnicode_DecodeUTF16Stateful

func PyUnicode_DecodeUTF16Stateful(string *c.Char, length PySsizeT, errors *c.Char, byteorder *c.Int, consumed *PySsizeT) *PyObject

func PyUnicode_DecodeUTF32

func PyUnicode_DecodeUTF32(string *c.Char, length PySsizeT, errors *c.Char, byteorder *c.Int) *PyObject

Decodes length bytes from a UTF-32 encoded buffer string and returns the corresponding Unicode object.

errors (if non-NULL) defines the error handling. It defaults to "strict".

If byteorder is non-NULL, the decoder starts decoding using the given byte order:

byteorder == -1: little endian byteorder == 0: native order byteorder == 1: big endian

In native mode, the first four bytes of the stream are checked for a BOM mark. If found, the BOM mark is analysed, the byte order adjusted and the BOM skipped. In the other modes, no BOM mark interpretation is done. After completion, *byteorder is set to the current byte order at the end of input data.

If byteorder is NULL, the codec starts in native order mode.

func PyUnicode_DecodeUTF32Stateful

func PyUnicode_DecodeUTF32Stateful(string *c.Char, length PySsizeT, errors *c.Char, byteorder *c.Int, consumed *PySsizeT) *PyObject

func PyUnicode_DecodeUnicodeEscape

func PyUnicode_DecodeUnicodeEscape(string *c.Char, length PySsizeT, errors *c.Char) *PyObject

--- Unicode-Escape Codecs ----------------------------------------------

func PyUnicode_FromFormat

func PyUnicode_FromFormat(format *c.Char, __llgo_va_list ...any) *PyObject

func PyUnicode_FromFormatV

func PyUnicode_FromFormatV(format *c.Char, vargs c.VaList) *PyObject

func PyUnicode_FromKindAndData

func PyUnicode_FromKindAndData(kind c.Int, buffer unsafe.Pointer, size PySsizeT) *PyObject

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 PyUnicode_FromOrdinal

func PyUnicode_FromOrdinal(ordinal c.Int) *PyObject

Create a Unicode Object from the given Unicode code point ordinal.

The ordinal must be in range(0x110000). A ValueError is raised in case it is not.

func PyUnicode_FromString

func PyUnicode_FromString(u *c.Char) *PyObject

Similar to PyUnicode_FromUnicode(), but u points to null-terminated UTF-8 encoded bytes. The size is determined with strlen().

func PyUnicode_FromStringAndSize

func PyUnicode_FromStringAndSize(u *c.Char, size PySsizeT) *PyObject

Similar to PyUnicode_FromUnicode(), but u points to UTF-8 encoded bytes

func PyUnicode_FromWideChar

func PyUnicode_FromWideChar(w *c.WcharT, size PySsizeT) *PyObject

Create a Unicode Object from the wchar_t buffer w of the given size.

The buffer is copied into the new object.

func PyUnicode_InternFromString

func PyUnicode_InternFromString(u *c.Char) *PyObject

func PyUnicode_New

func PyUnicode_New(size PySsizeT, maxchar Py_UCS4) *PyObject

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 Py_BuildValue

func Py_BuildValue(_llcppg_param1 *c.Char, __llgo_va_list ...any) *PyObject

func Py_CompileString

func Py_CompileString(_llcppg_param1 *c.Char, _llcppg_param2 *c.Char, _llcppg_param3 c.Int) *PyObject

func Py_CompileStringExFlags

func Py_CompileStringExFlags(str *c.Char, filename *c.Char, start c.Int, flags *PyCompilerFlags, optimize c.Int) *PyObject

func Py_CompileStringFlags

func Py_CompileStringFlags(str *c.Char, filename *c.Char, start c.Int, flags *PyCompilerFlags) *PyObject

func Py_CompileStringObject

func Py_CompileStringObject(str *c.Char, filename *PyObject, start c.Int, flags *PyCompilerFlags, optimize c.Int) *PyObject

func Py_GetConstant

func Py_GetConstant(constant_id c.Uint) *PyObject

func Py_GetConstantBorrowed

func Py_GetConstantBorrowed(constant_id c.Uint) *PyObject

func Py_VaBuildValue

func Py_VaBuildValue(_llcppg_param1 *c.Char, _llcppg_param2 c.VaList) *PyObject

func X_PyDict_NewPresized

func X_PyDict_NewPresized(minused PySsizeT) *PyObject

func X_PyLong_FromByteArray

func X_PyLong_FromByteArray(bytes *uint8, n c.SizeT, little_endian c.Int, is_signed c.Int) *PyObject

_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_PySlice_FromIndices

func X_PySlice_FromIndices(start PySsizeT, stop PySsizeT) *PyObject

func X_PyStack_AsDict

func X_PyStack_AsDict(values **PyObject, kwnames *PyObject) *PyObject

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_PyThread_CurrentFrames

func X_PyThread_CurrentFrames() *PyObject

The implementation of sys._current_frames() Returns a dict mapping thread id to that thread's current frame.

func (*PyObject) AIter

func (self *PyObject) AIter() *PyObject

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 (*PyObject).AIter C.PyObject_GetAIter

func (*PyObject) ASCII

func (self *PyObject) ASCII() *PyObject

llgo:link (*PyObject).ASCII C.PyObject_ASCII

func (*PyObject) AsFileDescriptor

func (self *PyObject) AsFileDescriptor() c.Int

llgo:link (*PyObject).AsFileDescriptor C.PyObject_AsFileDescriptor

func (*PyObject) Attr

func (self *PyObject) Attr(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyObject).Attr C.PyObject_GetAttr

func (*PyObject) AttrString

func (self *PyObject) AttrString(_llcppg_param2 *c.Char) *PyObject

llgo:link (*PyObject).AttrString C.PyObject_GetAttrString

func (*PyObject) Buffer

func (self *PyObject) Buffer(view *PyBuffer, 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 (*PyObject).Buffer C.PyObject_GetBuffer

func (*PyObject) Bytes

func (self *PyObject) Bytes() *PyObject

llgo:link (*PyObject).Bytes C.PyObject_Bytes

func (*PyObject) Call

func (self *PyObject) Call(args *PyObject, kwargs *PyObject) *PyObject

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 (*PyObject).Call C.PyObject_Call

func (*PyObject) CallFinalizer

func (self *PyObject) CallFinalizer()

llgo:link (*PyObject).CallFinalizer C.PyObject_CallFinalizer

func (*PyObject) CallFinalizerFromDealloc

func (self *PyObject) CallFinalizerFromDealloc() c.Int

llgo:link (*PyObject).CallFinalizerFromDealloc C.PyObject_CallFinalizerFromDealloc

func (*PyObject) CallFunction

func (self *PyObject) CallFunction(format *c.Char, __llgo_va_list ...any) *PyObject

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 (*PyObject).CallFunction C.PyObject_CallFunction

func (*PyObject) CallFunctionObjArgs

func (self *PyObject) CallFunctionObjArgs(__llgo_va_list ...any) *PyObject

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 (*PyObject).CallFunctionObjArgs C.PyObject_CallFunctionObjArgs

func (*PyObject) CallMethod

func (self *PyObject) CallMethod(name *c.Char, format *c.Char, __llgo_va_list ...any) *PyObject

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 (*PyObject).CallMethod C.PyObject_CallMethod

func (*PyObject) CallMethodObjArgs

func (self *PyObject) CallMethodObjArgs(name *PyObject, __llgo_va_list ...any) *PyObject

Call the method named 'name' of object 'obj' with a variable number of C arguments. The C arguments are provided as PyObject* values, terminated by NULL.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: obj.name(*args).

llgo:link (*PyObject).CallMethodObjArgs C.PyObject_CallMethodObjArgs

func (*PyObject) CallNoArgs

func (self *PyObject) CallNoArgs() *PyObject

Call a callable Python object without any arguments

llgo:link (*PyObject).CallNoArgs C.PyObject_CallNoArgs

func (*PyObject) CallObject

func (self *PyObject) CallObject(args *PyObject) *PyObject

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 (*PyObject).CallObject C.PyObject_CallObject

func (*PyObject) CallOneArg

func (self *PyObject) CallOneArg(arg *PyObject) *PyObject

llgo:link (*PyObject).CallOneArg C.PyObject_CallOneArg

func (*PyObject) CheckBuffer

func (self *PyObject) CheckBuffer() c.Int

Return 1 if the getbuffer function is available, otherwise return 0.

llgo:link (*PyObject).CheckBuffer C.PyObject_CheckBuffer

func (*PyObject) ClearManagedDict

func (self *PyObject) ClearManagedDict()

llgo:link (*PyObject).ClearManagedDict C.PyObject_ClearManagedDict

func (*PyObject) ClearWeakRefs

func (self *PyObject) ClearWeakRefs()

llgo:link (*PyObject).ClearWeakRefs C.PyObject_ClearWeakRefs

func (*PyObject) CopyData

func (self *PyObject) CopyData(src *PyObject) 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 (*PyObject).CopyData C.PyObject_CopyData

func (*PyObject) DelAttr

func (self *PyObject) DelAttr(name *PyObject) c.Int

llgo:link (*PyObject).DelAttr C.PyObject_DelAttr

func (*PyObject) DelAttrString

func (self *PyObject) DelAttrString(name *c.Char) c.Int

llgo:link (*PyObject).DelAttrString C.PyObject_DelAttrString

func (*PyObject) DelItem

func (self *PyObject) DelItem(key *PyObject) 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 (*PyObject).DelItem C.PyObject_DelItem

func (*PyObject) DelItemString

func (self *PyObject) 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 (*PyObject).DelItemString C.PyObject_DelItemString

func (*PyObject) Dir

func (self *PyObject) Dir() *PyObject

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 (*PyObject).Dir C.PyObject_Dir

func (*PyObject) Format

func (self *PyObject) Format(format_spec *PyObject) *PyObject

Takes an arbitrary object and returns the result of calling obj.__format__(format_spec).

llgo:link (*PyObject).Format C.PyObject_Format

func (*PyObject) GC_IsFinalized

func (self *PyObject) GC_IsFinalized() c.Int

llgo:link (*PyObject).GC_IsFinalized C.PyObject_GC_IsFinalized

func (*PyObject) GC_IsTracked

func (self *PyObject) GC_IsTracked() c.Int

llgo:link (*PyObject).GC_IsTracked C.PyObject_GC_IsTracked

func (*PyObject) GET_WEAKREFS_LISTPTR

func (self *PyObject) GET_WEAKREFS_LISTPTR() **PyObject

llgo:link (*PyObject).GET_WEAKREFS_LISTPTR C.PyObject_GET_WEAKREFS_LISTPTR

func (*PyObject) GenericGetAttr

func (self *PyObject) GenericGetAttr(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyObject).GenericGetAttr C.PyObject_GenericGetAttr

func (*PyObject) GenericGetDict

func (self *PyObject) GenericGetDict(_llcppg_param2 unsafe.Pointer) *PyObject

llgo:link (*PyObject).GenericGetDict C.PyObject_GenericGetDict

func (*PyObject) GenericHash

func (self *PyObject) GenericHash() PyHashT

llgo:link (*PyObject).GenericHash C.PyObject_GenericHash

func (*PyObject) GenericSetAttr

func (self *PyObject) GenericSetAttr(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject) c.Int

llgo:link (*PyObject).GenericSetAttr C.PyObject_GenericSetAttr

func (*PyObject) GenericSetDict

func (self *PyObject) GenericSetDict(_llcppg_param2 *PyObject, _llcppg_param3 unsafe.Pointer) c.Int

llgo:link (*PyObject).GenericSetDict C.PyObject_GenericSetDict

func (*PyObject) HasAttr

func (self *PyObject) HasAttr(_llcppg_param2 *PyObject) c.Int

llgo:link (*PyObject).HasAttr C.PyObject_HasAttr

func (*PyObject) HasAttrString

func (self *PyObject) HasAttrString(_llcppg_param2 *c.Char) c.Int

llgo:link (*PyObject).HasAttrString C.PyObject_HasAttrString

func (*PyObject) HasAttrStringWithError

func (self *PyObject) HasAttrStringWithError(_llcppg_param2 *c.Char) c.Int

llgo:link (*PyObject).HasAttrStringWithError C.PyObject_HasAttrStringWithError

func (*PyObject) HasAttrWithError

func (self *PyObject) HasAttrWithError(_llcppg_param2 *PyObject) c.Int

llgo:link (*PyObject).HasAttrWithError C.PyObject_HasAttrWithError

func (*PyObject) Hash

func (self *PyObject) Hash() PyHashT

llgo:link (*PyObject).Hash C.PyObject_Hash

func (*PyObject) HashNotImplemented

func (self *PyObject) HashNotImplemented() PyHashT

llgo:link (*PyObject).HashNotImplemented C.PyObject_HashNotImplemented

func (*PyObject) IS_GC

func (self *PyObject) IS_GC() c.Int

Test if an object implements the garbage collector protocol

llgo:link (*PyObject).IS_GC C.PyObject_IS_GC

func (*PyObject) Init

func (self *PyObject) Init(_llcppg_param2 *PyTypeObject) *PyObject

Functions

llgo:link (*PyObject).Init C.PyObject_Init

func (*PyObject) IsInstance

func (self *PyObject) IsInstance(typeorclass *PyObject) c.Int

isinstance(object, typeorclass)

llgo:link (*PyObject).IsInstance C.PyObject_IsInstance

func (*PyObject) IsSubclass

func (self *PyObject) IsSubclass(typeorclass *PyObject) c.Int

issubclass(object, typeorclass)

llgo:link (*PyObject).IsSubclass C.PyObject_IsSubclass

func (*PyObject) IsTrue

func (self *PyObject) IsTrue() c.Int

llgo:link (*PyObject).IsTrue C.PyObject_IsTrue

func (*PyObject) Item

func (self *PyObject) Item(key *PyObject) *PyObject

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 (*PyObject).Item C.PyObject_GetItem

func (*PyObject) ItemData

func (self *PyObject) ItemData() unsafe.Pointer

llgo:link (*PyObject).ItemData C.PyObject_GetItemData

func (*PyObject) Iter

func (self *PyObject) Iter() *PyObject

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 (*PyObject).Iter C.PyObject_GetIter

func (*PyObject) Length

func (self *PyObject) Length() PySsizeT

llgo:link (*PyObject).Length C.PyObject_Length

func (*PyObject) LengthHint

func (self *PyObject) LengthHint(_llcppg_param2 PySsizeT) PySsizeT

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 (*PyObject).LengthHint C.PyObject_LengthHint

func (*PyObject) Not

func (self *PyObject) Not() c.Int

llgo:link (*PyObject).Not C.PyObject_Not

func (*PyObject) OptionalAttr

func (self *PyObject) OptionalAttr(_llcppg_param2 *PyObject, _llcppg_param3 **PyObject) c.Int

llgo:link (*PyObject).OptionalAttr C.PyObject_GetOptionalAttr

func (*PyObject) OptionalAttrString

func (self *PyObject) OptionalAttrString(_llcppg_param2 *c.Char, _llcppg_param3 **PyObject) c.Int

llgo:link (*PyObject).OptionalAttrString C.PyObject_GetOptionalAttrString

func (*PyObject) Print

func (self *PyObject) Print(_llcppg_param2 *c.FILE, _llcppg_param3 c.Int) c.Int

llgo:link (*PyObject).Print C.PyObject_Print

func (*PyObject) PyAIter_Check

func (self *PyObject) PyAIter_Check() c.Int

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

This function always succeeds.

llgo:link (*PyObject).PyAIter_Check C.PyAIter_Check

func (*PyObject) PyArg_Parse

func (self *PyObject) PyArg_Parse(_llcppg_param2 *c.Char, __llgo_va_list ...any) c.Int

llgo:link (*PyObject).PyArg_Parse C.PyArg_Parse

func (*PyObject) PyArg_ParseTuple

func (self *PyObject) PyArg_ParseTuple(_llcppg_param2 *c.Char, __llgo_va_list ...any) c.Int

llgo:link (*PyObject).PyArg_ParseTuple C.PyArg_ParseTuple

func (*PyObject) PyArg_ParseTupleAndKeywords

func (self *PyObject) PyArg_ParseTupleAndKeywords(_llcppg_param2 *PyObject, _llcppg_param3 *c.Char, _llcppg_param4 **c.Char, __llgo_va_list ...any) c.Int

llgo:link (*PyObject).PyArg_ParseTupleAndKeywords C.PyArg_ParseTupleAndKeywords

func (*PyObject) PyArg_UnpackTuple

func (self *PyObject) PyArg_UnpackTuple(_llcppg_param2 *c.Char, _llcppg_param3 PySsizeT, _llcppg_param4 PySsizeT, __llgo_va_list ...any) c.Int

llgo:link (*PyObject).PyArg_UnpackTuple C.PyArg_UnpackTuple

func (*PyObject) PyArg_VaParse

func (self *PyObject) PyArg_VaParse(_llcppg_param2 *c.Char, _llcppg_param3 c.VaList) c.Int

llgo:link (*PyObject).PyArg_VaParse C.PyArg_VaParse

func (*PyObject) PyArg_VaParseTupleAndKeywords

func (self *PyObject) PyArg_VaParseTupleAndKeywords(_llcppg_param2 *PyObject, _llcppg_param3 *c.Char, _llcppg_param4 **c.Char, _llcppg_param5 c.VaList) c.Int

llgo:link (*PyObject).PyArg_VaParseTupleAndKeywords C.PyArg_VaParseTupleAndKeywords

func (*PyObject) PyArg_ValidateKeywordArguments

func (self *PyObject) PyArg_ValidateKeywordArguments() c.Int

llgo:link (*PyObject).PyArg_ValidateKeywordArguments C.PyArg_ValidateKeywordArguments

func (*PyObject) PyByteArray_AsString

func (self *PyObject) PyByteArray_AsString() *c.Char

llgo:link (*PyObject).PyByteArray_AsString C.PyByteArray_AsString

func (*PyObject) PyByteArray_Concat

func (self *PyObject) PyByteArray_Concat(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyObject).PyByteArray_Concat C.PyByteArray_Concat

func (*PyObject) PyByteArray_FromObject

func (self *PyObject) PyByteArray_FromObject() *PyObject

Direct API functions

llgo:link (*PyObject).PyByteArray_FromObject C.PyByteArray_FromObject

func (*PyObject) PyByteArray_Resize

func (self *PyObject) PyByteArray_Resize(_llcppg_param2 PySsizeT) c.Int

llgo:link (*PyObject).PyByteArray_Resize C.PyByteArray_Resize

func (*PyObject) PyByteArray_Size

func (self *PyObject) PyByteArray_Size() PySsizeT

llgo:link (*PyObject).PyByteArray_Size C.PyByteArray_Size

func (*PyObject) PyBytes_AsString

func (self *PyObject) PyBytes_AsString() *c.Char

llgo:link (*PyObject).PyBytes_AsString C.PyBytes_AsString

func (*PyObject) PyBytes_AsStringAndSize

func (self *PyObject) PyBytes_AsStringAndSize(s **c.Char, len *PySsizeT) 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 (*PyObject).PyBytes_AsStringAndSize C.PyBytes_AsStringAndSize

func (*PyObject) PyBytes_FromObject

func (self *PyObject) PyBytes_FromObject() *PyObject

llgo:link (*PyObject).PyBytes_FromObject C.PyBytes_FromObject

func (*PyObject) PyBytes_Join

func (self *PyObject) PyBytes_Join(iterable *PyObject) *PyObject

llgo:link (*PyObject).PyBytes_Join C.PyBytes_Join

func (*PyObject) PyBytes_Repr

func (self *PyObject) PyBytes_Repr(_llcppg_param2 c.Int) *PyObject

llgo:link (*PyObject).PyBytes_Repr C.PyBytes_Repr

func (*PyObject) PyBytes_Size

func (self *PyObject) PyBytes_Size() PySsizeT

llgo:link (*PyObject).PyBytes_Size C.PyBytes_Size

func (*PyObject) PyCFunction_GetFlags

func (self *PyObject) PyCFunction_GetFlags() c.Int

llgo:link (*PyObject).PyCFunction_GetFlags C.PyCFunction_GetFlags

func (*PyObject) PyCFunction_GetFunction

func (self *PyObject) PyCFunction_GetFunction() PyCFunction

llgo:link (*PyObject).PyCFunction_GetFunction C.PyCFunction_GetFunction

func (*PyObject) PyCFunction_GetSelf

func (self *PyObject) PyCFunction_GetSelf() *PyObject

llgo:link (*PyObject).PyCFunction_GetSelf C.PyCFunction_GetSelf

func (*PyObject) PyCallIter_New

func (self *PyObject) PyCallIter_New(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyObject).PyCallIter_New C.PyCallIter_New

func (*PyObject) PyCallable_Check

func (self *PyObject) PyCallable_Check() c.Int

llgo:link (*PyObject).PyCallable_Check C.PyCallable_Check

func (*PyObject) PyCapsule_GetContext

func (self *PyObject) PyCapsule_GetContext() unsafe.Pointer

llgo:link (*PyObject).PyCapsule_GetContext C.PyCapsule_GetContext

func (*PyObject) PyCapsule_GetDestructor

func (self *PyObject) PyCapsule_GetDestructor() PyCapsule_Destructor

llgo:link (*PyObject).PyCapsule_GetDestructor C.PyCapsule_GetDestructor

func (*PyObject) PyCapsule_GetName

func (self *PyObject) PyCapsule_GetName() *c.Char

llgo:link (*PyObject).PyCapsule_GetName C.PyCapsule_GetName

func (*PyObject) PyCapsule_GetPointer

func (self *PyObject) PyCapsule_GetPointer(name *c.Char) unsafe.Pointer

llgo:link (*PyObject).PyCapsule_GetPointer C.PyCapsule_GetPointer

func (*PyObject) PyCapsule_IsValid

func (self *PyObject) PyCapsule_IsValid(name *c.Char) c.Int

llgo:link (*PyObject).PyCapsule_IsValid C.PyCapsule_IsValid

func (*PyObject) PyCapsule_SetContext

func (self *PyObject) PyCapsule_SetContext(context unsafe.Pointer) c.Int

llgo:link (*PyObject).PyCapsule_SetContext C.PyCapsule_SetContext

func (*PyObject) PyCapsule_SetDestructor

func (self *PyObject) PyCapsule_SetDestructor(destructor PyCapsule_Destructor) c.Int

llgo:link (*PyObject).PyCapsule_SetDestructor C.PyCapsule_SetDestructor

func (*PyObject) PyCapsule_SetName

func (self *PyObject) PyCapsule_SetName(name *c.Char) c.Int

llgo:link (*PyObject).PyCapsule_SetName C.PyCapsule_SetName

func (*PyObject) PyCapsule_SetPointer

func (self *PyObject) PyCapsule_SetPointer(pointer unsafe.Pointer) c.Int

llgo:link (*PyObject).PyCapsule_SetPointer C.PyCapsule_SetPointer

func (*PyObject) PyCell_Get

func (self *PyObject) PyCell_Get() *PyObject

llgo:link (*PyObject).PyCell_Get C.PyCell_Get

func (*PyObject) PyCell_New

func (self *PyObject) PyCell_New() *PyObject

llgo:link (*PyObject).PyCell_New C.PyCell_New

func (*PyObject) PyCell_Set

func (self *PyObject) PyCell_Set(_llcppg_param2 *PyObject) c.Int

llgo:link (*PyObject).PyCell_Set C.PyCell_Set

func (*PyObject) PyClassMethod_New

func (self *PyObject) PyClassMethod_New() *PyObject

llgo:link (*PyObject).PyClassMethod_New C.PyClassMethod_New

func (*PyObject) PyCode_Optimize

func (self *PyObject) PyCode_Optimize(consts *PyObject, names *PyObject, lnotab *PyObject) *PyObject

llgo:link (*PyObject).PyCode_Optimize C.PyCode_Optimize

func (*PyObject) PyCodec_BackslashReplaceErrors

func (self *PyObject) PyCodec_BackslashReplaceErrors() *PyObject

replace the unicode encode error with backslash escapes (\x, \u and \U)

llgo:link (*PyObject).PyCodec_BackslashReplaceErrors C.PyCodec_BackslashReplaceErrors

func (*PyObject) PyCodec_Decode

func (self *PyObject) PyCodec_Decode(encoding *c.Char, errors *c.Char) *PyObject

Generic codec based decoding API.

object is passed through the decoder function found for the given encoding using the error handling method defined by errors. errors may be NULL to use the default method defined for the codec.

Raises a LookupError in case no encoder can be found.

llgo:link (*PyObject).PyCodec_Decode C.PyCodec_Decode

func (*PyObject) PyCodec_Encode

func (self *PyObject) PyCodec_Encode(encoding *c.Char, errors *c.Char) *PyObject

Generic codec based encoding API.

object is passed through the encoder function found for the given encoding using the error handling method defined by errors. errors may be NULL to use the default method defined for the codec.

Raises a LookupError in case no encoder can be found.

llgo:link (*PyObject).PyCodec_Encode C.PyCodec_Encode

func (*PyObject) PyCodec_IgnoreErrors

func (self *PyObject) PyCodec_IgnoreErrors() *PyObject

ignore the unicode error, skipping the faulty input

llgo:link (*PyObject).PyCodec_IgnoreErrors C.PyCodec_IgnoreErrors

func (*PyObject) PyCodec_NameReplaceErrors

func (self *PyObject) PyCodec_NameReplaceErrors() *PyObject

replace the unicode encode error with backslash escapes (\N, \x, \u and \U)

llgo:link (*PyObject).PyCodec_NameReplaceErrors C.PyCodec_NameReplaceErrors

func (*PyObject) PyCodec_Register

func (self *PyObject) PyCodec_Register() c.Int

Register a new codec search function.

As side effect, this tries to load the encodings package, if not yet done, to make sure that it is always first in the list of search functions.

The search_function's refcount is incremented by this function.

llgo:link (*PyObject).PyCodec_Register C.PyCodec_Register

func (*PyObject) PyCodec_ReplaceErrors

func (self *PyObject) PyCodec_ReplaceErrors() *PyObject

replace the unicode encode error with ? or U+FFFD

llgo:link (*PyObject).PyCodec_ReplaceErrors C.PyCodec_ReplaceErrors

func (*PyObject) PyCodec_StrictErrors

func (self *PyObject) PyCodec_StrictErrors() *PyObject

raise exc as an exception

llgo:link (*PyObject).PyCodec_StrictErrors C.PyCodec_StrictErrors

func (*PyObject) PyCodec_Unregister

func (self *PyObject) PyCodec_Unregister() c.Int

Unregister a codec search function and clear the registry's cache. If the search function is not registered, do nothing. Return 0 on success. Raise an exception and return -1 on error.

llgo:link (*PyObject).PyCodec_Unregister C.PyCodec_Unregister

func (*PyObject) PyCodec_XMLCharRefReplaceErrors

func (self *PyObject) PyCodec_XMLCharRefReplaceErrors() *PyObject

replace the unicode encode error with XML character references

llgo:link (*PyObject).PyCodec_XMLCharRefReplaceErrors C.PyCodec_XMLCharRefReplaceErrors

func (*PyObject) PyComplex_AsCComplex

func (self *PyObject) PyComplex_AsCComplex() PyComplex

llgo:link (*PyObject).PyComplex_AsCComplex C.PyComplex_AsCComplex

func (*PyObject) PyComplex_ImagAsDouble

func (self *PyObject) PyComplex_ImagAsDouble() c.Double

llgo:link (*PyObject).PyComplex_ImagAsDouble C.PyComplex_ImagAsDouble

func (*PyObject) PyComplex_RealAsDouble

func (self *PyObject) PyComplex_RealAsDouble() c.Double

llgo:link (*PyObject).PyComplex_RealAsDouble C.PyComplex_RealAsDouble

func (*PyObject) PyContextVar_Get

func (self *PyObject) PyContextVar_Get(default_value *PyObject, value **PyObject) 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 (*PyObject).PyContextVar_Get C.PyContextVar_Get

func (*PyObject) PyContextVar_Reset

func (self *PyObject) PyContextVar_Reset(token *PyObject) c.Int

Reset a variable to its previous value. Returns 0 on success, -1 on error.

llgo:link (*PyObject).PyContextVar_Reset C.PyContextVar_Reset

func (*PyObject) PyContextVar_Set

func (self *PyObject) PyContextVar_Set(value *PyObject) *PyObject

Set a new value for the variable. Returns NULL if an error occurs.

llgo:link (*PyObject).PyContextVar_Set C.PyContextVar_Set

func (*PyObject) PyContext_Copy

func (self *PyObject) PyContext_Copy() *PyObject

llgo:link (*PyObject).PyContext_Copy C.PyContext_Copy

func (*PyObject) PyContext_Enter

func (self *PyObject) PyContext_Enter() c.Int

llgo:link (*PyObject).PyContext_Enter C.PyContext_Enter

func (*PyObject) PyContext_Exit

func (self *PyObject) PyContext_Exit() c.Int

llgo:link (*PyObject).PyContext_Exit C.PyContext_Exit

func (*PyObject) PyDescr_IsData

func (self *PyObject) PyDescr_IsData() c.Int

llgo:link (*PyObject).PyDescr_IsData C.PyDescr_IsData

func (*PyObject) PyDictProxy_New

func (self *PyObject) PyDictProxy_New() *PyObject

llgo:link (*PyObject).PyDictProxy_New C.PyDictProxy_New

func (*PyObject) PyDict_Clear

func (self *PyObject) PyDict_Clear()

llgo:link (*PyObject).PyDict_Clear C.PyDict_Clear

func (*PyObject) PyDict_Contains

func (self *PyObject) PyDict_Contains(key *PyObject) c.Int

llgo:link (*PyObject).PyDict_Contains C.PyDict_Contains

func (*PyObject) PyDict_ContainsString

func (self *PyObject) PyDict_ContainsString(key *c.Char) c.Int

llgo:link (*PyObject).PyDict_ContainsString C.PyDict_ContainsString

func (*PyObject) PyDict_Copy

func (self *PyObject) PyDict_Copy() *PyObject

llgo:link (*PyObject).PyDict_Copy C.PyDict_Copy

func (*PyObject) PyDict_DelItem

func (self *PyObject) PyDict_DelItem(key *PyObject) c.Int

llgo:link (*PyObject).PyDict_DelItem C.PyDict_DelItem

func (*PyObject) PyDict_DelItemString

func (self *PyObject) PyDict_DelItemString(key *c.Char) c.Int

llgo:link (*PyObject).PyDict_DelItemString C.PyDict_DelItemString

func (*PyObject) PyDict_GetItem

func (self *PyObject) PyDict_GetItem(key *PyObject) *PyObject

llgo:link (*PyObject).PyDict_GetItem C.PyDict_GetItem

func (*PyObject) PyDict_GetItemRef

func (self *PyObject) PyDict_GetItemRef(key *PyObject, result **PyObject) 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 (*PyObject).PyDict_GetItemRef C.PyDict_GetItemRef

func (*PyObject) PyDict_GetItemString

func (self *PyObject) PyDict_GetItemString(key *c.Char) *PyObject

llgo:link (*PyObject).PyDict_GetItemString C.PyDict_GetItemString

func (*PyObject) PyDict_GetItemStringRef

func (self *PyObject) PyDict_GetItemStringRef(key *c.Char, result **PyObject) c.Int

llgo:link (*PyObject).PyDict_GetItemStringRef C.PyDict_GetItemStringRef

func (*PyObject) PyDict_GetItemWithError

func (self *PyObject) PyDict_GetItemWithError(key *PyObject) *PyObject

llgo:link (*PyObject).PyDict_GetItemWithError C.PyDict_GetItemWithError

func (*PyObject) PyDict_Items

func (self *PyObject) PyDict_Items() *PyObject

llgo:link (*PyObject).PyDict_Items C.PyDict_Items

func (*PyObject) PyDict_Keys

func (self *PyObject) PyDict_Keys() *PyObject

llgo:link (*PyObject).PyDict_Keys C.PyDict_Keys

func (*PyObject) PyDict_Merge

func (self *PyObject) PyDict_Merge(other *PyObject, 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 (*PyObject).PyDict_Merge C.PyDict_Merge

func (*PyObject) PyDict_MergeFromSeq2

func (self *PyObject) PyDict_MergeFromSeq2(seq2 *PyObject, 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 (*PyObject).PyDict_MergeFromSeq2 C.PyDict_MergeFromSeq2

func (*PyObject) PyDict_Next

func (self *PyObject) PyDict_Next(pos *PySsizeT, key **PyObject, value **PyObject) c.Int

llgo:link (*PyObject).PyDict_Next C.PyDict_Next

func (*PyObject) PyDict_Pop

func (self *PyObject) PyDict_Pop(key *PyObject, result **PyObject) c.Int

llgo:link (*PyObject).PyDict_Pop C.PyDict_Pop

func (*PyObject) PyDict_PopString

func (self *PyObject) PyDict_PopString(key *c.Char, result **PyObject) c.Int

llgo:link (*PyObject).PyDict_PopString C.PyDict_PopString

func (*PyObject) PyDict_SetDefault

func (self *PyObject) PyDict_SetDefault(key *PyObject, defaultobj *PyObject) *PyObject

llgo:link (*PyObject).PyDict_SetDefault C.PyDict_SetDefault

func (*PyObject) PyDict_SetDefaultRef

func (self *PyObject) PyDict_SetDefaultRef(key *PyObject, default_value *PyObject, result **PyObject) 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 (*PyObject).PyDict_SetDefaultRef C.PyDict_SetDefaultRef

func (*PyObject) PyDict_SetItem

func (self *PyObject) PyDict_SetItem(key *PyObject, item *PyObject) c.Int

llgo:link (*PyObject).PyDict_SetItem C.PyDict_SetItem

func (*PyObject) PyDict_SetItemString

func (self *PyObject) PyDict_SetItemString(key *c.Char, item *PyObject) c.Int

llgo:link (*PyObject).PyDict_SetItemString C.PyDict_SetItemString

func (*PyObject) PyDict_Size

func (self *PyObject) PyDict_Size() PySsizeT

llgo:link (*PyObject).PyDict_Size C.PyDict_Size

func (*PyObject) PyDict_Update

func (self *PyObject) PyDict_Update(other *PyObject) c.Int

PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1).

llgo:link (*PyObject).PyDict_Update C.PyDict_Update

func (*PyObject) PyDict_Values

func (self *PyObject) PyDict_Values() *PyObject

llgo:link (*PyObject).PyDict_Values C.PyDict_Values

func (*PyObject) PyErr_Display

func (self *PyObject) PyErr_Display(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject)

llgo:link (*PyObject).PyErr_Display C.PyErr_Display

func (*PyObject) PyErr_DisplayException

func (self *PyObject) PyErr_DisplayException()

llgo:link (*PyObject).PyErr_DisplayException C.PyErr_DisplayException

func (*PyObject) PyErr_ExceptionMatches

func (self *PyObject) PyErr_ExceptionMatches() c.Int

llgo:link (*PyObject).PyErr_ExceptionMatches C.PyErr_ExceptionMatches

func (*PyObject) PyErr_Format

func (self *PyObject) PyErr_Format(format *c.Char, __llgo_va_list ...any) *PyObject

llgo:link (*PyObject).PyErr_Format C.PyErr_Format

func (*PyObject) PyErr_FormatV

func (self *PyObject) PyErr_FormatV(format *c.Char, vargs c.VaList) *PyObject

llgo:link (*PyObject).PyErr_FormatV C.PyErr_FormatV

func (*PyObject) PyErr_GivenExceptionMatches

func (self *PyObject) PyErr_GivenExceptionMatches(_llcppg_param2 *PyObject) c.Int

Error testing and normalization

llgo:link (*PyObject).PyErr_GivenExceptionMatches C.PyErr_GivenExceptionMatches

func (*PyObject) PyErr_ProgramTextObject

func (self *PyObject) PyErr_ProgramTextObject(lineno c.Int) *PyObject

llgo:link (*PyObject).PyErr_ProgramTextObject C.PyErr_ProgramTextObject

func (*PyObject) PyErr_RangedSyntaxLocationObject

func (self *PyObject) PyErr_RangedSyntaxLocationObject(lineno c.Int, col_offset c.Int, end_lineno c.Int, end_col_offset c.Int)

llgo:link (*PyObject).PyErr_RangedSyntaxLocationObject C.PyErr_RangedSyntaxLocationObject

func (*PyObject) PyErr_ResourceWarning

func (self *PyObject) PyErr_ResourceWarning(stack_level PySsizeT, format *c.Char, __llgo_va_list ...any) c.Int

Emit a ResourceWarning warning

llgo:link (*PyObject).PyErr_ResourceWarning C.PyErr_ResourceWarning

func (*PyObject) PyErr_Restore

func (self *PyObject) PyErr_Restore(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject)

llgo:link (*PyObject).PyErr_Restore C.PyErr_Restore

func (*PyObject) PyErr_SetExcInfo

func (self *PyObject) PyErr_SetExcInfo(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject)

llgo:link (*PyObject).PyErr_SetExcInfo C.PyErr_SetExcInfo

func (*PyObject) PyErr_SetFromErrno

func (self *PyObject) PyErr_SetFromErrno() *PyObject

llgo:link (*PyObject).PyErr_SetFromErrno C.PyErr_SetFromErrno

func (*PyObject) PyErr_SetFromErrnoWithFilename

func (self *PyObject) PyErr_SetFromErrnoWithFilename(filename *c.Char) *PyObject

llgo:link (*PyObject).PyErr_SetFromErrnoWithFilename C.PyErr_SetFromErrnoWithFilename

func (*PyObject) PyErr_SetFromErrnoWithFilenameObject

func (self *PyObject) PyErr_SetFromErrnoWithFilenameObject(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyObject).PyErr_SetFromErrnoWithFilenameObject C.PyErr_SetFromErrnoWithFilenameObject

func (*PyObject) PyErr_SetFromErrnoWithFilenameObjects

func (self *PyObject) PyErr_SetFromErrnoWithFilenameObjects(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

llgo:link (*PyObject).PyErr_SetFromErrnoWithFilenameObjects C.PyErr_SetFromErrnoWithFilenameObjects

func (*PyObject) PyErr_SetHandledException

func (self *PyObject) PyErr_SetHandledException()

llgo:link (*PyObject).PyErr_SetHandledException C.PyErr_SetHandledException

func (*PyObject) PyErr_SetImportError

func (self *PyObject) PyErr_SetImportError(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

llgo:link (*PyObject).PyErr_SetImportError C.PyErr_SetImportError

func (*PyObject) PyErr_SetImportErrorSubclass

func (self *PyObject) PyErr_SetImportErrorSubclass(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject, _llcppg_param4 *PyObject) *PyObject

llgo:link (*PyObject).PyErr_SetImportErrorSubclass C.PyErr_SetImportErrorSubclass

func (*PyObject) PyErr_SetNone

func (self *PyObject) PyErr_SetNone()

llgo:link (*PyObject).PyErr_SetNone C.PyErr_SetNone

func (*PyObject) PyErr_SetObject

func (self *PyObject) PyErr_SetObject(_llcppg_param2 *PyObject)

llgo:link (*PyObject).PyErr_SetObject C.PyErr_SetObject

func (*PyObject) PyErr_SetRaisedException

func (self *PyObject) PyErr_SetRaisedException()

llgo:link (*PyObject).PyErr_SetRaisedException C.PyErr_SetRaisedException

func (*PyObject) PyErr_SetString

func (self *PyObject) PyErr_SetString(string *c.Char)

llgo:link (*PyObject).PyErr_SetString C.PyErr_SetString

func (*PyObject) PyErr_SyntaxLocationObject

func (self *PyObject) PyErr_SyntaxLocationObject(lineno c.Int, col_offset c.Int)

Support for adding program text to SyntaxErrors

llgo:link (*PyObject).PyErr_SyntaxLocationObject C.PyErr_SyntaxLocationObject

func (*PyObject) PyErr_WarnEx

func (self *PyObject) PyErr_WarnEx(message *c.Char, stack_level PySsizeT) c.Int

llgo:link (*PyObject).PyErr_WarnEx C.PyErr_WarnEx

func (*PyObject) PyErr_WarnExplicit

func (self *PyObject) PyErr_WarnExplicit(message *c.Char, filename *c.Char, lineno c.Int, module *c.Char, registry *PyObject) c.Int

llgo:link (*PyObject).PyErr_WarnExplicit C.PyErr_WarnExplicit

func (*PyObject) PyErr_WarnExplicitFormat

func (self *PyObject) PyErr_WarnExplicitFormat(filename *c.Char, lineno c.Int, module *c.Char, registry *PyObject, format *c.Char, __llgo_va_list ...any) c.Int

llgo:link (*PyObject).PyErr_WarnExplicitFormat C.PyErr_WarnExplicitFormat

func (*PyObject) PyErr_WarnExplicitObject

func (self *PyObject) PyErr_WarnExplicitObject(message *PyObject, filename *PyObject, lineno c.Int, module *PyObject, registry *PyObject) c.Int

llgo:link (*PyObject).PyErr_WarnExplicitObject C.PyErr_WarnExplicitObject

func (*PyObject) PyErr_WarnFormat

func (self *PyObject) PyErr_WarnFormat(stack_level PySsizeT, format *c.Char, __llgo_va_list ...any) c.Int

llgo:link (*PyObject).PyErr_WarnFormat C.PyErr_WarnFormat

func (*PyObject) PyErr_WriteUnraisable

func (self *PyObject) PyErr_WriteUnraisable()

llgo:link (*PyObject).PyErr_WriteUnraisable C.PyErr_WriteUnraisable

func (*PyObject) PyEval_EvalCode

func (self *PyObject) PyEval_EvalCode(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

llgo:link (*PyObject).PyEval_EvalCode C.PyEval_EvalCode

func (*PyObject) PyEval_EvalCodeEx

func (self *PyObject) PyEval_EvalCodeEx(globals *PyObject, locals *PyObject, args **PyObject, argc c.Int, kwds **PyObject, kwdc c.Int, defs **PyObject, defc c.Int, kwdefs *PyObject, closure *PyObject) *PyObject

llgo:link (*PyObject).PyEval_EvalCodeEx C.PyEval_EvalCodeEx

func (*PyObject) PyEval_GetFuncDesc

func (self *PyObject) PyEval_GetFuncDesc() *c.Char

llgo:link (*PyObject).PyEval_GetFuncDesc C.PyEval_GetFuncDesc

func (*PyObject) PyEval_GetFuncName

func (self *PyObject) PyEval_GetFuncName() *c.Char

llgo:link (*PyObject).PyEval_GetFuncName C.PyEval_GetFuncName

func (*PyObject) PyExceptionClass_Name

func (self *PyObject) PyExceptionClass_Name() *c.Char

llgo:link (*PyObject).PyExceptionClass_Name C.PyExceptionClass_Name

func (*PyObject) PyException_GetArgs

func (self *PyObject) PyException_GetArgs() *PyObject

llgo:link (*PyObject).PyException_GetArgs C.PyException_GetArgs

func (*PyObject) PyException_GetCause

func (self *PyObject) PyException_GetCause() *PyObject

Cause manipulation (PEP 3134)

llgo:link (*PyObject).PyException_GetCause C.PyException_GetCause

func (*PyObject) PyException_GetContext

func (self *PyObject) PyException_GetContext() *PyObject

Context manipulation (PEP 3134)

llgo:link (*PyObject).PyException_GetContext C.PyException_GetContext

func (*PyObject) PyException_GetTraceback

func (self *PyObject) PyException_GetTraceback() *PyObject

llgo:link (*PyObject).PyException_GetTraceback C.PyException_GetTraceback

func (*PyObject) PyException_SetArgs

func (self *PyObject) PyException_SetArgs(_llcppg_param2 *PyObject)

llgo:link (*PyObject).PyException_SetArgs C.PyException_SetArgs

func (*PyObject) PyException_SetCause

func (self *PyObject) PyException_SetCause(_llcppg_param2 *PyObject)

llgo:link (*PyObject).PyException_SetCause C.PyException_SetCause

func (*PyObject) PyException_SetContext

func (self *PyObject) PyException_SetContext(_llcppg_param2 *PyObject)

llgo:link (*PyObject).PyException_SetContext C.PyException_SetContext

func (*PyObject) PyException_SetTraceback

func (self *PyObject) PyException_SetTraceback(_llcppg_param2 *PyObject) c.Int

Traceback manipulation (PEP 3134)

llgo:link (*PyObject).PyException_SetTraceback C.PyException_SetTraceback

func (*PyObject) PyFile_GetLine

func (self *PyObject) PyFile_GetLine(_llcppg_param2 c.Int) *PyObject

llgo:link (*PyObject).PyFile_GetLine C.PyFile_GetLine

func (*PyObject) PyFile_OpenCodeObject

func (self *PyObject) PyFile_OpenCodeObject() *PyObject

llgo:link (*PyObject).PyFile_OpenCodeObject C.PyFile_OpenCodeObject

func (*PyObject) PyFile_WriteObject

func (self *PyObject) PyFile_WriteObject(_llcppg_param2 *PyObject, _llcppg_param3 c.Int) c.Int

llgo:link (*PyObject).PyFile_WriteObject C.PyFile_WriteObject

func (*PyObject) PyFloat_AsDouble

func (self *PyObject) PyFloat_AsDouble() c.Double

Extract C double from Python float. The macro version trades safety for speed.

llgo:link (*PyObject).PyFloat_AsDouble C.PyFloat_AsDouble

func (*PyObject) PyFloat_FromString

func (self *PyObject) PyFloat_FromString() *PyObject

Return Python float from string PyObject.

llgo:link (*PyObject).PyFloat_FromString C.PyFloat_FromString

func (*PyObject) PyFopen

func (self *PyObject) PyFopen(mode *c.Char) *c.FILE

llgo:link (*PyObject).PyFopen C.Py_fopen

func (*PyObject) PyFrozenSet_New

func (self *PyObject) PyFrozenSet_New() *PyObject

llgo:link (*PyObject).PyFrozenSet_New C.PyFrozenSet_New

func (*PyObject) PyFunction_GetAnnotations

func (self *PyObject) PyFunction_GetAnnotations() *PyObject

llgo:link (*PyObject).PyFunction_GetAnnotations C.PyFunction_GetAnnotations

func (*PyObject) PyFunction_GetClosure

func (self *PyObject) PyFunction_GetClosure() *PyObject

llgo:link (*PyObject).PyFunction_GetClosure C.PyFunction_GetClosure

func (*PyObject) PyFunction_GetCode

func (self *PyObject) PyFunction_GetCode() *PyObject

llgo:link (*PyObject).PyFunction_GetCode C.PyFunction_GetCode

func (*PyObject) PyFunction_GetDefaults

func (self *PyObject) PyFunction_GetDefaults() *PyObject

llgo:link (*PyObject).PyFunction_GetDefaults C.PyFunction_GetDefaults

func (*PyObject) PyFunction_GetGlobals

func (self *PyObject) PyFunction_GetGlobals() *PyObject

llgo:link (*PyObject).PyFunction_GetGlobals C.PyFunction_GetGlobals

func (*PyObject) PyFunction_GetKwDefaults

func (self *PyObject) PyFunction_GetKwDefaults() *PyObject

llgo:link (*PyObject).PyFunction_GetKwDefaults C.PyFunction_GetKwDefaults

func (*PyObject) PyFunction_GetModule

func (self *PyObject) PyFunction_GetModule() *PyObject

llgo:link (*PyObject).PyFunction_GetModule C.PyFunction_GetModule

func (*PyObject) PyFunction_New

func (self *PyObject) PyFunction_New(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyObject).PyFunction_New C.PyFunction_New

func (*PyObject) PyFunction_NewWithQualName

func (self *PyObject) PyFunction_NewWithQualName(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

llgo:link (*PyObject).PyFunction_NewWithQualName C.PyFunction_NewWithQualName

func (*PyObject) PyFunction_SetAnnotations

func (self *PyObject) PyFunction_SetAnnotations(_llcppg_param2 *PyObject) c.Int

llgo:link (*PyObject).PyFunction_SetAnnotations C.PyFunction_SetAnnotations

func (*PyObject) PyFunction_SetClosure

func (self *PyObject) PyFunction_SetClosure(_llcppg_param2 *PyObject) c.Int

llgo:link (*PyObject).PyFunction_SetClosure C.PyFunction_SetClosure

func (*PyObject) PyFunction_SetDefaults

func (self *PyObject) PyFunction_SetDefaults(_llcppg_param2 *PyObject) c.Int

llgo:link (*PyObject).PyFunction_SetDefaults C.PyFunction_SetDefaults

func (*PyObject) PyFunction_SetKwDefaults

func (self *PyObject) PyFunction_SetKwDefaults(_llcppg_param2 *PyObject) c.Int

llgo:link (*PyObject).PyFunction_SetKwDefaults C.PyFunction_SetKwDefaults

func (*PyObject) PyImport_AddModuleObject

func (self *PyObject) PyImport_AddModuleObject() *PyObject

llgo:link (*PyObject).PyImport_AddModuleObject C.PyImport_AddModuleObject

func (*PyObject) PyImport_ExecCodeModuleObject

func (self *PyObject) PyImport_ExecCodeModuleObject(co *PyObject, pathname *PyObject, cpathname *PyObject) *PyObject

llgo:link (*PyObject).PyImport_ExecCodeModuleObject C.PyImport_ExecCodeModuleObject

func (*PyObject) PyImport_GetImporter

func (self *PyObject) PyImport_GetImporter() *PyObject

llgo:link (*PyObject).PyImport_GetImporter C.PyImport_GetImporter

func (*PyObject) PyImport_GetModule

func (self *PyObject) PyImport_GetModule() *PyObject

llgo:link (*PyObject).PyImport_GetModule C.PyImport_GetModule

func (*PyObject) PyImport_Import

func (self *PyObject) PyImport_Import() *PyObject

llgo:link (*PyObject).PyImport_Import C.PyImport_Import

func (*PyObject) PyImport_ImportFrozenModuleObject

func (self *PyObject) PyImport_ImportFrozenModuleObject() c.Int

llgo:link (*PyObject).PyImport_ImportFrozenModuleObject C.PyImport_ImportFrozenModuleObject

func (*PyObject) PyImport_ImportModuleAttr

func (self *PyObject) PyImport_ImportModuleAttr(attr_name *PyObject) *PyObject

llgo:link (*PyObject).PyImport_ImportModuleAttr C.PyImport_ImportModuleAttr

func (*PyObject) PyImport_ImportModuleLevelObject

func (self *PyObject) PyImport_ImportModuleLevelObject(globals *PyObject, locals *PyObject, fromlist *PyObject, level c.Int) *PyObject

llgo:link (*PyObject).PyImport_ImportModuleLevelObject C.PyImport_ImportModuleLevelObject

func (*PyObject) PyImport_ReloadModule

func (self *PyObject) PyImport_ReloadModule() *PyObject

llgo:link (*PyObject).PyImport_ReloadModule C.PyImport_ReloadModule

func (*PyObject) PyIndex_Check

func (self *PyObject) PyIndex_Check() 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.

llgo:link (*PyObject).PyIndex_Check C.PyIndex_Check

func (*PyObject) PyInstanceMethod_Function

func (self *PyObject) PyInstanceMethod_Function() *PyObject

llgo:link (*PyObject).PyInstanceMethod_Function C.PyInstanceMethod_Function

func (*PyObject) PyInstanceMethod_New

func (self *PyObject) PyInstanceMethod_New() *PyObject

llgo:link (*PyObject).PyInstanceMethod_New C.PyInstanceMethod_New

func (*PyObject) PyIter_Check

func (self *PyObject) PyIter_Check() c.Int

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

This function always succeeds.

llgo:link (*PyObject).PyIter_Check C.PyIter_Check

func (*PyObject) PyIter_Next

func (self *PyObject) PyIter_Next() *PyObject

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.

llgo:link (*PyObject).PyIter_Next C.PyIter_Next

func (*PyObject) PyIter_NextItem

func (self *PyObject) PyIter_NextItem(item **PyObject) 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.

llgo:link (*PyObject).PyIter_NextItem C.PyIter_NextItem

func (*PyObject) PyIter_Send

func (self *PyObject) PyIter_Send(_llcppg_param2 *PyObject, _llcppg_param3 **PyObject) PySendResult

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.

llgo:link (*PyObject).PyIter_Send C.PyIter_Send

func (*PyObject) PyList_Append

func (self *PyObject) PyList_Append(_llcppg_param2 *PyObject) c.Int

llgo:link (*PyObject).PyList_Append C.PyList_Append

func (*PyObject) PyList_AsTuple

func (self *PyObject) PyList_AsTuple() *PyObject

llgo:link (*PyObject).PyList_AsTuple C.PyList_AsTuple

func (*PyObject) PyList_Clear

func (self *PyObject) PyList_Clear() c.Int

llgo:link (*PyObject).PyList_Clear C.PyList_Clear

func (*PyObject) PyList_Extend

func (self *PyObject) PyList_Extend(iterable *PyObject) c.Int

llgo:link (*PyObject).PyList_Extend C.PyList_Extend

func (*PyObject) PyList_GetItem

func (self *PyObject) PyList_GetItem(_llcppg_param2 PySsizeT) *PyObject

llgo:link (*PyObject).PyList_GetItem C.PyList_GetItem

func (*PyObject) PyList_GetItemRef

func (self *PyObject) PyList_GetItemRef(_llcppg_param2 PySsizeT) *PyObject

llgo:link (*PyObject).PyList_GetItemRef C.PyList_GetItemRef

func (*PyObject) PyList_GetSlice

func (self *PyObject) PyList_GetSlice(_llcppg_param2 PySsizeT, _llcppg_param3 PySsizeT) *PyObject

llgo:link (*PyObject).PyList_GetSlice C.PyList_GetSlice

func (*PyObject) PyList_Insert

func (self *PyObject) PyList_Insert(_llcppg_param2 PySsizeT, _llcppg_param3 *PyObject) c.Int

llgo:link (*PyObject).PyList_Insert C.PyList_Insert

func (*PyObject) PyList_Reverse

func (self *PyObject) PyList_Reverse() c.Int

llgo:link (*PyObject).PyList_Reverse C.PyList_Reverse

func (*PyObject) PyList_SetItem

func (self *PyObject) PyList_SetItem(_llcppg_param2 PySsizeT, _llcppg_param3 *PyObject) c.Int

llgo:link (*PyObject).PyList_SetItem C.PyList_SetItem

func (*PyObject) PyList_SetSlice

func (self *PyObject) PyList_SetSlice(_llcppg_param2 PySsizeT, _llcppg_param3 PySsizeT, _llcppg_param4 *PyObject) c.Int

llgo:link (*PyObject).PyList_SetSlice C.PyList_SetSlice

func (*PyObject) PyList_Size

func (self *PyObject) PyList_Size() PySsizeT

llgo:link (*PyObject).PyList_Size C.PyList_Size

func (*PyObject) PyList_Sort

func (self *PyObject) PyList_Sort() c.Int

llgo:link (*PyObject).PyList_Sort C.PyList_Sort

func (*PyObject) PyLongAsSizeT

func (self *PyObject) PyLongAsSizeT() c.SizeT

llgo:link (*PyObject).PyLongAsSizeT C.PyLong_AsSize_t

func (*PyObject) PyLongAsSsizeT

func (self *PyObject) PyLongAsSsizeT() PySsizeT

llgo:link (*PyObject).PyLongAsSsizeT C.PyLong_AsSsize_t

func (*PyObject) PyLong_AsDouble

func (self *PyObject) PyLong_AsDouble() c.Double

llgo:link (*PyObject).PyLong_AsDouble C.PyLong_AsDouble

func (*PyObject) PyLong_AsInt

func (self *PyObject) PyLong_AsInt() c.Int

llgo:link (*PyObject).PyLong_AsInt C.PyLong_AsInt

func (*PyObject) PyLong_AsInt32

func (self *PyObject) PyLong_AsInt32(value *c.Int32T) c.Int

llgo:link (*PyObject).PyLong_AsInt32 C.PyLong_AsInt32

func (*PyObject) PyLong_AsInt64

func (self *PyObject) PyLong_AsInt64(value *c.Int64T) c.Int

llgo:link (*PyObject).PyLong_AsInt64 C.PyLong_AsInt64

func (*PyObject) PyLong_AsLong

func (self *PyObject) PyLong_AsLong() c.Long

llgo:link (*PyObject).PyLong_AsLong C.PyLong_AsLong

func (*PyObject) PyLong_AsLongAndOverflow

func (self *PyObject) PyLong_AsLongAndOverflow(_llcppg_param2 *c.Int) c.Long

llgo:link (*PyObject).PyLong_AsLongAndOverflow C.PyLong_AsLongAndOverflow

func (*PyObject) PyLong_AsLongLong

func (self *PyObject) PyLong_AsLongLong() c.LongLong

llgo:link (*PyObject).PyLong_AsLongLong C.PyLong_AsLongLong

func (*PyObject) PyLong_AsLongLongAndOverflow

func (self *PyObject) PyLong_AsLongLongAndOverflow(_llcppg_param2 *c.Int) c.LongLong

llgo:link (*PyObject).PyLong_AsLongLongAndOverflow C.PyLong_AsLongLongAndOverflow

func (*PyObject) PyLong_AsNativeBytes

func (self *PyObject) PyLong_AsNativeBytes(buffer unsafe.Pointer, n_bytes PySsizeT, flags c.Int) PySsizeT

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 (*PyObject).PyLong_AsNativeBytes C.PyLong_AsNativeBytes

func (*PyObject) PyLong_AsUInt32

func (self *PyObject) PyLong_AsUInt32(value *c.Uint32T) c.Int

llgo:link (*PyObject).PyLong_AsUInt32 C.PyLong_AsUInt32

func (*PyObject) PyLong_AsUInt64

func (self *PyObject) PyLong_AsUInt64(value *c.Uint64T) c.Int

llgo:link (*PyObject).PyLong_AsUInt64 C.PyLong_AsUInt64

func (*PyObject) PyLong_AsUnsignedLong

func (self *PyObject) PyLong_AsUnsignedLong() c.Ulong

llgo:link (*PyObject).PyLong_AsUnsignedLong C.PyLong_AsUnsignedLong

func (*PyObject) PyLong_AsUnsignedLongLong

func (self *PyObject) PyLong_AsUnsignedLongLong() c.UlongLong

llgo:link (*PyObject).PyLong_AsUnsignedLongLong C.PyLong_AsUnsignedLongLong

func (*PyObject) PyLong_AsUnsignedLongLongMask

func (self *PyObject) PyLong_AsUnsignedLongLongMask() c.UlongLong

llgo:link (*PyObject).PyLong_AsUnsignedLongLongMask C.PyLong_AsUnsignedLongLongMask

func (*PyObject) PyLong_AsUnsignedLongMask

func (self *PyObject) PyLong_AsUnsignedLongMask() c.Ulong

llgo:link (*PyObject).PyLong_AsUnsignedLongMask C.PyLong_AsUnsignedLongMask

func (*PyObject) PyLong_AsVoidPtr

func (self *PyObject) PyLong_AsVoidPtr() unsafe.Pointer

llgo:link (*PyObject).PyLong_AsVoidPtr C.PyLong_AsVoidPtr

func (*PyObject) PyLong_Export

func (self *PyObject) PyLong_Export(export_long *PyLongExport) c.Int

llgo:link (*PyObject).PyLong_Export C.PyLong_Export

func (*PyObject) PyLong_FromUnicodeObject

func (self *PyObject) PyLong_FromUnicodeObject(base c.Int) *PyObject

llgo:link (*PyObject).PyLong_FromUnicodeObject C.PyLong_FromUnicodeObject

func (*PyObject) PyLong_GetSign

func (self *PyObject) PyLong_GetSign(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 (*PyObject).PyLong_GetSign C.PyLong_GetSign

func (*PyObject) PyLong_IsNegative

func (self *PyObject) PyLong_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 (*PyObject).PyLong_IsNegative C.PyLong_IsNegative

func (*PyObject) PyLong_IsPositive

func (self *PyObject) PyLong_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 (*PyObject).PyLong_IsPositive C.PyLong_IsPositive

func (*PyObject) PyLong_IsZero

func (self *PyObject) PyLong_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 (*PyObject).PyLong_IsZero C.PyLong_IsZero

func (*PyObject) PyMapping_Check

func (self *PyObject) PyMapping_Check() c.Int

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

This function always succeeds.

llgo:link (*PyObject).PyMapping_Check C.PyMapping_Check

func (*PyObject) PyMapping_GetItemString

func (self *PyObject) PyMapping_GetItemString(key *c.Char) *PyObject

Return element of 'o' corresponding to the string 'key' or NULL on failure.

This is the equivalent of the Python expression: o[key].

llgo:link (*PyObject).PyMapping_GetItemString C.PyMapping_GetItemString

func (*PyObject) PyMapping_GetOptionalItem

func (self *PyObject) PyMapping_GetOptionalItem(_llcppg_param2 *PyObject, _llcppg_param3 **PyObject) c.Int

llgo:link (*PyObject).PyMapping_GetOptionalItem C.PyMapping_GetOptionalItem

func (*PyObject) PyMapping_GetOptionalItemString

func (self *PyObject) PyMapping_GetOptionalItemString(_llcppg_param2 *c.Char, _llcppg_param3 **PyObject) c.Int

llgo:link (*PyObject).PyMapping_GetOptionalItemString C.PyMapping_GetOptionalItemString

func (*PyObject) PyMapping_HasKey

func (self *PyObject) PyMapping_HasKey(key *PyObject) 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.

llgo:link (*PyObject).PyMapping_HasKey C.PyMapping_HasKey

func (*PyObject) PyMapping_HasKeyString

func (self *PyObject) PyMapping_HasKeyString(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.

llgo:link (*PyObject).PyMapping_HasKeyString C.PyMapping_HasKeyString

func (*PyObject) PyMapping_HasKeyStringWithError

func (self *PyObject) PyMapping_HasKeyStringWithError(key *c.Char) 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. On failure, return -1.

llgo:link (*PyObject).PyMapping_HasKeyStringWithError C.PyMapping_HasKeyStringWithError

func (*PyObject) PyMapping_HasKeyWithError

func (self *PyObject) PyMapping_HasKeyWithError(key *PyObject) 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. On failure, return -1.

llgo:link (*PyObject).PyMapping_HasKeyWithError C.PyMapping_HasKeyWithError

func (*PyObject) PyMapping_Items

func (self *PyObject) PyMapping_Items() *PyObject

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.

llgo:link (*PyObject).PyMapping_Items C.PyMapping_Items

func (*PyObject) PyMapping_Keys

func (self *PyObject) PyMapping_Keys() *PyObject

On success, return a list of the keys in mapping object 'o'. On failure, return NULL.

llgo:link (*PyObject).PyMapping_Keys C.PyMapping_Keys

func (*PyObject) PyMapping_Length

func (self *PyObject) PyMapping_Length() PySsizeT

llgo:link (*PyObject).PyMapping_Length C.PyMapping_Length

func (*PyObject) PyMapping_SetItemString

func (self *PyObject) PyMapping_SetItemString(key *c.Char, value *PyObject) 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.

llgo:link (*PyObject).PyMapping_SetItemString C.PyMapping_SetItemString

func (*PyObject) PyMapping_Size

func (self *PyObject) PyMapping_Size() PySsizeT

Returns the number of keys in mapping object 'o' on success, and -1 on failure. This is equivalent to the Python expression: len(o).

llgo:link (*PyObject).PyMapping_Size C.PyMapping_Size

func (*PyObject) PyMapping_Values

func (self *PyObject) PyMapping_Values() *PyObject

On success, return a list of the values in mapping object 'o'. On failure, return NULL.

llgo:link (*PyObject).PyMapping_Values C.PyMapping_Values

func (*PyObject) PyMemoryView_FromObject

func (self *PyObject) PyMemoryView_FromObject() *PyObject

llgo:link (*PyObject).PyMemoryView_FromObject C.PyMemoryView_FromObject

func (*PyObject) PyMemoryView_GetContiguous

func (self *PyObject) PyMemoryView_GetContiguous(buffertype c.Int, order c.Char) *PyObject

llgo:link (*PyObject).PyMemoryView_GetContiguous C.PyMemoryView_GetContiguous

func (*PyObject) PyMethod_Function

func (self *PyObject) PyMethod_Function() *PyObject

llgo:link (*PyObject).PyMethod_Function C.PyMethod_Function

func (*PyObject) PyMethod_New

func (self *PyObject) PyMethod_New(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyObject).PyMethod_New C.PyMethod_New

func (*PyObject) PyMethod_Self

func (self *PyObject) PyMethod_Self() *PyObject

llgo:link (*PyObject).PyMethod_Self C.PyMethod_Self

func (*PyObject) PyModule_Add

func (self *PyObject) PyModule_Add(name *c.Char, value *PyObject) c.Int

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

llgo:link (*PyObject).PyModule_Add C.PyModule_Add

func (*PyObject) PyModule_AddFunctions

func (self *PyObject) PyModule_AddFunctions(_llcppg_param2 *PyMethodDef) c.Int

llgo:link (*PyObject).PyModule_AddFunctions C.PyModule_AddFunctions

func (*PyObject) PyModule_AddIntConstant

func (self *PyObject) PyModule_AddIntConstant(_llcppg_param2 *c.Char, _llcppg_param3 c.Long) c.Int

llgo:link (*PyObject).PyModule_AddIntConstant C.PyModule_AddIntConstant

func (*PyObject) PyModule_AddObject

func (self *PyObject) PyModule_AddObject(_llcppg_param2 *c.Char, value *PyObject) 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.

llgo:link (*PyObject).PyModule_AddObject C.PyModule_AddObject

func (*PyObject) PyModule_AddObjectRef

func (self *PyObject) PyModule_AddObjectRef(name *c.Char, value *PyObject) 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.

llgo:link (*PyObject).PyModule_AddObjectRef C.PyModule_AddObjectRef

func (*PyObject) PyModule_AddStringConstant

func (self *PyObject) PyModule_AddStringConstant(_llcppg_param2 *c.Char, _llcppg_param3 *c.Char) c.Int

llgo:link (*PyObject).PyModule_AddStringConstant C.PyModule_AddStringConstant

func (*PyObject) PyModule_AddType

func (self *PyObject) PyModule_AddType(type_ *PyTypeObject) c.Int

New in 3.9

llgo:link (*PyObject).PyModule_AddType C.PyModule_AddType

func (*PyObject) PyModule_ExecDef

func (self *PyObject) PyModule_ExecDef(def *PyModuleDef) c.Int

llgo:link (*PyObject).PyModule_ExecDef C.PyModule_ExecDef

func (*PyObject) PyModule_GetDef

func (self *PyObject) PyModule_GetDef() *PyModuleDef

llgo:link (*PyObject).PyModule_GetDef C.PyModule_GetDef

func (*PyObject) PyModule_GetDict

func (self *PyObject) PyModule_GetDict() *PyObject

llgo:link (*PyObject).PyModule_GetDict C.PyModule_GetDict

func (*PyObject) PyModule_GetFilename

func (self *PyObject) PyModule_GetFilename() *c.Char

llgo:link (*PyObject).PyModule_GetFilename C.PyModule_GetFilename

func (*PyObject) PyModule_GetFilenameObject

func (self *PyObject) PyModule_GetFilenameObject() *PyObject

llgo:link (*PyObject).PyModule_GetFilenameObject C.PyModule_GetFilenameObject

func (*PyObject) PyModule_GetName

func (self *PyObject) PyModule_GetName() *c.Char

llgo:link (*PyObject).PyModule_GetName C.PyModule_GetName

func (*PyObject) PyModule_GetNameObject

func (self *PyObject) PyModule_GetNameObject() *PyObject

llgo:link (*PyObject).PyModule_GetNameObject C.PyModule_GetNameObject

func (*PyObject) PyModule_GetState

func (self *PyObject) PyModule_GetState() unsafe.Pointer

llgo:link (*PyObject).PyModule_GetState C.PyModule_GetState

func (*PyObject) PyModule_NewObject

func (self *PyObject) PyModule_NewObject() *PyObject

llgo:link (*PyObject).PyModule_NewObject C.PyModule_NewObject

func (*PyObject) PyModule_SetDocString

func (self *PyObject) PyModule_SetDocString(_llcppg_param2 *c.Char) c.Int

New in 3.5

llgo:link (*PyObject).PyModule_SetDocString C.PyModule_SetDocString

func (*PyObject) PyNumberAsSsizeT

func (self *PyObject) PyNumberAsSsizeT(exc *PyObject) PySsizeT

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.

llgo:link (*PyObject).PyNumberAsSsizeT C.PyNumber_AsSsize_t

func (*PyObject) PyNumber_Absolute

func (self *PyObject) PyNumber_Absolute() *PyObject

Returns the absolute value of 'o', or NULL on failure.

This is the equivalent of the Python expression: abs(o).

llgo:link (*PyObject).PyNumber_Absolute C.PyNumber_Absolute

func (*PyObject) PyNumber_Add

func (self *PyObject) PyNumber_Add(o2 *PyObject) *PyObject

Returns the result of adding o1 and o2, or NULL on failure.

This is the equivalent of the Python expression: o1 + o2.

llgo:link (*PyObject).PyNumber_Add C.PyNumber_Add

func (*PyObject) PyNumber_And

func (self *PyObject) PyNumber_And(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_And C.PyNumber_And

func (*PyObject) PyNumber_Check

func (self *PyObject) PyNumber_Check() c.Int

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

This function always succeeds.

llgo:link (*PyObject).PyNumber_Check C.PyNumber_Check

func (*PyObject) PyNumber_Divmod

func (self *PyObject) PyNumber_Divmod(o2 *PyObject) *PyObject

See the built-in function divmod.

Returns NULL on failure.

This is the equivalent of the Python expression: divmod(o1, o2).

llgo:link (*PyObject).PyNumber_Divmod C.PyNumber_Divmod

func (*PyObject) PyNumber_Float

func (self *PyObject) PyNumber_Float() *PyObject

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).

llgo:link (*PyObject).PyNumber_Float C.PyNumber_Float

func (*PyObject) PyNumber_FloorDivide

func (self *PyObject) PyNumber_FloorDivide(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_FloorDivide C.PyNumber_FloorDivide

func (*PyObject) PyNumber_InPlaceAdd

func (self *PyObject) PyNumber_InPlaceAdd(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceAdd C.PyNumber_InPlaceAdd

func (*PyObject) PyNumber_InPlaceAnd

func (self *PyObject) PyNumber_InPlaceAnd(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceAnd C.PyNumber_InPlaceAnd

func (*PyObject) PyNumber_InPlaceFloorDivide

func (self *PyObject) PyNumber_InPlaceFloorDivide(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceFloorDivide C.PyNumber_InPlaceFloorDivide

func (*PyObject) PyNumber_InPlaceLshift

func (self *PyObject) PyNumber_InPlaceLshift(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceLshift C.PyNumber_InPlaceLshift

func (*PyObject) PyNumber_InPlaceMatrixMultiply

func (self *PyObject) PyNumber_InPlaceMatrixMultiply(o2 *PyObject) *PyObject

This is the equivalent of the Python expression: o1 @= o2.

llgo:link (*PyObject).PyNumber_InPlaceMatrixMultiply C.PyNumber_InPlaceMatrixMultiply

func (*PyObject) PyNumber_InPlaceMultiply

func (self *PyObject) PyNumber_InPlaceMultiply(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceMultiply C.PyNumber_InPlaceMultiply

func (*PyObject) PyNumber_InPlaceOr

func (self *PyObject) PyNumber_InPlaceOr(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceOr C.PyNumber_InPlaceOr

func (*PyObject) PyNumber_InPlacePower

func (self *PyObject) PyNumber_InPlacePower(o2 *PyObject, o3 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlacePower C.PyNumber_InPlacePower

func (*PyObject) PyNumber_InPlaceRemainder

func (self *PyObject) PyNumber_InPlaceRemainder(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceRemainder C.PyNumber_InPlaceRemainder

func (*PyObject) PyNumber_InPlaceRshift

func (self *PyObject) PyNumber_InPlaceRshift(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceRshift C.PyNumber_InPlaceRshift

func (*PyObject) PyNumber_InPlaceSubtract

func (self *PyObject) PyNumber_InPlaceSubtract(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceSubtract C.PyNumber_InPlaceSubtract

func (*PyObject) PyNumber_InPlaceTrueDivide

func (self *PyObject) PyNumber_InPlaceTrueDivide(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceTrueDivide C.PyNumber_InPlaceTrueDivide

func (*PyObject) PyNumber_InPlaceXor

func (self *PyObject) PyNumber_InPlaceXor(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_InPlaceXor C.PyNumber_InPlaceXor

func (*PyObject) PyNumber_Index

func (self *PyObject) PyNumber_Index() *PyObject

Returns the object 'o' converted to a Python int, or NULL with an exception raised on failure.

llgo:link (*PyObject).PyNumber_Index C.PyNumber_Index

func (*PyObject) PyNumber_Invert

func (self *PyObject) PyNumber_Invert() *PyObject

Returns the bitwise negation of 'o' on success, or NULL on failure.

This is the equivalent of the Python expression: ~o.

llgo:link (*PyObject).PyNumber_Invert C.PyNumber_Invert

func (*PyObject) PyNumber_Long

func (self *PyObject) PyNumber_Long() *PyObject

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).

llgo:link (*PyObject).PyNumber_Long C.PyNumber_Long

func (*PyObject) PyNumber_Lshift

func (self *PyObject) PyNumber_Lshift(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_Lshift C.PyNumber_Lshift

func (*PyObject) PyNumber_MatrixMultiply

func (self *PyObject) PyNumber_MatrixMultiply(o2 *PyObject) *PyObject

This is the equivalent of the Python expression: o1 @ o2.

llgo:link (*PyObject).PyNumber_MatrixMultiply C.PyNumber_MatrixMultiply

func (*PyObject) PyNumber_Multiply

func (self *PyObject) PyNumber_Multiply(o2 *PyObject) *PyObject

Returns the result of multiplying o1 and o2, or NULL on failure.

This is the equivalent of the Python expression: o1 * o2.

llgo:link (*PyObject).PyNumber_Multiply C.PyNumber_Multiply

func (*PyObject) PyNumber_Negative

func (self *PyObject) PyNumber_Negative() *PyObject

Returns the negation of o on success, or NULL on failure.

This is the equivalent of the Python expression: -o.

llgo:link (*PyObject).PyNumber_Negative C.PyNumber_Negative

func (*PyObject) PyNumber_Or

func (self *PyObject) PyNumber_Or(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_Or C.PyNumber_Or

func (*PyObject) PyNumber_Positive

func (self *PyObject) PyNumber_Positive() *PyObject

Returns the positive of o on success, or NULL on failure.

This is the equivalent of the Python expression: +o.

llgo:link (*PyObject).PyNumber_Positive C.PyNumber_Positive

func (*PyObject) PyNumber_Power

func (self *PyObject) PyNumber_Power(o2 *PyObject, o3 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_Power C.PyNumber_Power

func (*PyObject) PyNumber_Remainder

func (self *PyObject) PyNumber_Remainder(o2 *PyObject) *PyObject

Returns the remainder of dividing o1 by o2, or NULL on failure.

This is the equivalent of the Python expression: o1 % o2.

llgo:link (*PyObject).PyNumber_Remainder C.PyNumber_Remainder

func (*PyObject) PyNumber_Rshift

func (self *PyObject) PyNumber_Rshift(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_Rshift C.PyNumber_Rshift

func (*PyObject) PyNumber_Subtract

func (self *PyObject) PyNumber_Subtract(o2 *PyObject) *PyObject

Returns the result of subtracting o2 from o1, or NULL on failure.

This is the equivalent of the Python expression: o1 - o2.

llgo:link (*PyObject).PyNumber_Subtract C.PyNumber_Subtract

func (*PyObject) PyNumber_ToBase

func (self *PyObject) PyNumber_ToBase(base c.Int) *PyObject

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.

llgo:link (*PyObject).PyNumber_ToBase C.PyNumber_ToBase

func (*PyObject) PyNumber_TrueDivide

func (self *PyObject) PyNumber_TrueDivide(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_TrueDivide C.PyNumber_TrueDivide

func (*PyObject) PyNumber_Xor

func (self *PyObject) PyNumber_Xor(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PyNumber_Xor C.PyNumber_Xor

func (*PyObject) PyODict_DelItem

func (self *PyObject) PyODict_DelItem(key *PyObject) c.Int

llgo:link (*PyObject).PyODict_DelItem C.PyODict_DelItem

func (*PyObject) PyODict_SetItem

func (self *PyObject) PyODict_SetItem(key *PyObject, item *PyObject) c.Int

llgo:link (*PyObject).PyODict_SetItem C.PyODict_SetItem

func (*PyObject) PyOS_FSPath

func (self *PyObject) PyOS_FSPath() *PyObject

llgo:link (*PyObject).PyOS_FSPath C.PyOS_FSPath

func (*PyObject) PyPickleBuffer_FromObject

func (self *PyObject) PyPickleBuffer_FromObject() *PyObject

Create a PickleBuffer redirecting to the given buffer-enabled object

llgo:link (*PyObject).PyPickleBuffer_FromObject C.PyPickleBuffer_FromObject

func (*PyObject) PyPickleBuffer_GetBuffer

func (self *PyObject) PyPickleBuffer_GetBuffer() *PyBuffer

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

llgo:link (*PyObject).PyPickleBuffer_GetBuffer C.PyPickleBuffer_GetBuffer

func (*PyObject) PyPickleBuffer_Release

func (self *PyObject) PyPickleBuffer_Release() c.Int

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

llgo:link (*PyObject).PyPickleBuffer_Release C.PyPickleBuffer_Release

func (*PyObject) PySeqIter_New

func (self *PyObject) PySeqIter_New() *PyObject

llgo:link (*PyObject).PySeqIter_New C.PySeqIter_New

func (*PyObject) PySequence_Check

func (self *PyObject) PySequence_Check() c.Int

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

This function always succeeds.

llgo:link (*PyObject).PySequence_Check C.PySequence_Check

func (*PyObject) PySequence_Concat

func (self *PyObject) PySequence_Concat(o2 *PyObject) *PyObject

Return the concatenation of o1 and o2 on success, and NULL on failure.

This is the equivalent of the Python expression: o1 + o2.

llgo:link (*PyObject).PySequence_Concat C.PySequence_Concat

func (*PyObject) PySequence_Contains

func (self *PyObject) PySequence_Contains(ob *PyObject) 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().

llgo:link (*PyObject).PySequence_Contains C.PySequence_Contains

func (*PyObject) PySequence_Count

func (self *PyObject) PySequence_Count(value *PyObject) PySsizeT

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).

llgo:link (*PyObject).PySequence_Count C.PySequence_Count

func (*PyObject) PySequence_DelItem

func (self *PyObject) PySequence_DelItem(i PySsizeT) 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].

llgo:link (*PyObject).PySequence_DelItem C.PySequence_DelItem

func (*PyObject) PySequence_DelSlice

func (self *PyObject) PySequence_DelSlice(i1 PySsizeT, i2 PySsizeT) 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].

llgo:link (*PyObject).PySequence_DelSlice C.PySequence_DelSlice

func (*PyObject) PySequence_Fast

func (self *PyObject) PySequence_Fast(m *c.Char) *PyObject

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.

llgo:link (*PyObject).PySequence_Fast C.PySequence_Fast

func (*PyObject) PySequence_GetItem

func (self *PyObject) PySequence_GetItem(i PySsizeT) *PyObject

Return the ith element of o, or NULL on failure.

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

llgo:link (*PyObject).PySequence_GetItem C.PySequence_GetItem

func (*PyObject) PySequence_GetSlice

func (self *PyObject) PySequence_GetSlice(i1 PySsizeT, i2 PySsizeT) *PyObject

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].

llgo:link (*PyObject).PySequence_GetSlice C.PySequence_GetSlice

func (*PyObject) PySequence_In

func (self *PyObject) PySequence_In(value *PyObject) 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.

llgo:link (*PyObject).PySequence_In C.PySequence_In

func (*PyObject) PySequence_InPlaceConcat

func (self *PyObject) PySequence_InPlaceConcat(o2 *PyObject) *PyObject

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.

llgo:link (*PyObject).PySequence_InPlaceConcat C.PySequence_InPlaceConcat

func (*PyObject) PySequence_InPlaceRepeat

func (self *PyObject) PySequence_InPlaceRepeat(count PySsizeT) *PyObject

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.

llgo:link (*PyObject).PySequence_InPlaceRepeat C.PySequence_InPlaceRepeat

func (*PyObject) PySequence_Index

func (self *PyObject) PySequence_Index(value *PyObject) PySsizeT

Return the first index for which o[i] == value. On error, return -1.

This is equivalent to the Python expression: o.index(value).

llgo:link (*PyObject).PySequence_Index C.PySequence_Index

func (*PyObject) PySequence_Length

func (self *PyObject) PySequence_Length() PySsizeT

llgo:link (*PyObject).PySequence_Length C.PySequence_Length

func (*PyObject) PySequence_List

func (self *PyObject) PySequence_List() *PyObject

Returns the sequence 'o' as a list on success, and NULL on failure. This is equivalent to the Python expression: list(o)

llgo:link (*PyObject).PySequence_List C.PySequence_List

func (*PyObject) PySequence_Repeat

func (self *PyObject) PySequence_Repeat(count PySsizeT) *PyObject

Return the result of repeating sequence object 'o' 'count' times, or NULL on failure.

This is the equivalent of the Python expression: o * count.

llgo:link (*PyObject).PySequence_Repeat C.PySequence_Repeat

func (*PyObject) PySequence_SetItem

func (self *PyObject) PySequence_SetItem(i PySsizeT, v *PyObject) 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.

llgo:link (*PyObject).PySequence_SetItem C.PySequence_SetItem

func (*PyObject) PySequence_SetSlice

func (self *PyObject) PySequence_SetSlice(i1 PySsizeT, i2 PySsizeT, v *PyObject) 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.

llgo:link (*PyObject).PySequence_SetSlice C.PySequence_SetSlice

func (*PyObject) PySequence_Size

func (self *PyObject) PySequence_Size() PySsizeT

Return the size of sequence object o, or -1 on failure.

llgo:link (*PyObject).PySequence_Size C.PySequence_Size

func (*PyObject) PySequence_Tuple

func (self *PyObject) PySequence_Tuple() *PyObject

Returns the sequence 'o' as a tuple on success, and NULL on failure.

This is equivalent to the Python expression: tuple(o).

llgo:link (*PyObject).PySequence_Tuple C.PySequence_Tuple

func (*PyObject) PySet_Add

func (self *PyObject) PySet_Add(key *PyObject) c.Int

llgo:link (*PyObject).PySet_Add C.PySet_Add

func (*PyObject) PySet_Clear

func (self *PyObject) PySet_Clear() c.Int

llgo:link (*PyObject).PySet_Clear C.PySet_Clear

func (*PyObject) PySet_Contains

func (self *PyObject) PySet_Contains(key *PyObject) c.Int

llgo:link (*PyObject).PySet_Contains C.PySet_Contains

func (*PyObject) PySet_Discard

func (self *PyObject) PySet_Discard(key *PyObject) c.Int

llgo:link (*PyObject).PySet_Discard C.PySet_Discard

func (*PyObject) PySet_New

func (self *PyObject) PySet_New() *PyObject

llgo:link (*PyObject).PySet_New C.PySet_New

func (*PyObject) PySet_Pop

func (self *PyObject) PySet_Pop() *PyObject

llgo:link (*PyObject).PySet_Pop C.PySet_Pop

func (*PyObject) PySet_Size

func (self *PyObject) PySet_Size() PySsizeT

llgo:link (*PyObject).PySet_Size C.PySet_Size

func (*PyObject) PySlice_GetIndices

func (self *PyObject) PySlice_GetIndices(length PySsizeT, start *PySsizeT, stop *PySsizeT, step *PySsizeT) c.Int

llgo:link (*PyObject).PySlice_GetIndices C.PySlice_GetIndices

func (*PyObject) PySlice_GetIndicesEx

func (self *PyObject) PySlice_GetIndicesEx(length PySsizeT, start *PySsizeT, stop *PySsizeT, step *PySsizeT, slicelength *PySsizeT) c.Int

llgo:link (*PyObject).PySlice_GetIndicesEx C.PySlice_GetIndicesEx

func (*PyObject) PySlice_New

func (self *PyObject) PySlice_New(stop *PyObject, step *PyObject) *PyObject

llgo:link (*PyObject).PySlice_New C.PySlice_New

func (*PyObject) PySlice_Unpack

func (self *PyObject) PySlice_Unpack(start *PySsizeT, stop *PySsizeT, step *PySsizeT) c.Int

llgo:link (*PyObject).PySlice_Unpack C.PySlice_Unpack

func (*PyObject) PyState_AddModule

func (self *PyObject) PyState_AddModule(_llcppg_param2 *PyModuleDef) c.Int

New in 3.3

llgo:link (*PyObject).PyState_AddModule C.PyState_AddModule

func (*PyObject) PyStaticMethod_New

func (self *PyObject) PyStaticMethod_New() *PyObject

llgo:link (*PyObject).PyStaticMethod_New C.PyStaticMethod_New

func (*PyObject) PyStructSequence_GetItem

func (self *PyObject) PyStructSequence_GetItem(_llcppg_param2 PySsizeT) *PyObject

llgo:link (*PyObject).PyStructSequence_GetItem C.PyStructSequence_GetItem

func (*PyObject) PyStructSequence_SetItem

func (self *PyObject) PyStructSequence_SetItem(_llcppg_param2 PySsizeT, _llcppg_param3 *PyObject)

llgo:link (*PyObject).PyStructSequence_SetItem C.PyStructSequence_SetItem

func (*PyObject) PyTraceBack_Print

func (self *PyObject) PyTraceBack_Print(_llcppg_param2 *PyObject) c.Int

llgo:link (*PyObject).PyTraceBack_Print C.PyTraceBack_Print

func (*PyObject) PyTuple_GetItem

func (self *PyObject) PyTuple_GetItem(_llcppg_param2 PySsizeT) *PyObject

llgo:link (*PyObject).PyTuple_GetItem C.PyTuple_GetItem

func (*PyObject) PyTuple_GetSlice

func (self *PyObject) PyTuple_GetSlice(_llcppg_param2 PySsizeT, _llcppg_param3 PySsizeT) *PyObject

llgo:link (*PyObject).PyTuple_GetSlice C.PyTuple_GetSlice

func (*PyObject) PyTuple_SetItem

func (self *PyObject) PyTuple_SetItem(_llcppg_param2 PySsizeT, _llcppg_param3 *PyObject) c.Int

llgo:link (*PyObject).PyTuple_SetItem C.PyTuple_SetItem

func (*PyObject) PyTuple_Size

func (self *PyObject) PyTuple_Size() PySsizeT

llgo:link (*PyObject).PyTuple_Size C.PyTuple_Size

func (*PyObject) PyType_FromModuleAndSpec

func (self *PyObject) PyType_FromModuleAndSpec(_llcppg_param2 *PyType_Spec, _llcppg_param3 *PyObject) *PyObject

llgo:link (*PyObject).PyType_FromModuleAndSpec C.PyType_FromModuleAndSpec

func (*PyObject) PyUnicodeDecodeError_GetEncoding

func (self *PyObject) PyUnicodeDecodeError_GetEncoding() *PyObject

llgo:link (*PyObject).PyUnicodeDecodeError_GetEncoding C.PyUnicodeDecodeError_GetEncoding

func (*PyObject) PyUnicodeDecodeError_GetEnd

func (self *PyObject) PyUnicodeDecodeError_GetEnd(_llcppg_param2 *PySsizeT) c.Int

llgo:link (*PyObject).PyUnicodeDecodeError_GetEnd C.PyUnicodeDecodeError_GetEnd

func (*PyObject) PyUnicodeDecodeError_GetObject

func (self *PyObject) PyUnicodeDecodeError_GetObject() *PyObject

llgo:link (*PyObject).PyUnicodeDecodeError_GetObject C.PyUnicodeDecodeError_GetObject

func (*PyObject) PyUnicodeDecodeError_GetReason

func (self *PyObject) PyUnicodeDecodeError_GetReason() *PyObject

llgo:link (*PyObject).PyUnicodeDecodeError_GetReason C.PyUnicodeDecodeError_GetReason

func (*PyObject) PyUnicodeDecodeError_GetStart

func (self *PyObject) PyUnicodeDecodeError_GetStart(_llcppg_param2 *PySsizeT) c.Int

llgo:link (*PyObject).PyUnicodeDecodeError_GetStart C.PyUnicodeDecodeError_GetStart

func (*PyObject) PyUnicodeDecodeError_SetEnd

func (self *PyObject) PyUnicodeDecodeError_SetEnd(_llcppg_param2 PySsizeT) c.Int

llgo:link (*PyObject).PyUnicodeDecodeError_SetEnd C.PyUnicodeDecodeError_SetEnd

func (*PyObject) PyUnicodeDecodeError_SetReason

func (self *PyObject) PyUnicodeDecodeError_SetReason(reason *c.Char) c.Int

llgo:link (*PyObject).PyUnicodeDecodeError_SetReason C.PyUnicodeDecodeError_SetReason

func (*PyObject) PyUnicodeDecodeError_SetStart

func (self *PyObject) PyUnicodeDecodeError_SetStart(_llcppg_param2 PySsizeT) c.Int

llgo:link (*PyObject).PyUnicodeDecodeError_SetStart C.PyUnicodeDecodeError_SetStart

func (*PyObject) PyUnicodeEncodeError_GetEncoding

func (self *PyObject) PyUnicodeEncodeError_GetEncoding() *PyObject

get the encoding attribute

llgo:link (*PyObject).PyUnicodeEncodeError_GetEncoding C.PyUnicodeEncodeError_GetEncoding

func (*PyObject) PyUnicodeEncodeError_GetEnd

func (self *PyObject) PyUnicodeEncodeError_GetEnd(_llcppg_param2 *PySsizeT) c.Int

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

llgo:link (*PyObject).PyUnicodeEncodeError_GetEnd C.PyUnicodeEncodeError_GetEnd

func (*PyObject) PyUnicodeEncodeError_GetObject

func (self *PyObject) PyUnicodeEncodeError_GetObject() *PyObject

get the object attribute

llgo:link (*PyObject).PyUnicodeEncodeError_GetObject C.PyUnicodeEncodeError_GetObject

func (*PyObject) PyUnicodeEncodeError_GetReason

func (self *PyObject) PyUnicodeEncodeError_GetReason() *PyObject

get the value of the reason attribute

llgo:link (*PyObject).PyUnicodeEncodeError_GetReason C.PyUnicodeEncodeError_GetReason

func (*PyObject) PyUnicodeEncodeError_GetStart

func (self *PyObject) PyUnicodeEncodeError_GetStart(_llcppg_param2 *PySsizeT) c.Int

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

llgo:link (*PyObject).PyUnicodeEncodeError_GetStart C.PyUnicodeEncodeError_GetStart

func (*PyObject) PyUnicodeEncodeError_SetEnd

func (self *PyObject) PyUnicodeEncodeError_SetEnd(_llcppg_param2 PySsizeT) c.Int

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

llgo:link (*PyObject).PyUnicodeEncodeError_SetEnd C.PyUnicodeEncodeError_SetEnd

func (*PyObject) PyUnicodeEncodeError_SetReason

func (self *PyObject) PyUnicodeEncodeError_SetReason(reason *c.Char) c.Int

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

llgo:link (*PyObject).PyUnicodeEncodeError_SetReason C.PyUnicodeEncodeError_SetReason

func (*PyObject) PyUnicodeEncodeError_SetStart

func (self *PyObject) PyUnicodeEncodeError_SetStart(_llcppg_param2 PySsizeT) c.Int

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

llgo:link (*PyObject).PyUnicodeEncodeError_SetStart C.PyUnicodeEncodeError_SetStart

func (*PyObject) PyUnicodeTranslateError_GetEnd

func (self *PyObject) PyUnicodeTranslateError_GetEnd(_llcppg_param2 *PySsizeT) c.Int

llgo:link (*PyObject).PyUnicodeTranslateError_GetEnd C.PyUnicodeTranslateError_GetEnd

func (*PyObject) PyUnicodeTranslateError_GetObject

func (self *PyObject) PyUnicodeTranslateError_GetObject() *PyObject

llgo:link (*PyObject).PyUnicodeTranslateError_GetObject C.PyUnicodeTranslateError_GetObject

func (*PyObject) PyUnicodeTranslateError_GetReason

func (self *PyObject) PyUnicodeTranslateError_GetReason() *PyObject

llgo:link (*PyObject).PyUnicodeTranslateError_GetReason C.PyUnicodeTranslateError_GetReason

func (*PyObject) PyUnicodeTranslateError_GetStart

func (self *PyObject) PyUnicodeTranslateError_GetStart(_llcppg_param2 *PySsizeT) c.Int

llgo:link (*PyObject).PyUnicodeTranslateError_GetStart C.PyUnicodeTranslateError_GetStart

func (*PyObject) PyUnicodeTranslateError_SetEnd

func (self *PyObject) PyUnicodeTranslateError_SetEnd(_llcppg_param2 PySsizeT) c.Int

llgo:link (*PyObject).PyUnicodeTranslateError_SetEnd C.PyUnicodeTranslateError_SetEnd

func (*PyObject) PyUnicodeTranslateError_SetReason

func (self *PyObject) PyUnicodeTranslateError_SetReason(reason *c.Char) c.Int

llgo:link (*PyObject).PyUnicodeTranslateError_SetReason C.PyUnicodeTranslateError_SetReason

func (*PyObject) PyUnicodeTranslateError_SetStart

func (self *PyObject) PyUnicodeTranslateError_SetStart(_llcppg_param2 PySsizeT) c.Int

llgo:link (*PyObject).PyUnicodeTranslateError_SetStart C.PyUnicodeTranslateError_SetStart

func (*PyObject) PyUnicode_AsASCIIString

func (self *PyObject) PyUnicode_AsASCIIString() *PyObject

llgo:link (*PyObject).PyUnicode_AsASCIIString C.PyUnicode_AsASCIIString

func (*PyObject) PyUnicode_AsCharmapString

func (self *PyObject) PyUnicode_AsCharmapString(mapping *PyObject) *PyObject

llgo:link (*PyObject).PyUnicode_AsCharmapString C.PyUnicode_AsCharmapString

func (*PyObject) PyUnicode_AsDecodedObject

func (self *PyObject) PyUnicode_AsDecodedObject(encoding *c.Char, errors *c.Char) *PyObject

Decode a Unicode object unicode and return the result as Python object.

This API is DEPRECATED and will be removed in 3.15. The only supported standard encoding is rot13. Use PyCodec_Decode() to decode with rot13 and non-standard codecs that decode from str.

llgo:link (*PyObject).PyUnicode_AsDecodedObject C.PyUnicode_AsDecodedObject

func (*PyObject) PyUnicode_AsDecodedUnicode

func (self *PyObject) PyUnicode_AsDecodedUnicode(encoding *c.Char, errors *c.Char) *PyObject

Decode a Unicode object unicode and return the result as Unicode object.

This API is DEPRECATED and will be removed in 3.15. The only supported standard encoding is rot13. Use PyCodec_Decode() to decode with rot13 and non-standard codecs that decode from str to str.

llgo:link (*PyObject).PyUnicode_AsDecodedUnicode C.PyUnicode_AsDecodedUnicode

func (*PyObject) PyUnicode_AsEncodedObject

func (self *PyObject) PyUnicode_AsEncodedObject(encoding *c.Char, errors *c.Char) *PyObject

Encodes a Unicode object and returns the result as Python object.

This API is DEPRECATED and will be removed in 3.15. It is superseded by PyUnicode_AsEncodedString() since all standard encodings (except rot13) encode str to bytes. Use PyCodec_Encode() for encoding with rot13 and non-standard codecs that encode form str to non-bytes.

llgo:link (*PyObject).PyUnicode_AsEncodedObject C.PyUnicode_AsEncodedObject

func (*PyObject) PyUnicode_AsEncodedString

func (self *PyObject) PyUnicode_AsEncodedString(encoding *c.Char, errors *c.Char) *PyObject

Encodes a Unicode object and returns the result as Python string object.

llgo:link (*PyObject).PyUnicode_AsEncodedString C.PyUnicode_AsEncodedString

func (*PyObject) PyUnicode_AsEncodedUnicode

func (self *PyObject) PyUnicode_AsEncodedUnicode(encoding *c.Char, errors *c.Char) *PyObject

Encodes a Unicode object and returns the result as Unicode object.

This API is DEPRECATED and will be removed in 3.15. The only supported standard encodings is rot13. Use PyCodec_Encode() to encode with rot13 and non-standard codecs that encode from str to str.

llgo:link (*PyObject).PyUnicode_AsEncodedUnicode C.PyUnicode_AsEncodedUnicode

func (*PyObject) PyUnicode_AsLatin1String

func (self *PyObject) PyUnicode_AsLatin1String() *PyObject

llgo:link (*PyObject).PyUnicode_AsLatin1String C.PyUnicode_AsLatin1String

func (*PyObject) PyUnicode_AsRawUnicodeEscapeString

func (self *PyObject) PyUnicode_AsRawUnicodeEscapeString() *PyObject

llgo:link (*PyObject).PyUnicode_AsRawUnicodeEscapeString C.PyUnicode_AsRawUnicodeEscapeString

func (*PyObject) PyUnicode_AsUCS4

func (self *PyObject) PyUnicode_AsUCS4(buffer *Py_UCS4, buflen PySsizeT, copy_null c.Int) *Py_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 (*PyObject).PyUnicode_AsUCS4 C.PyUnicode_AsUCS4

func (*PyObject) PyUnicode_AsUCS4Copy

func (self *PyObject) PyUnicode_AsUCS4Copy() *Py_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 (*PyObject).PyUnicode_AsUCS4Copy C.PyUnicode_AsUCS4Copy

func (*PyObject) PyUnicode_AsUTF8

func (self *PyObject) PyUnicode_AsUTF8() *c.Char

Returns a pointer to the default encoding (UTF-8) of the Unicode object unicode.

Like PyUnicode_AsUTF8AndSize(), this also caches the UTF-8 representation in the unicodeobject.

_PyUnicode_AsString is a #define for PyUnicode_AsUTF8 to support the previous internal function with the same behaviour.

Use of this API is DEPRECATED since no size information can be extracted from the returned data.

llgo:link (*PyObject).PyUnicode_AsUTF8 C.PyUnicode_AsUTF8

func (*PyObject) PyUnicode_AsUTF8AndSize

func (self *PyObject) PyUnicode_AsUTF8AndSize(size *PySsizeT) *c.Char

llgo:link (*PyObject).PyUnicode_AsUTF8AndSize C.PyUnicode_AsUTF8AndSize

func (*PyObject) PyUnicode_AsUTF8String

func (self *PyObject) PyUnicode_AsUTF8String() *PyObject

llgo:link (*PyObject).PyUnicode_AsUTF8String C.PyUnicode_AsUTF8String

func (*PyObject) PyUnicode_AsUTF16String

func (self *PyObject) PyUnicode_AsUTF16String() *PyObject

Returns a Python string using the UTF-16 encoding in native byte order. The string always starts with a BOM mark.

llgo:link (*PyObject).PyUnicode_AsUTF16String C.PyUnicode_AsUTF16String

func (*PyObject) PyUnicode_AsUTF32String

func (self *PyObject) PyUnicode_AsUTF32String() *PyObject

Returns a Python string using the UTF-32 encoding in native byte order. The string always starts with a BOM mark.

llgo:link (*PyObject).PyUnicode_AsUTF32String C.PyUnicode_AsUTF32String

func (*PyObject) PyUnicode_AsUnicodeEscapeString

func (self *PyObject) PyUnicode_AsUnicodeEscapeString() *PyObject

llgo:link (*PyObject).PyUnicode_AsUnicodeEscapeString C.PyUnicode_AsUnicodeEscapeString

func (*PyObject) PyUnicode_AsWideChar

func (self *PyObject) PyUnicode_AsWideChar(w *c.WcharT, size PySsizeT) PySsizeT

Copies the Unicode Object contents into the wchar_t buffer w. At most size wchar_t characters are copied.

Note that the resulting wchar_t string may or may not be 0-terminated. It is the responsibility of the caller to make sure that the wchar_t string is 0-terminated in case this is required by the application.

Returns the number of wchar_t characters copied (excluding a possibly trailing 0-termination character) or -1 in case of an error.

llgo:link (*PyObject).PyUnicode_AsWideChar C.PyUnicode_AsWideChar

func (*PyObject) PyUnicode_AsWideCharString

func (self *PyObject) PyUnicode_AsWideCharString(size *PySsizeT) *c.WcharT

Convert the Unicode object to a wide character string. The output string always ends with a nul character. If size is not NULL, write the number of wide characters (excluding the null character) into *size.

Returns a buffer allocated by PyMem_Malloc() (use PyMem_Free() to free it) on success. On error, returns NULL, *size is undefined and raises a MemoryError.

llgo:link (*PyObject).PyUnicode_AsWideCharString C.PyUnicode_AsWideCharString

func (*PyObject) PyUnicode_BuildEncodingMap

func (self *PyObject) PyUnicode_BuildEncodingMap() *PyObject

Build an encoding map.

llgo:link (*PyObject).PyUnicode_BuildEncodingMap C.PyUnicode_BuildEncodingMap

func (*PyObject) PyUnicode_Compare

func (self *PyObject) PyUnicode_Compare(right *PyObject) c.Int

Compare two strings and return -1, 0, 1 for less than, equal, greater than resp. Raise an exception and return -1 on error.

llgo:link (*PyObject).PyUnicode_Compare C.PyUnicode_Compare

func (*PyObject) PyUnicode_CompareWithASCIIString

func (self *PyObject) PyUnicode_CompareWithASCIIString(right *c.Char) c.Int

Compare a Unicode object with C string and return -1, 0, 1 for less than, equal, and greater than, respectively. It is best to pass only ASCII-encoded strings, but the function interprets the input string as ISO-8859-1 if it contains non-ASCII characters. This function does not raise exceptions.

llgo:link (*PyObject).PyUnicode_CompareWithASCIIString C.PyUnicode_CompareWithASCIIString

func (*PyObject) PyUnicode_Concat

func (self *PyObject) PyUnicode_Concat(right *PyObject) *PyObject

Concat two strings giving a new Unicode string.

llgo:link (*PyObject).PyUnicode_Concat C.PyUnicode_Concat

func (*PyObject) PyUnicode_Contains

func (self *PyObject) PyUnicode_Contains(element *PyObject) c.Int

Checks whether element is contained in container and return 1/0 accordingly.

element has to coerce to a one element Unicode string. -1 is returned in case of an error.

llgo:link (*PyObject).PyUnicode_Contains C.PyUnicode_Contains

func (*PyObject) PyUnicode_CopyCharacters

func (self *PyObject) PyUnicode_CopyCharacters(to_start PySsizeT, from *PyObject, from_start PySsizeT, how_many PySsizeT) PySsizeT

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 (*PyObject).PyUnicode_CopyCharacters C.PyUnicode_CopyCharacters

func (*PyObject) PyUnicode_Count

func (self *PyObject) PyUnicode_Count(substr *PyObject, start PySsizeT, end PySsizeT) PySsizeT

Count the number of occurrences of substr in str[start:end].

llgo:link (*PyObject).PyUnicode_Count C.PyUnicode_Count

func (*PyObject) PyUnicode_DATA

func (self *PyObject) PyUnicode_DATA() unsafe.Pointer

llgo:link (*PyObject).PyUnicode_DATA C.PyUnicode_DATA

func (*PyObject) PyUnicode_EncodeFSDefault

func (self *PyObject) PyUnicode_EncodeFSDefault() *PyObject

Encode a Unicode object to the Python filesystem encoding and error handler. Return bytes.

llgo:link (*PyObject).PyUnicode_EncodeFSDefault C.PyUnicode_EncodeFSDefault

func (*PyObject) PyUnicode_EncodeLocale

func (self *PyObject) PyUnicode_EncodeLocale(errors *c.Char) *PyObject

Encode a Unicode object to the current locale encoding. The encoder is strict is *surrogateescape* is equal to zero, otherwise the "surrogateescape" error handler is used. Return a bytes object. The string cannot contain embedded null characters.

llgo:link (*PyObject).PyUnicode_EncodeLocale C.PyUnicode_EncodeLocale

func (*PyObject) PyUnicode_Equal

func (self *PyObject) PyUnicode_Equal(str2 *PyObject) c.Int

llgo:link (*PyObject).PyUnicode_Equal C.PyUnicode_Equal

func (*PyObject) PyUnicode_EqualToUTF8

func (self *PyObject) PyUnicode_EqualToUTF8(_llcppg_param2 *c.Char) c.Int

Compare a Unicode object with UTF-8 encoded C string. Return 1 if they are equal, or 0 otherwise. This function does not raise exceptions.

llgo:link (*PyObject).PyUnicode_EqualToUTF8 C.PyUnicode_EqualToUTF8

func (*PyObject) PyUnicode_EqualToUTF8AndSize

func (self *PyObject) PyUnicode_EqualToUTF8AndSize(_llcppg_param2 *c.Char, _llcppg_param3 PySsizeT) c.Int

llgo:link (*PyObject).PyUnicode_EqualToUTF8AndSize C.PyUnicode_EqualToUTF8AndSize

func (*PyObject) PyUnicode_FSConverter

func (self *PyObject) PyUnicode_FSConverter(_llcppg_param2 unsafe.Pointer) c.Int

ParseTuple converter: encode str objects to bytes using PyUnicode_EncodeFSDefault(); bytes objects are output as-is.

llgo:link (*PyObject).PyUnicode_FSConverter C.PyUnicode_FSConverter

func (*PyObject) PyUnicode_FSDecoder

func (self *PyObject) PyUnicode_FSDecoder(_llcppg_param2 unsafe.Pointer) c.Int

ParseTuple converter: decode bytes objects to unicode using PyUnicode_DecodeFSDefaultAndSize(); str objects are output as-is.

llgo:link (*PyObject).PyUnicode_FSDecoder C.PyUnicode_FSDecoder

func (*PyObject) PyUnicode_Fill

func (self *PyObject) PyUnicode_Fill(start PySsizeT, length PySsizeT, fill_char Py_UCS4) PySsizeT

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 (*PyObject).PyUnicode_Fill C.PyUnicode_Fill

func (*PyObject) PyUnicode_Find

func (self *PyObject) PyUnicode_Find(substr *PyObject, start PySsizeT, end PySsizeT, direction c.Int) PySsizeT

Return the first position of substr in str[start:end] using the given search direction or -1 if not found. -2 is returned in case an error occurred and an exception is set.

llgo:link (*PyObject).PyUnicode_Find C.PyUnicode_Find

func (*PyObject) PyUnicode_FindChar

func (self *PyObject) PyUnicode_FindChar(ch Py_UCS4, start PySsizeT, end PySsizeT, direction c.Int) PySsizeT

Like PyUnicode_Find, but search for single character only.

llgo:link (*PyObject).PyUnicode_FindChar C.PyUnicode_FindChar

func (*PyObject) PyUnicode_Format

func (self *PyObject) PyUnicode_Format(args *PyObject) *PyObject

Apply an argument tuple or dictionary to a format string and return the resulting Unicode string.

llgo:link (*PyObject).PyUnicode_Format C.PyUnicode_Format

func (*PyObject) PyUnicode_FromEncodedObject

func (self *PyObject) PyUnicode_FromEncodedObject(encoding *c.Char, errors *c.Char) *PyObject

Decode obj to a Unicode object.

bytes, bytearray and other bytes-like objects are decoded according to the given encoding and error handler. The encoding and error handler can be NULL to have the interface use UTF-8 and "strict".

All other objects (including Unicode objects) raise an exception.

The API returns NULL in case of an error. The caller is responsible for decref'ing the returned objects.

llgo:link (*PyObject).PyUnicode_FromEncodedObject C.PyUnicode_FromEncodedObject

func (*PyObject) PyUnicode_FromObject

func (self *PyObject) PyUnicode_FromObject() *PyObject

Copy an instance of a Unicode subtype to a new true Unicode object if necessary. If obj is already a true Unicode object (not a subtype), return the reference with *incremented* refcount.

The API returns NULL in case of an error. The caller is responsible for decref'ing the returned objects.

llgo:link (*PyObject).PyUnicode_FromObject C.PyUnicode_FromObject

func (*PyObject) PyUnicode_GetLength

func (self *PyObject) PyUnicode_GetLength() PySsizeT

Get the length of the Unicode object.

llgo:link (*PyObject).PyUnicode_GetLength C.PyUnicode_GetLength

func (*PyObject) PyUnicode_IsIdentifier

func (self *PyObject) PyUnicode_IsIdentifier() c.Int

Checks whether argument is a valid identifier.

llgo:link (*PyObject).PyUnicode_IsIdentifier C.PyUnicode_IsIdentifier

func (*PyObject) PyUnicode_Join

func (self *PyObject) PyUnicode_Join(seq *PyObject) *PyObject

Join a sequence of strings using the given separator and return the resulting Unicode string.

llgo:link (*PyObject).PyUnicode_Join C.PyUnicode_Join

func (*PyObject) PyUnicode_KIND

func (self *PyObject) PyUnicode_KIND() c.Int

llgo:link (*PyObject).PyUnicode_KIND C.PyUnicode_KIND

func (*PyObject) PyUnicode_Partition

func (self *PyObject) PyUnicode_Partition(sep *PyObject) *PyObject

Partition a string using a given separator.

llgo:link (*PyObject).PyUnicode_Partition C.PyUnicode_Partition

func (*PyObject) PyUnicode_RPartition

func (self *PyObject) PyUnicode_RPartition(sep *PyObject) *PyObject

Partition a string using a given separator, searching from the end of the string.

llgo:link (*PyObject).PyUnicode_RPartition C.PyUnicode_RPartition

func (*PyObject) PyUnicode_RSplit

func (self *PyObject) PyUnicode_RSplit(sep *PyObject, maxsplit PySsizeT) *PyObject

Split a string giving a list of Unicode strings.

If sep is NULL, splitting will be done at all whitespace substrings. Otherwise, splits occur at the given separator.

At most maxsplit splits will be done. But unlike PyUnicode_Split PyUnicode_RSplit splits from the end of the string. If negative, no limit is set.

Separators are not included in the resulting list.

llgo:link (*PyObject).PyUnicode_RSplit C.PyUnicode_RSplit

func (*PyObject) PyUnicode_ReadChar

func (self *PyObject) PyUnicode_ReadChar(index PySsizeT) Py_UCS4

Read a character from the string.

llgo:link (*PyObject).PyUnicode_ReadChar C.PyUnicode_ReadChar

func (*PyObject) PyUnicode_Replace

func (self *PyObject) PyUnicode_Replace(substr *PyObject, replstr *PyObject, maxcount PySsizeT) *PyObject

Replace at most maxcount occurrences of substr in str with replstr and return the resulting Unicode object.

llgo:link (*PyObject).PyUnicode_Replace C.PyUnicode_Replace

func (*PyObject) PyUnicode_RichCompare

func (self *PyObject) PyUnicode_RichCompare(right *PyObject, op c.Int) *PyObject

Rich compare two strings and return one of the following:

- NULL in case an exception was raised - Py_True or Py_False for successful comparisons - Py_NotImplemented in case the type combination is unknown

Possible values for op:

Py_GT, Py_GE, Py_EQ, Py_NE, Py_LT, Py_LE

llgo:link (*PyObject).PyUnicode_RichCompare C.PyUnicode_RichCompare

func (*PyObject) PyUnicode_Split

func (self *PyObject) PyUnicode_Split(sep *PyObject, maxsplit PySsizeT) *PyObject

Split a string giving a list of Unicode strings.

If sep is NULL, splitting will be done at all whitespace substrings. Otherwise, splits occur at the given separator.

At most maxsplit splits will be done. If negative, no limit is set.

Separators are not included in the resulting list.

llgo:link (*PyObject).PyUnicode_Split C.PyUnicode_Split

func (*PyObject) PyUnicode_Splitlines

func (self *PyObject) PyUnicode_Splitlines(keepends c.Int) *PyObject

Dito, but split at line breaks.

CRLF is considered to be one line break. Line breaks are not included in the resulting list.

llgo:link (*PyObject).PyUnicode_Splitlines C.PyUnicode_Splitlines

func (*PyObject) PyUnicode_Substring

func (self *PyObject) PyUnicode_Substring(start PySsizeT, end PySsizeT) *PyObject

llgo:link (*PyObject).PyUnicode_Substring C.PyUnicode_Substring

func (*PyObject) PyUnicode_Tailmatch

func (self *PyObject) PyUnicode_Tailmatch(substr *PyObject, start PySsizeT, end PySsizeT, direction c.Int) PySsizeT

Return 1 if substr matches str[start:end] at the given tail end, 0 otherwise.

llgo:link (*PyObject).PyUnicode_Tailmatch C.PyUnicode_Tailmatch

func (*PyObject) PyUnicode_Translate

func (self *PyObject) PyUnicode_Translate(table *PyObject, errors *c.Char) *PyObject

Translate a string by applying a character mapping table to it and return the resulting Unicode object.

The mapping table must map Unicode ordinal integers to Unicode strings, Unicode ordinal integers or None (causing deletion of the character).

Mapping tables may be dictionaries or sequences. Unmapped character ordinals (ones which cause a LookupError) are left untouched and are copied as-is.

llgo:link (*PyObject).PyUnicode_Translate C.PyUnicode_Translate

func (*PyObject) PyUnicode_WriteChar

func (self *PyObject) PyUnicode_WriteChar(index PySsizeT, character Py_UCS4) c.Int

Write a character to the string. The string must have been created through PyUnicode_New, must not be shared, and must not have been hashed yet.

Return 0 on success, -1 on error.

llgo:link (*PyObject).PyUnicode_WriteChar C.PyUnicode_WriteChar

func (*PyObject) PyUnstable_Code_GetExtra

func (self *PyObject) PyUnstable_Code_GetExtra(index PySsizeT, extra *unsafe.Pointer) c.Int

llgo:link (*PyObject).PyUnstable_Code_GetExtra C.PyUnstable_Code_GetExtra

func (*PyObject) PyUnstable_Code_SetExtra

func (self *PyObject) PyUnstable_Code_SetExtra(index PySsizeT, extra unsafe.Pointer) c.Int

llgo:link (*PyObject).PyUnstable_Code_SetExtra C.PyUnstable_Code_SetExtra

func (*PyObject) PyUnstable_EnableTryIncRef

func (self *PyObject) PyUnstable_EnableTryIncRef()

llgo:link (*PyObject).PyUnstable_EnableTryIncRef C.PyUnstable_EnableTryIncRef

func (*PyObject) PyUnstable_Exc_PrepReraiseStar

func (self *PyObject) PyUnstable_Exc_PrepReraiseStar(excs *PyObject) *PyObject

In exceptions.c

llgo:link (*PyObject).PyUnstable_Exc_PrepReraiseStar C.PyUnstable_Exc_PrepReraiseStar

func (*PyObject) PyUnstable_IsImmortal

func (self *PyObject) PyUnstable_IsImmortal() c.Int

Check whether the object is immortal. This cannot fail.

llgo:link (*PyObject).PyUnstable_IsImmortal C.PyUnstable_IsImmortal

func (*PyObject) PyUnstable_Object_ClearWeakRefsNoCallbacks

func (self *PyObject) PyUnstable_Object_ClearWeakRefsNoCallbacks()

llgo:link (*PyObject).PyUnstable_Object_ClearWeakRefsNoCallbacks C.PyUnstable_Object_ClearWeakRefsNoCallbacks

func (*PyObject) PyUnstable_Object_EnableDeferredRefcount

func (self *PyObject) PyUnstable_Object_EnableDeferredRefcount() 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.

llgo:link (*PyObject).PyUnstable_Object_EnableDeferredRefcount C.PyUnstable_Object_EnableDeferredRefcount

func (*PyObject) PyUnstable_Object_IsUniqueReferencedTemporary

func (self *PyObject) PyUnstable_Object_IsUniqueReferencedTemporary() c.Int

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

llgo:link (*PyObject).PyUnstable_Object_IsUniqueReferencedTemporary C.PyUnstable_Object_IsUniqueReferencedTemporary

func (*PyObject) PyUnstable_Object_IsUniquelyReferenced

func (self *PyObject) PyUnstable_Object_IsUniquelyReferenced() c.Int

llgo:link (*PyObject).PyUnstable_Object_IsUniquelyReferenced C.PyUnstable_Object_IsUniquelyReferenced

func (*PyObject) PyUnstable_TryIncRef

func (self *PyObject) PyUnstable_TryIncRef() 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.

llgo:link (*PyObject).PyUnstable_TryIncRef C.PyUnstable_TryIncRef

func (*PyObject) PyVectorcall_Call

func (self *PyObject) PyVectorcall_Call(tuple *PyObject, dict *PyObject) *PyObject

Call "callable" (which must support vectorcall) with positional arguments "tuple" and keyword arguments "dict". "dict" may also be NULL

llgo:link (*PyObject).PyVectorcall_Call C.PyVectorcall_Call

func (*PyObject) PyVectorcall_Function

func (self *PyObject) PyVectorcall_Function() Vectorcallfunc

llgo:link (*PyObject).PyVectorcall_Function C.PyVectorcall_Function

func (*PyObject) PyWeakref_GetObject

func (self *PyObject) PyWeakref_GetObject() *PyObject

llgo:link (*PyObject).PyWeakref_GetObject C.PyWeakref_GetObject

func (*PyObject) PyWeakref_GetRef

func (self *PyObject) PyWeakref_GetRef(pobj **PyObject) c.Int

llgo:link (*PyObject).PyWeakref_GetRef C.PyWeakref_GetRef

func (*PyObject) PyWeakref_IsDead

func (self *PyObject) PyWeakref_IsDead() c.Int

Test if a weak reference is dead.

llgo:link (*PyObject).PyWeakref_IsDead C.PyWeakref_IsDead

func (*PyObject) PyWeakref_NewProxy

func (self *PyObject) PyWeakref_NewProxy(callback *PyObject) *PyObject

llgo:link (*PyObject).PyWeakref_NewProxy C.PyWeakref_NewProxy

func (*PyObject) PyWeakref_NewRef

func (self *PyObject) PyWeakref_NewRef(callback *PyObject) *PyObject

llgo:link (*PyObject).PyWeakref_NewRef C.PyWeakref_NewRef

func (*PyObject) PyWrapper_New

func (self *PyObject) PyWrapper_New(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyObject).PyWrapper_New C.PyWrapper_New

func (*PyObject) Py_DecRef

func (self *PyObject) Py_DecRef()

llgo:link (*PyObject).Py_DecRef C.Py_DecRef

func (*PyObject) Py_GenericAlias

func (self *PyObject) Py_GenericAlias(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyObject).Py_GenericAlias C.Py_GenericAlias

func (*PyObject) Py_IncRef

func (self *PyObject) Py_IncRef()

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

llgo:link (*PyObject).Py_IncRef C.Py_IncRef

func (*PyObject) Py_Is

func (self *PyObject) Py_Is(y *PyObject) c.Int

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

llgo:link (*PyObject).Py_Is C.Py_Is

func (*PyObject) Py_IsFalse

func (self *PyObject) Py_IsFalse() c.Int

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

llgo:link (*PyObject).Py_IsFalse C.Py_IsFalse

func (*PyObject) Py_IsNone

func (self *PyObject) Py_IsNone() c.Int

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

llgo:link (*PyObject).Py_IsNone C.Py_IsNone

func (*PyObject) Py_IsTrue

func (self *PyObject) Py_IsTrue() c.Int

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

llgo:link (*PyObject).Py_IsTrue C.Py_IsTrue

func (*PyObject) Py_NewRef

func (self *PyObject) Py_NewRef() *PyObject

Create a new strong reference to an object: increment the reference count of the object and return the object.

llgo:link (*PyObject).Py_NewRef C.Py_NewRef

func (*PyObject) Py_REFCNT

func (self *PyObject) Py_REFCNT() PySsizeT

Py_REFCNT() implementation for the stable ABI

llgo:link (*PyObject).Py_REFCNT C.Py_REFCNT

func (*PyObject) Py_ReprEnter

func (self *PyObject) Py_ReprEnter() c.Int

Helpers for printing recursive container types

llgo:link (*PyObject).Py_ReprEnter C.Py_ReprEnter

func (*PyObject) Py_ReprLeave

func (self *PyObject) Py_ReprLeave()

llgo:link (*PyObject).Py_ReprLeave C.Py_ReprLeave

func (*PyObject) Py_TYPE

func (self *PyObject) Py_TYPE() *PyTypeObject

Py_TYPE() implementation for the stable ABI

llgo:link (*PyObject).Py_TYPE C.Py_TYPE

func (*PyObject) Py_XNewRef

func (self *PyObject) Py_XNewRef() *PyObject

Similar to Py_NewRef(), but the object can be NULL.

llgo:link (*PyObject).Py_XNewRef C.Py_XNewRef

func (*PyObject) Repr

func (self *PyObject) Repr() *PyObject

Generic operations on objects

llgo:link (*PyObject).Repr C.PyObject_Repr

func (*PyObject) RichCompare

func (self *PyObject) RichCompare(_llcppg_param2 *PyObject, _llcppg_param3 c.Int) *PyObject

llgo:link (*PyObject).RichCompare C.PyObject_RichCompare

func (*PyObject) RichCompareBool

func (self *PyObject) RichCompareBool(_llcppg_param2 *PyObject, _llcppg_param3 c.Int) c.Int

llgo:link (*PyObject).RichCompareBool C.PyObject_RichCompareBool

func (*PyObject) SelfIter

func (self *PyObject) SelfIter() *PyObject

llgo:link (*PyObject).SelfIter C.PyObject_SelfIter

func (*PyObject) SetAttr

func (self *PyObject) SetAttr(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject) c.Int

llgo:link (*PyObject).SetAttr C.PyObject_SetAttr

func (*PyObject) SetAttrString

func (self *PyObject) SetAttrString(_llcppg_param2 *c.Char, _llcppg_param3 *PyObject) c.Int

llgo:link (*PyObject).SetAttrString C.PyObject_SetAttrString

func (*PyObject) SetItem

func (self *PyObject) SetItem(key *PyObject, v *PyObject) 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 (*PyObject).SetItem C.PyObject_SetItem

func (*PyObject) Size

func (self *PyObject) Size() PySsizeT

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 (*PyObject).Size C.PyObject_Size

func (*PyObject) Str

func (self *PyObject) Str() *PyObject

llgo:link (*PyObject).Str C.PyObject_Str

func (*PyObject) Type

func (self *PyObject) Type() *PyObject

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 (*PyObject).Type C.PyObject_Type

func (*PyObject) TypeData

func (self *PyObject) TypeData(cls *PyTypeObject) unsafe.Pointer

llgo:link (*PyObject).TypeData C.PyObject_GetTypeData

func (*PyObject) Vectorcall

func (self *PyObject) Vectorcall(args **PyObject, nargsf c.SizeT, kwnames *PyObject) *PyObject

Perform a PEP 590-style vector call on 'callable'

llgo:link (*PyObject).Vectorcall C.PyObject_Vectorcall

func (*PyObject) VectorcallDict

func (self *PyObject) VectorcallDict(args **PyObject, nargsf c.SizeT, kwargs *PyObject) *PyObject

Same as PyObject_Vectorcall except that keyword arguments are passed as dict, which may be NULL if there are no keyword arguments.

llgo:link (*PyObject).VectorcallDict C.PyObject_VectorcallDict

func (*PyObject) VectorcallMethod

func (self *PyObject) VectorcallMethod(args **PyObject, nargsf c.SizeT, kwnames *PyObject) *PyObject

Call the method 'name' on args[0] with arguments in args[1..nargsf-1].

llgo:link (*PyObject).VectorcallMethod C.PyObject_VectorcallMethod

func (*PyObject) VisitManagedDict

func (self *PyObject) VisitManagedDict(visit Visitproc, arg unsafe.Pointer) c.Int

llgo:link (*PyObject).VisitManagedDict C.PyObject_VisitManagedDict

func (*PyObject) X_PyArg_ParseTupleAndKeywordsFast

func (self *PyObject) X_PyArg_ParseTupleAndKeywordsFast(_llcppg_param2 *PyObject, _llcppg_param3 *X_PyArg_Parser, __llgo_va_list ...any) c.Int

llgo:link (*PyObject).X_PyArg_ParseTupleAndKeywordsFast C._PyArg_ParseTupleAndKeywordsFast

func (*PyObject) X_PyCode_ConstantKey

func (self *PyObject) X_PyCode_ConstantKey() *PyObject

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.

llgo:link (*PyObject).X_PyCode_ConstantKey C._PyCode_ConstantKey

func (*PyObject) X_PyDict_GetItemStringWithError

func (self *PyObject) X_PyDict_GetItemStringWithError(_llcppg_param2 *c.Char) *PyObject

PyDict_GetItemStringRef() can be used instead

llgo:link (*PyObject).X_PyDict_GetItemStringWithError C._PyDict_GetItemStringWithError

func (*PyObject) X_PyDict_GetItem_KnownHash

func (self *PyObject) X_PyDict_GetItem_KnownHash(key *PyObject, hash PyHashT) *PyObject

llgo:link (*PyObject).X_PyDict_GetItem_KnownHash C._PyDict_GetItem_KnownHash

func (*PyObject) X_PyDict_Pop

func (self *PyObject) X_PyDict_Pop(key *PyObject, default_value *PyObject) *PyObject

Use PyDict_Pop() instead

llgo:link (*PyObject).X_PyDict_Pop C._PyDict_Pop

func (*PyObject) X_PyErr_ChainExceptions1

func (self *PyObject) X_PyErr_ChainExceptions1()

Context manipulation (PEP 3134)

llgo:link (*PyObject).X_PyErr_ChainExceptions1 C._PyErr_ChainExceptions1

func (*PyObject) X_PyEval_SliceIndex

func (self *PyObject) X_PyEval_SliceIndex(_llcppg_param2 *PySsizeT) c.Int

llgo:link (*PyObject).X_PyEval_SliceIndex C._PyEval_SliceIndex

func (*PyObject) X_PyEval_SliceIndexNotNone

func (self *PyObject) X_PyEval_SliceIndexNotNone(_llcppg_param2 *PySsizeT) c.Int

llgo:link (*PyObject).X_PyEval_SliceIndexNotNone C._PyEval_SliceIndexNotNone

func (*PyObject) X_PyLong_GCD

func (self *PyObject) X_PyLong_GCD(_llcppg_param2 *PyObject) *PyObject

For use by the gcd function in mathmodule.c

llgo:link (*PyObject).X_PyLong_GCD C._PyLong_GCD

func (*PyObject) X_PyLong_NumBits

func (self *PyObject) X_PyLong_NumBits() 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.

llgo:link (*PyObject).X_PyLong_NumBits C._PyLong_NumBits

func (*PyObject) X_PyLong_Sign

func (self *PyObject) X_PyLong_Sign() c.Int

llgo:link (*PyObject).X_PyLong_Sign C._PyLong_Sign

func (*PyObject) X_PyObject_AssertFailed

func (self *PyObject) X_PyObject_AssertFailed(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.

llgo:link (*PyObject).X_PyObject_AssertFailed C._PyObject_AssertFailed

func (*PyObject) X_PyObject_CallMethodId

func (self *PyObject) X_PyObject_CallMethodId(name *X_Py_Identifier, format *c.Char, __llgo_va_list ...any) *PyObject

Like PyObject_CallMethod(), but expect a _Py_Identifier* as the method name.

llgo:link (*PyObject).X_PyObject_CallMethodId C._PyObject_CallMethodId

func (*PyObject) X_PyObject_Dump

func (self *PyObject) X_PyObject_Dump()

llgo:link (*PyObject).X_PyObject_Dump C._PyObject_Dump

func (*PyObject) X_PyObject_FunctionStr

func (self *PyObject) X_PyObject_FunctionStr() *PyObject

llgo:link (*PyObject).X_PyObject_FunctionStr C._PyObject_FunctionStr

func (*PyObject) X_PyObject_GenericGetAttrWithDict

func (self *PyObject) X_PyObject_GenericGetAttrWithDict(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject, _llcppg_param4 c.Int) *PyObject

Same as PyObject_Generic{Get,Set}Attr, but passing the attributes dict as the last parameter.

llgo:link (*PyObject).X_PyObject_GenericGetAttrWithDict C._PyObject_GenericGetAttrWithDict

func (*PyObject) X_PyObject_GenericSetAttrWithDict

func (self *PyObject) X_PyObject_GenericSetAttrWithDict(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject, _llcppg_param4 *PyObject) c.Int

llgo:link (*PyObject).X_PyObject_GenericSetAttrWithDict C._PyObject_GenericSetAttrWithDict

func (*PyObject) X_PyObject_GetAttrId

func (self *PyObject) X_PyObject_GetAttrId(_llcppg_param2 *X_Py_Identifier) *PyObject

llgo:link (*PyObject).X_PyObject_GetAttrId C._PyObject_GetAttrId

func (*PyObject) X_PyObject_GetDictPtr

func (self *PyObject) X_PyObject_GetDictPtr() **PyObject

llgo:link (*PyObject).X_PyObject_GetDictPtr C._PyObject_GetDictPtr

func (*PyObject) X_PyObject_SetManagedDict

func (self *PyObject) X_PyObject_SetManagedDict(new_dict *PyObject) c.Int

llgo:link (*PyObject).X_PyObject_SetManagedDict C._PyObject_SetManagedDict

func (*PyObject) X_Py_Dealloc

func (self *PyObject) X_Py_Dealloc()

llgo:link (*PyObject).X_Py_Dealloc C._Py_Dealloc

func (*PyObject) X_Py_DecRef

func (self *PyObject) X_Py_DecRef()

llgo:link (*PyObject).X_Py_DecRef C._Py_DecRef

func (*PyObject) X_Py_ForgetReference

func (self *PyObject) X_Py_ForgetReference()

llgo:link (*PyObject).X_Py_ForgetReference C._Py_ForgetReference

func (*PyObject) X_Py_HashDouble

func (self *PyObject) X_Py_HashDouble(_llcppg_param2 c.Double) PyHashT

Helpers for hash functions

llgo:link (*PyObject).X_Py_HashDouble C._Py_HashDouble

func (*PyObject) X_Py_IncRef

func (self *PyObject) X_Py_IncRef()

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

llgo:link (*PyObject).X_Py_IncRef C._Py_IncRef

func (*PyObject) X_Py_NewReference

func (self *PyObject) X_Py_NewReference()

llgo:link (*PyObject).X_Py_NewReference C._Py_NewReference

func (*PyObject) X_Py_NewReferenceNoTotal

func (self *PyObject) X_Py_NewReferenceNoTotal()

llgo:link (*PyObject).X_Py_NewReferenceNoTotal C._Py_NewReferenceNoTotal

func (*PyObject) X_Py_ResurrectReference

func (self *PyObject) X_Py_ResurrectReference()

llgo:link (*PyObject).X_Py_ResurrectReference C._Py_ResurrectReference

func (*PyObject) X_Py_SetRefcnt

func (self *PyObject) X_Py_SetRefcnt(refcnt PySsizeT)

Py_SET_REFCNT() implementation for stable ABI

llgo:link (*PyObject).X_Py_SetRefcnt C._Py_SetRefcnt

type PyObjectArenaAllocator

type PyObjectArenaAllocator 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)
}

This example code implements an object constructor with a custom allocator, where PyObject_New is inlined, and shows the important distinction between two steps (at least): 1) the actual allocation of the object storage; 2) the initialization of the Python specific fields in this storage with PyObject_{Init, InitVar}.

PyObject * YourObject_New(...) { PyObject *op;

op = (PyObject *) Your_Allocator(_PyObject_SIZE(YourTypeStruct)); if (op == NULL) { return PyErr_NoMemory(); }

PyObject_Init(op, &YourTypeStruct);

op->ob_field = value; ... return op; }

Note that in C++, the use of the new operator usually implies that the 1st step is performed automatically for you, so in a C++ class constructor you would start directly with PyObject_Init/InitVar.

func (*PyObjectArenaAllocator) PyObject_GetArenaAllocator

func (self *PyObjectArenaAllocator) PyObject_GetArenaAllocator()

Get the arena allocator.

llgo:link (*PyObjectArenaAllocator).PyObject_GetArenaAllocator C.PyObject_GetArenaAllocator

func (*PyObjectArenaAllocator) PyObject_SetArenaAllocator

func (self *PyObjectArenaAllocator) PyObject_SetArenaAllocator()

Set the arena allocator.

llgo:link (*PyObjectArenaAllocator).PyObject_SetArenaAllocator C.PyObject_SetArenaAllocator

type PyPreConfig

type PyPreConfig 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
}

--- PyPreConfig -----------------------------------------------

func (*PyPreConfig) InitIsolatedConfig

func (self *PyPreConfig) InitIsolatedConfig()

llgo:link (*PyPreConfig).InitIsolatedConfig C.PyPreConfig_InitIsolatedConfig

func (*PyPreConfig) InitPythonConfig

func (self *PyPreConfig) InitPythonConfig()

llgo:link (*PyPreConfig).InitPythonConfig C.PyPreConfig_InitPythonConfig

func (*PyPreConfig) Py_PreInitialize

func (self *PyPreConfig) Py_PreInitialize() PyStatus

PEP 432 Multi-phase initialization API (Private while provisional!)

llgo:link (*PyPreConfig).Py_PreInitialize C.Py_PreInitialize

func (*PyPreConfig) Py_PreInitializeFromArgs

func (self *PyPreConfig) Py_PreInitializeFromArgs(argc PySsizeT, argv **c.WcharT) PyStatus

llgo:link (*PyPreConfig).Py_PreInitializeFromArgs C.Py_PreInitializeFromArgs

func (*PyPreConfig) Py_PreInitializeFromBytesArgs

func (self *PyPreConfig) Py_PreInitializeFromBytesArgs(argc PySsizeT, argv **c.Char) PyStatus

llgo:link (*PyPreConfig).Py_PreInitializeFromBytesArgs C.Py_PreInitializeFromBytesArgs

type PyRefTracer

type PyRefTracer = func(_llcppg_param1 *PyObject, _llcppg_param2 PyRefTracerEvent, _llcppg_param3 unsafe.Pointer) c.Int

llgo:type C

func PyRefTracer_GetTracer

func PyRefTracer_GetTracer(_llcppg_param1 *unsafe.Pointer) PyRefTracer

type PyRefTracerEvent

type PyRefTracerEvent c.Uint
const (
	PyRefTracer_CREATE  PyRefTracerEvent = 0
	PyRefTracer_DESTROY PyRefTracerEvent = 1
)

type PySendResult

type PySendResult c.Int

Result of calling PyIter_Send

const (
	PYGEN_RETURN PySendResult = 0
	PYGEN_ERROR  PySendResult = -1
	PYGEN_NEXT   PySendResult = 1
)

type PySequenceMethods

type PySequenceMethods struct {
	SqLength        Lenfunc
	SqConcat        Binaryfunc
	SqRepeat        Ssizeargfunc
	SqItem          Ssizeargfunc
	WasSqSlice      unsafe.Pointer
	SqAssItem       Ssizeobjargproc
	WasSqAssSlice   unsafe.Pointer
	SqContains      Objobjproc
	SqInplaceConcat Binaryfunc
	SqInplaceRepeat Ssizeargfunc
}

type PySetObject

type PySetObject struct {
	ObBase      PyObject
	Fill        PySsizeT
	Used        PySsizeT
	Mask        PySsizeT
	Table       *Setentry
	Hash        PyHashT
	Finger      PySsizeT
	Smalltable  [8]Setentry
	Weakreflist *PyObject
}

The SetObject data structure is shared by set and frozenset objects.

Invariant for sets: - hash is -1

Invariants for frozensets: - data is immutable. - hash is the hash of the frozenset or -1 if not computed yet.

type PySliceObject

type PySliceObject struct {
	ObBase PyObject
	Start  *PyObject
	Stop   *PyObject
	Step   *PyObject
}

func (*PySliceObject) X_PySlice_GetLongIndices

func (self *PySliceObject) X_PySlice_GetLongIndices(length *PyObject, start_ptr **PyObject, stop_ptr **PyObject, step_ptr **PyObject) c.Int

llgo:link (*PySliceObject).X_PySlice_GetLongIndices C._PySlice_GetLongIndices

type PySsizeCleanT

type PySsizeCleanT = PySsizeT

Now PY_SSIZE_T_CLEAN is mandatory. This is just for backward compatibility.

type PySsizeT

type PySsizeT = c.SsizeT

func PyBuffer_SizeFromFormat

func PyBuffer_SizeFromFormat(format *c.Char) PySsizeT

Return the implied itemsize of the data-format area from a struct-style description.

func PyGC_Collect

func PyGC_Collect() PySsizeT

C equivalent of gc.collect().

func PySlice_AdjustIndices

func PySlice_AdjustIndices(length PySsizeT, start *PySsizeT, stop *PySsizeT, step PySsizeT) PySsizeT

func PyUnstable_Eval_RequestCodeExtraIndex

func PyUnstable_Eval_RequestCodeExtraIndex(_llcppg_param1 Freefunc) PySsizeT

func PyVectorcall_NARGS

func PyVectorcall_NARGS(nargsf c.SizeT) PySsizeT

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 PyStatus

type PyStatus struct {
	X_type   _llcppg_anon_4
	Func     *c.Char
	ErrMsg   *c.Char
	Exitcode c.Int
}

--- PyStatus -----------------------------------------------

func PyStatus_Error

func PyStatus_Error(err_msg *c.Char) PyStatus

func PyStatus_Exit

func PyStatus_Exit(exitcode c.Int) PyStatus

func PyStatus_NoMemory

func PyStatus_NoMemory() PyStatus

func PyStatus_Ok

func PyStatus_Ok() PyStatus

func Py_NewInterpreterFromConfig

func Py_NewInterpreterFromConfig(tstate_p **PyThreadState, config *PyInterpreterConfig) PyStatus

func (PyStatus) Exception

func (self PyStatus) Exception() c.Int

llgo:link PyStatus.Exception C.PyStatus_Exception

func (PyStatus) IsError

func (self PyStatus) IsError() c.Int

llgo:link PyStatus.IsError C.PyStatus_IsError

func (PyStatus) IsExit

func (self PyStatus) IsExit() c.Int

llgo:link PyStatus.IsExit C.PyStatus_IsExit

func (PyStatus) Py_ExitStatusException

func (self PyStatus) Py_ExitStatusException()

llgo:link PyStatus.Py_ExitStatusException C.Py_ExitStatusException

type PyStopIterationObject

type PyStopIterationObject struct {
	ObBase          PyObject
	Dict            *PyObject
	Args            *PyObject
	Notes           *PyObject
	Traceback       *PyObject
	Context         *PyObject
	Cause           *PyObject
	SuppressContext c.Char
	Value           *PyObject
}

type PyStructSequence

type PyStructSequence = PyTupleObject

type PyStructSequence_Desc

type PyStructSequence_Desc struct {
	Name        *c.Char
	Doc         *c.Char
	Fields      *PyStructSequence_Field
	NInSequence c.Int
}

func (*PyStructSequence_Desc) PyStructSequence_NewType

func (self *PyStructSequence_Desc) PyStructSequence_NewType() *PyTypeObject

llgo:link (*PyStructSequence_Desc).PyStructSequence_NewType C.PyStructSequence_NewType

type PyStructSequence_Field

type PyStructSequence_Field struct {
	Name *c.Char
	Doc  *c.Char
}

type PySyntaxErrorObject

type PySyntaxErrorObject struct {
	ObBase           PyObject
	Dict             *PyObject
	Args             *PyObject
	Notes            *PyObject
	Traceback        *PyObject
	Context          *PyObject
	Cause            *PyObject
	SuppressContext  c.Char
	Msg              *PyObject
	Filename         *PyObject
	Lineno           *PyObject
	Offset           *PyObject
	EndLineno        *PyObject
	EndOffset        *PyObject
	Text             *PyObject
	PrintFileAndLine *PyObject
	Metadata         *PyObject
}

type PySystemExitObject

type PySystemExitObject struct {
	ObBase          PyObject
	Dict            *PyObject
	Args            *PyObject
	Notes           *PyObject
	Traceback       *PyObject
	Context         *PyObject
	Cause           *PyObject
	SuppressContext c.Char
	Code            *PyObject
}

type PyThreadState

type PyThreadState = X_ts

func PyEval_SaveThread

func PyEval_SaveThread() *PyThreadState

Interface for threads.

A module that plans to do a blocking system call (or something else that lasts a long time and doesn't touch Python data) can allow other threads to run as follows:

...preparations here... Py_BEGIN_ALLOW_THREADS ...blocking system call here... Py_END_ALLOW_THREADS ...interpret result here...

The Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS pair expands to a {}-surrounded block. To leave the block in the middle (e.g., with return), you must insert a line containing Py_BLOCK_THREADS before the return, e.g.

if (...premature_exit...) { Py_BLOCK_THREADS PyErr_SetFromErrno(PyExc_OSError); return NULL; }

An alternative is:

Py_BLOCK_THREADS if (...premature_exit...) { PyErr_SetFromErrno(PyExc_OSError); return NULL; } Py_UNBLOCK_THREADS

For convenience, that the value of 'errno' is restored across Py_END_ALLOW_THREADS and Py_BLOCK_THREADS.

WARNING: NEVER NEST CALLS TO Py_BEGIN_ALLOW_THREADS AND Py_END_ALLOW_THREADS!!!

Note that not yet all candidates have been converted to use this mechanism!

func PyGILState_GetThisThreadState

func PyGILState_GetThisThreadState() *PyThreadState

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 PyThreadState_Get

func PyThreadState_Get() *PyThreadState

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 PyThreadState_GetUnchecked

func PyThreadState_GetUnchecked() *PyThreadState

Similar to PyThreadState_Get(), but don't issue a fatal error if it is NULL.

func Py_NewInterpreter

func Py_NewInterpreter() *PyThreadState

Subinterpreter support

func (*PyThreadState) Clear

func (self *PyThreadState) Clear()

llgo:link (*PyThreadState).Clear C.PyThreadState_Clear

func (*PyThreadState) Delete

func (self *PyThreadState) Delete()

llgo:link (*PyThreadState).Delete C.PyThreadState_Delete

func (*PyThreadState) EnterTracing

func (self *PyThreadState) EnterTracing()

Disable tracing and profiling.

llgo:link (*PyThreadState).EnterTracing C.PyThreadState_EnterTracing

func (*PyThreadState) Frame

func (self *PyThreadState) Frame() *PyFrameObject

llgo:link (*PyThreadState).Frame C.PyThreadState_GetFrame

func (*PyThreadState) GetNext

func (self *PyThreadState) GetNext() *PyThreadState

llgo:link (*PyThreadState).GetNext C.PyThreadState_Next

func (*PyThreadState) ID

func (self *PyThreadState) ID() c.Uint64T

llgo:link (*PyThreadState).ID C.PyThreadState_GetID

func (*PyThreadState) Interpreter

func (self *PyThreadState) Interpreter() *PyInterpreterState

New in 3.9

llgo:link (*PyThreadState).Interpreter C.PyThreadState_GetInterpreter

func (*PyThreadState) LeaveTracing

func (self *PyThreadState) LeaveTracing()

Reset tracing and profiling: enable them if a trace function or a profile function is set, otherwise disable them.

llgo:link (*PyThreadState).LeaveTracing C.PyThreadState_LeaveTracing

func (*PyThreadState) PyEval_AcquireThread

func (self *PyThreadState) PyEval_AcquireThread()

llgo:link (*PyThreadState).PyEval_AcquireThread C.PyEval_AcquireThread

func (*PyThreadState) PyEval_ReleaseThread

func (self *PyThreadState) PyEval_ReleaseThread()

llgo:link (*PyThreadState).PyEval_ReleaseThread C.PyEval_ReleaseThread

func (*PyThreadState) PyEval_RestoreThread

func (self *PyThreadState) PyEval_RestoreThread()

llgo:link (*PyThreadState).PyEval_RestoreThread C.PyEval_RestoreThread

func (*PyThreadState) PyUnstable_ThreadState_ResetStackProtection

func (self *PyThreadState) PyUnstable_ThreadState_ResetStackProtection()

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

llgo:link (*PyThreadState).PyUnstable_ThreadState_ResetStackProtection C.PyUnstable_ThreadState_ResetStackProtection

func (*PyThreadState) PyUnstable_ThreadState_SetStackProtection

func (self *PyThreadState) PyUnstable_ThreadState_SetStackProtection(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

llgo:link (*PyThreadState).PyUnstable_ThreadState_SetStackProtection C.PyUnstable_ThreadState_SetStackProtection

func (*PyThreadState) Py_EndInterpreter

func (self *PyThreadState) Py_EndInterpreter()

llgo:link (*PyThreadState).Py_EndInterpreter C.Py_EndInterpreter

func (*PyThreadState) Swap

func (self *PyThreadState) Swap() *PyThreadState

llgo:link (*PyThreadState).Swap C.PyThreadState_Swap

func (*PyThreadState) X_PyEval_EvalFrameDefault

func (self *PyThreadState) X_PyEval_EvalFrameDefault(f *X_PyInterpreterFrame, exc c.Int) *PyObject

llgo:link (*PyThreadState).X_PyEval_EvalFrameDefault C._PyEval_EvalFrameDefault

func (*PyThreadState) X_PyTrashThreadDepositObject

func (self *PyThreadState) X_PyTrashThreadDepositObject(op *PyObject)

llgo:link (*PyThreadState).X_PyTrashThreadDepositObject C._PyTrash_thread_deposit_object

func (*PyThreadState) X_PyTrashThreadDestroyChain

func (self *PyThreadState) X_PyTrashThreadDestroyChain()

llgo:link (*PyThreadState).X_PyTrashThreadDestroyChain C._PyTrash_thread_destroy_chain

func (*PyThreadState) X_Py_ReachedRecursionLimitWithMargin

func (self *PyThreadState) X_Py_ReachedRecursionLimitWithMargin(margin_count c.Int) c.Int

llgo:link (*PyThreadState).X_Py_ReachedRecursionLimitWithMargin C._Py_ReachedRecursionLimitWithMargin

type PyThreadTypeLock

type PyThreadTypeLock uintptr

func PyThreadAllocateLock

func PyThreadAllocateLock() PyThreadTypeLock

func (PyThreadTypeLock) PyThreadAcquireLock

func (self PyThreadTypeLock) PyThreadAcquireLock(_llcppg_param2 c.Int) c.Int

llgo:link PyThreadTypeLock.PyThreadAcquireLock C.PyThread_acquire_lock

func (PyThreadTypeLock) PyThreadAcquireLockTimed

func (self PyThreadTypeLock) PyThreadAcquireLockTimed(microseconds c.LongLong, intr_flag c.Int) PyLockStatus

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.

llgo:link PyThreadTypeLock.PyThreadAcquireLockTimed C.PyThread_acquire_lock_timed

func (PyThreadTypeLock) PyThreadFreeLock

func (self PyThreadTypeLock) PyThreadFreeLock()

llgo:link PyThreadTypeLock.PyThreadFreeLock C.PyThread_free_lock

func (PyThreadTypeLock) PyThreadReleaseLock

func (self PyThreadTypeLock) PyThreadReleaseLock()

llgo:link PyThreadTypeLock.PyThreadReleaseLock C.PyThread_release_lock

type PyTimeT

type PyTimeT = c.Int64T

type PyTracebackObject

type PyTracebackObject = X_traceback

type PyTracefunc

type PyTracefunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyFrameObject, _llcppg_param3 c.Int, _llcppg_param4 *PyObject) c.Int

Py_tracefunc return -1 when raising an exception, or 0 for success.

llgo:type C

type PyTssT

type PyTssT = X_PyTssT

New in 3.7 */ /* Thread Specific Storage (TSS) API

func PyThreadTssAlloc

func PyThreadTssAlloc() *PyTssT

func (*PyTssT) PyThreadTssCreate

func (self *PyTssT) PyThreadTssCreate() c.Int

llgo:link (*PyTssT).PyThreadTssCreate C.PyThread_tss_create

func (*PyTssT) PyThreadTssDelete

func (self *PyTssT) PyThreadTssDelete()

llgo:link (*PyTssT).PyThreadTssDelete C.PyThread_tss_delete

func (*PyTssT) PyThreadTssFree

func (self *PyTssT) PyThreadTssFree()

llgo:link (*PyTssT).PyThreadTssFree C.PyThread_tss_free

func (*PyTssT) PyThreadTssGet

func (self *PyTssT) PyThreadTssGet() unsafe.Pointer

llgo:link (*PyTssT).PyThreadTssGet C.PyThread_tss_get

func (*PyTssT) PyThreadTssIsCreated

func (self *PyTssT) PyThreadTssIsCreated() c.Int

The parameter key must not be NULL.

llgo:link (*PyTssT).PyThreadTssIsCreated C.PyThread_tss_is_created

func (*PyTssT) PyThreadTssSet

func (self *PyTssT) PyThreadTssSet(value unsafe.Pointer) c.Int

llgo:link (*PyTssT).PyThreadTssSet C.PyThread_tss_set

type PyTupleObject

type PyTupleObject struct {
	ObBase PyVarObject
	ObHash PyHashT
	ObItem [1]*PyObject
}

type PyTypeObject

type PyTypeObject = X_typeobject
var PyAsyncGen_Type PyTypeObject
var PyBaseObject_Type PyTypeObject

built-in 'object'

var PyBool_Type PyTypeObject
var PyByteArrayIter_Type PyTypeObject
var PyByteArray_Type PyTypeObject

Type object

var PyBytesIter_Type PyTypeObject
var PyBytes_Type PyTypeObject

Type PyBytesObject represents a byte string. An extra zero byte is reserved at the end to ensure it is zero-terminated, but a size is present so strings with null bytes in them can be represented. This is an immutable object type.

There are functions to create new bytes objects, to test an object for bytes-ness, and to get the byte string value. The latter function returns a null pointer if the object is not of the proper type. There is a variant that takes an explicit size as well as a variant that assumes a zero-terminated string. Note that none of the functions should be applied to NULL pointer.

var PyCFunction_Type PyTypeObject

This is about the type 'builtin_function_or_method', not Python methods in user-defined classes. See classobject.h for the latter.

var PyCMethod_Type PyTypeObject
var PyCallIter_Type PyTypeObject
var PyCapsule_Type PyTypeObject
var PyCell_Type PyTypeObject
var PyClassMethodDescr_Type PyTypeObject
var PyClassMethod_Type PyTypeObject

The classmethod and staticmethod types lives here, too

var PyCode_Type PyTypeObject
var PyComplex_Type PyTypeObject

Complex object interface

var PyContextToken_Type PyTypeObject
var PyContextVar_Type PyTypeObject
var PyContext_Type PyTypeObject
var PyCoro_Type PyTypeObject
var PyDictItems_Type PyTypeObject
var PyDictIterItem_Type PyTypeObject
var PyDictIterKey_Type PyTypeObject

Dictionary (key, value, items) iterators

var PyDictIterValue_Type PyTypeObject
var PyDictKeys_Type PyTypeObject

Dictionary (keys, values, items) views

var PyDictProxy_Type PyTypeObject
var PyDictRevIterItem_Type PyTypeObject
var PyDictRevIterKey_Type PyTypeObject
var PyDictRevIterValue_Type PyTypeObject
var PyDictValues_Type PyTypeObject
var PyDict_Type PyTypeObject

The distribution includes a separate file, Objects/dictnotes.txt, describing explorations into dictionary design and optimization. It covers typical dictionary use patterns, the parameters for tuning dictionaries, and several ideas for possible optimizations.

var PyEllipsis_Type PyTypeObject
var PyEnum_Type PyTypeObject
var PyFilter_Type PyTypeObject
var PyFloat_Type PyTypeObject
var PyFrameLocalsProxy_Type PyTypeObject
var PyFrame_Type PyTypeObject
var PyFrozenSet_Type PyTypeObject
var PyFunction_Type PyTypeObject
var PyGen_Type PyTypeObject
var PyGetSetDescr_Type PyTypeObject
var PyInstanceMethod_Type PyTypeObject
var PyListIter_Type PyTypeObject
var PyListRevIter_Type PyTypeObject
var PyList_Type PyTypeObject
var PyLongRangeIter_Type PyTypeObject
var PyLong_Type PyTypeObject
var PyMap_Type PyTypeObject
var PyMemberDescr_Type PyTypeObject
var PyMemoryView_Type PyTypeObject
var PyMethodDescr_Type PyTypeObject
var PyMethod_Type PyTypeObject
var PyModuleDef_Type PyTypeObject
var PyModule_Type PyTypeObject
var PyODictItems_Type PyTypeObject
var PyODictIter_Type PyTypeObject
var PyODictKeys_Type PyTypeObject
var PyODictValues_Type PyTypeObject
var PyODict_Type PyTypeObject
var PyPickleBuffer_Type PyTypeObject
var PyProperty_Type PyTypeObject
var PyRangeIter_Type PyTypeObject
var PyRange_Type PyTypeObject

A range object represents an integer range. This is an immutable object; a range cannot change its value after creation.

Range objects behave like the corresponding tuple objects except that they are represented by a start, stop, and step datamembers.

var PyReversed_Type PyTypeObject
var PySeqIter_Type PyTypeObject
var PySetIter_Type PyTypeObject
var PySet_Type PyTypeObject
var PySlice_Type PyTypeObject
var PyStaticMethod_Type PyTypeObject
var PyStdPrinter_Type PyTypeObject
var PySuper_Type PyTypeObject

built-in 'super'

var PyTraceBack_Type PyTypeObject

Reveal traceback type so we can typecheck traceback objects

var PyTupleIter_Type PyTypeObject
var PyTuple_Type PyTypeObject

Another generally useful object type is a tuple of object pointers. For Python, this is an immutable type. C code can change the tuple items (but not their number), and even use tuples as general-purpose arrays of object references, but in general only brand new tuples should be mutated, not ones that might already have been exposed to Python code.

** WARNING *** PyTuple_SetItem does not increment the new item's reference count, but does decrement the reference count of the item it replaces, if not nil. It does *decrement* the reference count if it is *not* inserted in the tuple. Similarly, PyTuple_GetItem does not increment the returned item's reference count.

var PyType_Type PyTypeObject

built-in 'type'

var PyUnicodeIter_Type PyTypeObject
var PyUnicode_Type PyTypeObject
var PyWrapperDescr_Type PyTypeObject
var PyZip_Type PyTypeObject
var Py_GenericAliasType PyTypeObject
var X_PyAsyncGenASend_Type PyTypeObject
var X_PyWeakref_CallableProxyType PyTypeObject
var X_PyWeakref_ProxyType PyTypeObject
var X_PyWeakref_RefType PyTypeObject

func (*PyTypeObject) PyDescr_NewClassMethod

func (self *PyTypeObject) PyDescr_NewClassMethod(_llcppg_param2 *PyMethodDef) *PyObject

llgo:link (*PyTypeObject).PyDescr_NewClassMethod C.PyDescr_NewClassMethod

func (*PyTypeObject) PyDescr_NewGetSet

func (self *PyTypeObject) PyDescr_NewGetSet(_llcppg_param2 *PyGetSetDef) *PyObject

llgo:link (*PyTypeObject).PyDescr_NewGetSet C.PyDescr_NewGetSet

func (*PyTypeObject) PyDescr_NewMember

func (self *PyTypeObject) PyDescr_NewMember(_llcppg_param2 *PyMemberDef) *PyObject

llgo:link (*PyTypeObject).PyDescr_NewMember C.PyDescr_NewMember

func (*PyTypeObject) PyDescr_NewMethod

func (self *PyTypeObject) PyDescr_NewMethod(_llcppg_param2 *PyMethodDef) *PyObject

llgo:link (*PyTypeObject).PyDescr_NewMethod C.PyDescr_NewMethod

func (*PyTypeObject) PyDescr_NewWrapper

func (self *PyTypeObject) PyDescr_NewWrapper(_llcppg_param2 *Wrapperbase, _llcppg_param3 unsafe.Pointer) *PyObject

llgo:link (*PyTypeObject).PyDescr_NewWrapper C.PyDescr_NewWrapper

func (*PyTypeObject) PyStructSequence_InitType

func (self *PyTypeObject) PyStructSequence_InitType(desc *PyStructSequence_Desc)

llgo:link (*PyTypeObject).PyStructSequence_InitType C.PyStructSequence_InitType

func (*PyTypeObject) PyStructSequence_InitType2

func (self *PyTypeObject) PyStructSequence_InitType2(desc *PyStructSequence_Desc) c.Int

llgo:link (*PyTypeObject).PyStructSequence_InitType2 C.PyStructSequence_InitType2

func (*PyTypeObject) PyStructSequence_New

func (self *PyTypeObject) PyStructSequence_New() *PyObject

llgo:link (*PyTypeObject).PyStructSequence_New C.PyStructSequence_New

func (*PyTypeObject) PyType_Freeze

func (self *PyTypeObject) PyType_Freeze() c.Int

llgo:link (*PyTypeObject).PyType_Freeze C.PyType_Freeze

func (*PyTypeObject) PyType_FromMetaclass

func (self *PyTypeObject) PyType_FromMetaclass(_llcppg_param2 *PyObject, _llcppg_param3 *PyType_Spec, _llcppg_param4 *PyObject) *PyObject

llgo:link (*PyTypeObject).PyType_FromMetaclass C.PyType_FromMetaclass

func (*PyTypeObject) PyType_GenericAlloc

func (self *PyTypeObject) PyType_GenericAlloc(_llcppg_param2 PySsizeT) *PyObject

llgo:link (*PyTypeObject).PyType_GenericAlloc C.PyType_GenericAlloc

func (*PyTypeObject) PyType_GenericNew

func (self *PyTypeObject) PyType_GenericNew(_llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

llgo:link (*PyTypeObject).PyType_GenericNew C.PyType_GenericNew

func (*PyTypeObject) PyType_GetBaseByToken

func (self *PyTypeObject) PyType_GetBaseByToken(_llcppg_param2 unsafe.Pointer, _llcppg_param3 **PyTypeObject) c.Int

llgo:link (*PyTypeObject).PyType_GetBaseByToken C.PyType_GetBaseByToken

func (*PyTypeObject) PyType_GetDict

func (self *PyTypeObject) PyType_GetDict() *PyObject

llgo:link (*PyTypeObject).PyType_GetDict C.PyType_GetDict

func (*PyTypeObject) PyType_GetFlags

func (self *PyTypeObject) PyType_GetFlags() c.Ulong

llgo:link (*PyTypeObject).PyType_GetFlags C.PyType_GetFlags

func (*PyTypeObject) PyType_GetFullyQualifiedName

func (self *PyTypeObject) PyType_GetFullyQualifiedName() *PyObject

llgo:link (*PyTypeObject).PyType_GetFullyQualifiedName C.PyType_GetFullyQualifiedName

func (*PyTypeObject) PyType_GetModule

func (self *PyTypeObject) PyType_GetModule() *PyObject

llgo:link (*PyTypeObject).PyType_GetModule C.PyType_GetModule

func (*PyTypeObject) PyType_GetModuleByDef

func (self *PyTypeObject) PyType_GetModuleByDef(_llcppg_param2 *PyModuleDef) *PyObject

llgo:link (*PyTypeObject).PyType_GetModuleByDef C.PyType_GetModuleByDef

func (*PyTypeObject) PyType_GetModuleName

func (self *PyTypeObject) PyType_GetModuleName() *PyObject

llgo:link (*PyTypeObject).PyType_GetModuleName C.PyType_GetModuleName

func (*PyTypeObject) PyType_GetModuleState

func (self *PyTypeObject) PyType_GetModuleState() unsafe.Pointer

llgo:link (*PyTypeObject).PyType_GetModuleState C.PyType_GetModuleState

func (*PyTypeObject) PyType_GetName

func (self *PyTypeObject) PyType_GetName() *PyObject

llgo:link (*PyTypeObject).PyType_GetName C.PyType_GetName

func (*PyTypeObject) PyType_GetQualName

func (self *PyTypeObject) PyType_GetQualName() *PyObject

llgo:link (*PyTypeObject).PyType_GetQualName C.PyType_GetQualName

func (*PyTypeObject) PyType_GetSlot

func (self *PyTypeObject) PyType_GetSlot(_llcppg_param2 c.Int) unsafe.Pointer

llgo:link (*PyTypeObject).PyType_GetSlot C.PyType_GetSlot

func (*PyTypeObject) PyType_GetTypeDataSize

func (self *PyTypeObject) PyType_GetTypeDataSize() PySsizeT

llgo:link (*PyTypeObject).PyType_GetTypeDataSize C.PyType_GetTypeDataSize

func (*PyTypeObject) PyType_IsSubtype

func (self *PyTypeObject) PyType_IsSubtype(_llcppg_param2 *PyTypeObject) c.Int

Generic type check

llgo:link (*PyTypeObject).PyType_IsSubtype C.PyType_IsSubtype

func (*PyTypeObject) PyType_Modified

func (self *PyTypeObject) PyType_Modified()

llgo:link (*PyTypeObject).PyType_Modified C.PyType_Modified

func (*PyTypeObject) PyType_Ready

func (self *PyTypeObject) PyType_Ready() c.Int

llgo:link (*PyTypeObject).PyType_Ready C.PyType_Ready

func (*PyTypeObject) PyType_SUPPORTS_WEAKREFS

func (self *PyTypeObject) PyType_SUPPORTS_WEAKREFS() c.Int

Test if a type supports weak references

llgo:link (*PyTypeObject).PyType_SUPPORTS_WEAKREFS C.PyType_SUPPORTS_WEAKREFS

func (*PyTypeObject) PyUnstable_Object_GC_NewWithExtraData

func (self *PyTypeObject) PyUnstable_Object_GC_NewWithExtraData(_llcppg_param2 c.SizeT) *PyObject

llgo:link (*PyTypeObject).PyUnstable_Object_GC_NewWithExtraData C.PyUnstable_Object_GC_NewWithExtraData

func (*PyTypeObject) PyUnstable_Type_AssignVersionTag

func (self *PyTypeObject) PyUnstable_Type_AssignVersionTag() 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.

llgo:link (*PyTypeObject).PyUnstable_Type_AssignVersionTag C.PyUnstable_Type_AssignVersionTag

func (*PyTypeObject) X_PyObject_GC_New

func (self *PyTypeObject) X_PyObject_GC_New() *PyObject

llgo:link (*PyTypeObject).X_PyObject_GC_New C._PyObject_GC_New

func (*PyTypeObject) X_PyObject_GC_NewVar

func (self *PyTypeObject) X_PyObject_GC_NewVar(_llcppg_param2 PySsizeT) *PyVarObject

llgo:link (*PyTypeObject).X_PyObject_GC_NewVar C._PyObject_GC_NewVar

func (*PyTypeObject) X_PyObject_New

func (self *PyTypeObject) X_PyObject_New() *PyObject

llgo:link (*PyTypeObject).X_PyObject_New C._PyObject_New

func (*PyTypeObject) X_PyObject_NewVar

func (self *PyTypeObject) X_PyObject_NewVar(_llcppg_param2 PySsizeT) *PyVarObject

llgo:link (*PyTypeObject).X_PyObject_NewVar C._PyObject_NewVar

func (*PyTypeObject) X_PyType_Lookup

func (self *PyTypeObject) X_PyType_Lookup(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyTypeObject).X_PyType_Lookup C._PyType_Lookup

func (*PyTypeObject) X_PyType_LookupRef

func (self *PyTypeObject) X_PyType_LookupRef(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyTypeObject).X_PyType_LookupRef C._PyType_LookupRef

func (*PyTypeObject) X_PyType_Name

func (self *PyTypeObject) X_PyType_Name() *c.Char

llgo:link (*PyTypeObject).X_PyType_Name C._PyType_Name

type PyType_Slot

type PyType_Slot struct {
	Slot  c.Int
	Pfunc unsafe.Pointer
}

type PyType_Spec

type PyType_Spec struct {
	Name      *c.Char
	Basicsize c.Int
	Itemsize  c.Int
	Flags     c.Uint
	Slots     *PyType_Slot
}

func (*PyType_Spec) PyType_FromSpec

func (self *PyType_Spec) PyType_FromSpec() *PyObject

llgo:link (*PyType_Spec).PyType_FromSpec C.PyType_FromSpec

func (*PyType_Spec) PyType_FromSpecWithBases

func (self *PyType_Spec) PyType_FromSpecWithBases(_llcppg_param2 *PyObject) *PyObject

llgo:link (*PyType_Spec).PyType_FromSpecWithBases C.PyType_FromSpecWithBases

type PyType_WatchCallback

type PyType_WatchCallback = func(_llcppg_param1 *PyTypeObject) c.Int

llgo:type C

type PyUhashT

type PyUhashT = c.SizeT

type PyUintptrT

type PyUintptrT = 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 PyUnicodeErrorObject

type PyUnicodeErrorObject struct {
	ObBase          PyObject
	Dict            *PyObject
	Args            *PyObject
	Notes           *PyObject
	Traceback       *PyObject
	Context         *PyObject
	Cause           *PyObject
	SuppressContext c.Char
	Encoding        *PyObject
	Object          *PyObject
	Start           PySsizeT
	End             PySsizeT
	Reason          *PyObject
}

type PyUnicodeObject

type PyUnicodeObject struct {
	X_base PyCompactUnicodeObject
	Data   _llcppg_anon_3
}

Object format for Unicode subclasses.

type PyUnicodeWriter

type PyUnicodeWriter struct {
}

func PyUnicodeWriter_Create

func PyUnicodeWriter_Create(length PySsizeT) *PyUnicodeWriter

func (*PyUnicodeWriter) DecodeUTF8Stateful

func (self *PyUnicodeWriter) DecodeUTF8Stateful(string *c.Char, length PySsizeT, errors *c.Char, consumed *PySsizeT) c.Int

llgo:link (*PyUnicodeWriter).DecodeUTF8Stateful C.PyUnicodeWriter_DecodeUTF8Stateful

func (*PyUnicodeWriter) Discard

func (self *PyUnicodeWriter) Discard()

llgo:link (*PyUnicodeWriter).Discard C.PyUnicodeWriter_Discard

func (*PyUnicodeWriter) Finish

func (self *PyUnicodeWriter) Finish() *PyObject

llgo:link (*PyUnicodeWriter).Finish C.PyUnicodeWriter_Finish

func (*PyUnicodeWriter) Format

func (self *PyUnicodeWriter) Format(format *c.Char, __llgo_va_list ...any) c.Int

llgo:link (*PyUnicodeWriter).Format C.PyUnicodeWriter_Format

func (*PyUnicodeWriter) WriteASCII

func (self *PyUnicodeWriter) WriteASCII(str *c.Char, size PySsizeT) c.Int

llgo:link (*PyUnicodeWriter).WriteASCII C.PyUnicodeWriter_WriteASCII

func (*PyUnicodeWriter) WriteChar

func (self *PyUnicodeWriter) WriteChar(ch Py_UCS4) c.Int

llgo:link (*PyUnicodeWriter).WriteChar C.PyUnicodeWriter_WriteChar

func (*PyUnicodeWriter) WriteRepr

func (self *PyUnicodeWriter) WriteRepr(obj *PyObject) c.Int

llgo:link (*PyUnicodeWriter).WriteRepr C.PyUnicodeWriter_WriteRepr

func (*PyUnicodeWriter) WriteStr

func (self *PyUnicodeWriter) WriteStr(obj *PyObject) c.Int

llgo:link (*PyUnicodeWriter).WriteStr C.PyUnicodeWriter_WriteStr

func (*PyUnicodeWriter) WriteSubstring

func (self *PyUnicodeWriter) WriteSubstring(str *PyObject, start PySsizeT, end PySsizeT) c.Int

llgo:link (*PyUnicodeWriter).WriteSubstring C.PyUnicodeWriter_WriteSubstring

func (*PyUnicodeWriter) WriteUCS4

func (self *PyUnicodeWriter) WriteUCS4(str *Py_UCS4, size PySsizeT) c.Int

llgo:link (*PyUnicodeWriter).WriteUCS4 C.PyUnicodeWriter_WriteUCS4

func (*PyUnicodeWriter) WriteUTF8

func (self *PyUnicodeWriter) WriteUTF8(str *c.Char, size PySsizeT) c.Int

llgo:link (*PyUnicodeWriter).WriteUTF8 C.PyUnicodeWriter_WriteUTF8

func (*PyUnicodeWriter) WriteWideChar

func (self *PyUnicodeWriter) WriteWideChar(str *c.WcharT, size PySsizeT) c.Int

llgo:link (*PyUnicodeWriter).WriteWideChar C.PyUnicodeWriter_WriteWideChar

type PyUnicode_Kind

type PyUnicode_Kind c.Uint
const (
	// Return values of the PyUnicode_KIND() function:
	PyUnicode_1BYTE_KIND PyUnicode_Kind = 1
	// Return values of the PyUnicode_KIND() function:
	PyUnicode_2BYTE_KIND PyUnicode_Kind = 2
	// Return values of the PyUnicode_KIND() function:
	PyUnicode_4BYTE_KIND PyUnicode_Kind = 4
)

type PyVarObject

type PyVarObject struct {
	ObBase PyObject
	ObSize PySsizeT
}

func (*PyVarObject) PyObject_InitVar

func (self *PyVarObject) PyObject_InitVar(_llcppg_param2 *PyTypeObject, _llcppg_param3 PySsizeT) *PyVarObject

llgo:link (*PyVarObject).PyObject_InitVar C.PyObject_InitVar

func (*PyVarObject) X_PyObject_GC_Resize

func (self *PyVarObject) X_PyObject_GC_Resize(_llcppg_param2 PySsizeT) *PyVarObject

llgo:link (*PyVarObject).X_PyObject_GC_Resize C._PyObject_GC_Resize

type PyWeakReference

type PyWeakReference = X_PyWeakReference

func (*PyWeakReference) X_PyWeakref_ClearRef

func (self *PyWeakReference) X_PyWeakref_ClearRef()

llgo:link (*PyWeakReference).X_PyWeakref_ClearRef C._PyWeakref_ClearRef

type PyWideStringList

type PyWideStringList struct {
	Length PySsizeT
	Items  **c.WcharT
}

--- PyWideStringList ------------------------------------------------

func (*PyWideStringList) Append

func (self *PyWideStringList) Append(item *c.WcharT) PyStatus

llgo:link (*PyWideStringList).Append C.PyWideStringList_Append

func (*PyWideStringList) Insert

func (self *PyWideStringList) Insert(index PySsizeT, item *c.WcharT) PyStatus

llgo:link (*PyWideStringList).Insert C.PyWideStringList_Insert

type PyWrapperDescrObject

type PyWrapperDescrObject struct {
	DCommon  PyDescrObject
	DBase    *Wrapperbase
	DWrapped unsafe.Pointer
}

type Py_AuditHookFunction

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

llgo:type C

type Py_OpenCodeHookFunction

type Py_OpenCodeHookFunction = func(_llcppg_param1 *PyObject, _llcppg_param2 unsafe.Pointer) *PyObject

llgo:type C

type Py_UCS1

type Py_UCS1 = c.Uint8T

type Py_UCS2

type Py_UCS2 = c.Uint16T

type Py_UCS4

type Py_UCS4 = c.Uint32T

Py_UCS4 and Py_UCS2 are typedefs for the respective unicode representations.

func X_PyUnicode_ToLowercase

func X_PyUnicode_ToLowercase(ch Py_UCS4) Py_UCS4

func X_PyUnicode_ToTitlecase

func X_PyUnicode_ToTitlecase(ch Py_UCS4) Py_UCS4

func X_PyUnicode_ToUppercase

func X_PyUnicode_ToUppercase(ch Py_UCS4) Py_UCS4

type Py_UNICODE

type Py_UNICODE = c.WcharT

type Releasebufferproc

type Releasebufferproc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyBuffer)

llgo:type C

type Reprfunc

type Reprfunc = func(_llcppg_param1 *PyObject) *PyObject

llgo:type C

type Richcmpfunc

type Richcmpfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 c.Int) *PyObject

llgo:type C

type Sdigit

type Sdigit = c.Int32T

type Sendfunc

type Sendfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 **PyObject) PySendResult

llgo:type C

type Setattrfunc

type Setattrfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *c.Char, _llcppg_param3 *PyObject) c.Int

llgo:type C

type Setattrofunc

type Setattrofunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 *PyObject) c.Int

llgo:type C

type Setentry

type Setentry struct {
	Key  *PyObject
	Hash PyHashT
}

type Setter

type Setter = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 unsafe.Pointer) c.Int

llgo:type C

type Ssizeargfunc

type Ssizeargfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 PySsizeT) *PyObject

llgo:type C

type Ssizeobjargproc

type Ssizeobjargproc = func(_llcppg_param1 *PyObject, _llcppg_param2 PySsizeT, _llcppg_param3 *PyObject) c.Int

llgo:type C

type Ssizessizeargfunc

type Ssizessizeargfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 PySsizeT, _llcppg_param3 PySsizeT) *PyObject

llgo:type C

type Ssizessizeobjargproc

type Ssizessizeobjargproc = func(_llcppg_param1 *PyObject, _llcppg_param2 PySsizeT, _llcppg_param3 PySsizeT, _llcppg_param4 *PyObject) c.Int

llgo:type C

type Stwodigits

type Stwodigits = c.Int64T

type Ternaryfunc

type Ternaryfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 *PyObject) *PyObject

llgo:type C

type Traverseproc

type Traverseproc = func(_llcppg_param1 *PyObject, _llcppg_param2 Visitproc, _llcppg_param3 unsafe.Pointer) c.Int

llgo:type C

type Twodigits

type Twodigits = c.Uint64T

type Unaryfunc

type Unaryfunc = func(_llcppg_param1 *PyObject) *PyObject

Type objects contain a string containing the type name (to help somewhat in debugging), the allocation parameters (see PyObject_New() and PyObject_NewVar()), and methods for accessing objects of the type. Methods are optional, a nil pointer meaning that particular kind of access is not available for this type. The Py_DECREF() macro uses the tp_dealloc method without checking for a nil pointer; it should always be implemented except if the implementation can guarantee that the reference count will never reach zero (e.g., for statically allocated type objects).

NB: the methods for certain type groups are now contained in separate method blocks.

llgo:type C

type Vectorcallfunc

type Vectorcallfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 **PyObject, _llcppg_param3 c.SizeT, _llcppg_param4 *PyObject) *PyObject

llgo:type C

type Visitproc

type Visitproc = func(_llcppg_param1 *PyObject, _llcppg_param2 unsafe.Pointer) c.Int

llgo:type C

type Wrapperbase

type Wrapperbase struct {
	Name       *c.Char
	Offset     c.Int
	Function   unsafe.Pointer
	Wrapper    Wrapperfunc
	Doc        *c.Char
	Flags      c.Int
	NameStrobj *PyObject
}

type Wrapperfunc

type Wrapperfunc = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 unsafe.Pointer) *PyObject

llgo:type C

type WrapperfuncKwds

type WrapperfuncKwds = func(_llcppg_param1 *PyObject, _llcppg_param2 *PyObject, _llcppg_param3 unsafe.Pointer, _llcppg_param4 *PyObject) *PyObject

llgo:type C

type X_PyArg_Parser

type X_PyArg_Parser struct {
	Format         *c.Char
	Keywords       **c.Char
	Fname          *c.Char
	CustomMsg      *c.Char
	Once           X_PyOnceFlag
	IsKwtupleOwned c.Int
	Pos            c.Int
	Min            c.Int
	Max            c.Int
	Kwtuple        *PyObject
	Next           *X_PyArg_Parser
}

type X_PyAsyncGenObject

type X_PyAsyncGenObject struct {
}

type X_PyCFunctionFast

type X_PyCFunctionFast = PyCFunctionFast

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_PyCFunctionFastWithKeywords

type X_PyCFunctionFastWithKeywords = PyCFunctionFastWithKeywords

type X_PyCoCached

type X_PyCoCached struct {
	X_coCode     *PyObject
	X_coVarnames *PyObject
	X_coCellvars *PyObject
	X_coFreevars *PyObject
}

type X_PyCoMonitoringData

type X_PyCoMonitoringData struct {
}

type X_PyCodeLocationInfoKind

type X_PyCodeLocationInfoKind c.Uint
const (
	// short forms are 0 to 9
	PY_CODE_LOCATION_INFO_SHORT0 X_PyCodeLocationInfoKind = 0
	// one lineforms are 10 to 12
	PY_CODE_LOCATION_INFO_ONE_LINE0 X_PyCodeLocationInfoKind = 10
	// one lineforms are 10 to 12
	PY_CODE_LOCATION_INFO_ONE_LINE1 X_PyCodeLocationInfoKind = 11
	// one lineforms are 10 to 12
	PY_CODE_LOCATION_INFO_ONE_LINE2 X_PyCodeLocationInfoKind = 12
	// one lineforms are 10 to 12
	PY_CODE_LOCATION_INFO_NO_COLUMNS X_PyCodeLocationInfoKind = 13
	// one lineforms are 10 to 12
	PY_CODE_LOCATION_INFO_LONG X_PyCodeLocationInfoKind = 14
	// one lineforms are 10 to 12
	PY_CODE_LOCATION_INFO_NONE X_PyCodeLocationInfoKind = 15
)

type X_PyCoroObject

type X_PyCoroObject struct {
}

type X_PyErr_StackItem

type X_PyErr_StackItem = X_errStackitem

type X_PyExecutorArray

type X_PyExecutorArray struct {
	Size      c.Int
	Capacity  c.Int
	Executors [1]*X_PyExecutorObject
}

type X_PyExecutorObject

type X_PyExecutorObject struct {
}

type X_PyFrameEvalFunction

type X_PyFrameEvalFunction = func(_llcppg_param1 *PyThreadState, _llcppg_param2 *X_PyInterpreterFrame, _llcppg_param3 c.Int) *PyObject

Frame evaluation API

llgo:type C

type X_PyGenObject

type X_PyGenObject struct {
}

type X_PyInterpreterFrame

type X_PyInterpreterFrame struct {
}

func (*X_PyInterpreterFrame) PyUnstable_InterpreterFrame_GetCode

func (self *X_PyInterpreterFrame) PyUnstable_InterpreterFrame_GetCode() *PyObject

Returns the code object of the frame (strong reference). Does not raise an exception.

llgo:link (*X_PyInterpreterFrame).PyUnstable_InterpreterFrame_GetCode C.PyUnstable_InterpreterFrame_GetCode

func (*X_PyInterpreterFrame) PyUnstable_InterpreterFrame_GetLasti

func (self *X_PyInterpreterFrame) PyUnstable_InterpreterFrame_GetLasti() c.Int

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

llgo:link (*X_PyInterpreterFrame).PyUnstable_InterpreterFrame_GetLasti C.PyUnstable_InterpreterFrame_GetLasti

func (*X_PyInterpreterFrame) PyUnstable_InterpreterFrame_GetLine

func (self *X_PyInterpreterFrame) PyUnstable_InterpreterFrame_GetLine() c.Int

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

llgo:link (*X_PyInterpreterFrame).PyUnstable_InterpreterFrame_GetLine C.PyUnstable_InterpreterFrame_GetLine

type X_PyLongValue

type X_PyLongValue struct {
	LvTag   c.UintptrT
	ObDigit [1]Digit
}

Long integer representation.

Long integers are made up of a number of 30- or 15-bit digits, depending on the platform. The number of digits (ndigits) is stored in the high bits of the lv_tag field (lvtag >> _PyLong_NON_SIZE_BITS).

The absolute value of a number is equal to SUM(for i=0 through ndigits-1) ob_digit[i] * 2**(PyLong_SHIFT*i)

The sign of the value is stored in the lower 2 bits of lv_tag.

- 0: Positive - 1: Zero - 2: Negative

The third lowest bit of lv_tag is set to 1 for the small ints.

In a normalized number, ob_digit[ndigits-1] (the most significant digit) is never zero. Also, in all cases, for all valid i, 0 <= ob_digit[i] <= PyLong_MASK.

The allocation function takes care of allocating extra memory so that ob_digit[0] ... ob_digit[ndigits-1] are actually available. We always allocate memory for at least one digit, so accessing ob_digit[0] is always safe. However, in the case ndigits == 0, the contents of ob_digit[0] may be undefined.

type X_PyManagedBufferObject

type X_PyManagedBufferObject struct {
	ObBase  PyObject
	Flags   c.Int
	Exports PySsizeT
	Master  PyBuffer
}

type X_PyMonitoringState

type X_PyMonitoringState struct {
	Active c.Uint8T
	Opaque c.Uint8T
}

type X_PyOnceFlag

type X_PyOnceFlag 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_PyRemoteDebuggerSupport

type X_PyRemoteDebuggerSupport struct {
	DebuggerPendingCall c.Int32T
	DebuggerScriptPath  [512]c.Char
}

type X_PyStackChunk

type X_PyStackChunk = X_stackChunk

type X_PyTssT

type X_PyTssT 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_PyUnicodeWriter

type X_PyUnicodeWriter struct {
	Buffer       *PyObject
	Data         unsafe.Pointer
	Kind         c.Int
	Maxchar      Py_UCS4
	Size         PySsizeT
	Pos          PySsizeT
	MinLength    PySsizeT
	MinChar      Py_UCS4
	Overallocate uint8
	Readonly     uint8
}

--- Private _PyUnicodeWriter API ---------------------------------------

func (*X_PyUnicodeWriter) Dealloc

func (self *X_PyUnicodeWriter) Dealloc()

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

llgo:link (*X_PyUnicodeWriter).Dealloc C._PyUnicodeWriter_Dealloc

func (*X_PyUnicodeWriter) Finish

func (self *X_PyUnicodeWriter) Finish() *PyObject

Get the value of the writer as a Unicode string. Clear the buffer of the writer. Raise an exception and return NULL on error.

llgo:link (*X_PyUnicodeWriter).Finish C._PyUnicodeWriter_Finish

func (*X_PyUnicodeWriter) Init

func (self *X_PyUnicodeWriter) Init()

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.

llgo:link (*X_PyUnicodeWriter).Init C._PyUnicodeWriter_Init

func (*X_PyUnicodeWriter) PrepareInternal

func (self *X_PyUnicodeWriter) PrepareInternal(length PySsizeT, maxchar Py_UCS4) c.Int

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

llgo:link (*X_PyUnicodeWriter).PrepareInternal C._PyUnicodeWriter_PrepareInternal

func (*X_PyUnicodeWriter) PrepareKindInternal

func (self *X_PyUnicodeWriter) PrepareKindInternal(kind c.Int) c.Int

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

llgo:link (*X_PyUnicodeWriter).PrepareKindInternal C._PyUnicodeWriter_PrepareKindInternal

func (*X_PyUnicodeWriter) WriteASCIIString

func (self *X_PyUnicodeWriter) WriteASCIIString(str *c.Char, len PySsizeT) c.Int

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

llgo:link (*X_PyUnicodeWriter).WriteASCIIString C._PyUnicodeWriter_WriteASCIIString

func (*X_PyUnicodeWriter) WriteChar

func (self *X_PyUnicodeWriter) WriteChar(ch Py_UCS4) c.Int

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

llgo:link (*X_PyUnicodeWriter).WriteChar C._PyUnicodeWriter_WriteChar

func (*X_PyUnicodeWriter) WriteLatin1String

func (self *X_PyUnicodeWriter) WriteLatin1String(str *c.Char, len PySsizeT) c.Int

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

llgo:link (*X_PyUnicodeWriter).WriteLatin1String C._PyUnicodeWriter_WriteLatin1String

func (*X_PyUnicodeWriter) WriteStr

func (self *X_PyUnicodeWriter) WriteStr(str *PyObject) c.Int

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

llgo:link (*X_PyUnicodeWriter).WriteStr C._PyUnicodeWriter_WriteStr

func (*X_PyUnicodeWriter) WriteSubstring

func (self *X_PyUnicodeWriter) WriteSubstring(str *PyObject, start PySsizeT, end PySsizeT) c.Int

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

llgo:link (*X_PyUnicodeWriter).WriteSubstring C._PyUnicodeWriter_WriteSubstring

type X_PyWeakReference

type X_PyWeakReference struct {
	ObBase     PyObject
	WrObject   *PyObject
	WrCallback *PyObject
	Hash       PyHashT
	WrPrev     *PyWeakReference
	WrNext     *PyWeakReference
	Vectorcall Vectorcallfunc
}

PyWeakReference is the base struct for the Python ReferenceType, ProxyType, and CallableProxyType.

type X_Py_Identifier

type X_Py_Identifier struct {
	String *c.Char
	Index  PySsizeT
	Mutex  _llcppg_anon_1
}

******************* String Literals ****************************************/ /* 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*.

func (*X_Py_Identifier) X_PyUnicode_FromId

func (self *X_Py_Identifier) X_PyUnicode_FromId() *PyObject

Return an interned Unicode object for an Identifier; may fail if there is no memory.

llgo:link (*X_Py_Identifier).X_PyUnicode_FromId C._PyUnicode_FromId

type X_dictkeysobject

type X_dictkeysobject struct {
}

type X_dictvalues

type X_dictvalues struct {
}

type X_errStackitem

type X_errStackitem struct {
	ExcValue     *PyObject
	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 PyImport_FrozenModules *X_frozen

Embedding apps may change this pointer to point to their favorite collection of frozen modules:

type X_heaptypeobject

type X_heaptypeobject struct {
	HtType       PyTypeObject
	AsAsync      PyAsyncMethods
	AsNumber     PyNumberMethods
	AsMapping    PyMappingMethods
	AsSequence   PySequenceMethods
	AsBuffer     PyBufferProcs
	HtName       *PyObject
	HtSlots      *PyObject
	HtQualname   *PyObject
	HtCachedKeys *X_dictkeysobject
	HtModule     *PyObject
	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() *PyObject
}
var PyImport_Inittab *X_inittab

This is not used after Py_Initialize() is called.

func (*X_inittab) PyImport_ExtendInittab

func (self *X_inittab) PyImport_ExtendInittab() c.Int

llgo:link (*X_inittab).PyImport_ExtendInittab 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    PyObject
	LongValue X_PyLongValue
}

type X_object

type X_object struct {
	ObType *PyTypeObject
	// contains filtered or unexported fields
}

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        *PyObject
	GetitemVersion c.Uint32T
	Init           *PyObject
}

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]*PyObject
}

type X_traceback

type X_traceback struct {
	ObBase   PyObject
	TbNext   *PyTracebackObject
	TbFrame  *PyFrameObject
	TbLasti  c.Int
	TbLineno c.Int
}

type X_ts

type X_ts struct {
	Prev                         *PyThreadState
	Next                         *PyThreadState
	Interp                       *PyInterpreterState
	EvalBreaker                  c.UintptrT
	X_status                     _llcppg_anon_5
	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_PyInterpreterFrame
	CProfilefunc                 PyTracefunc
	CTracefunc                   PyTracefunc
	CProfileobj                  *PyObject
	CTraceobj                    *PyObject
	CurrentException             *PyObject
	ExcInfo                      *X_PyErr_StackItem
	Dict                         *PyObject
	GilstateCounter              c.Int
	AsyncExc                     *PyObject
	ThreadId                     c.Ulong
	NativeThreadId               c.Ulong
	DeleteLater                  *PyObject
	CriticalSection              c.UintptrT
	CoroutineOriginTrackingDepth c.Int
	AsyncGenFirstiter            *PyObject
	AsyncGenFinalizer            *PyObject
	Context                      *PyObject
	ContextVer                   c.Uint64T
	Id                           c.Uint64T
	DatastackChunk               *X_PyStackChunk
	DatastackTop                 **PyObject
	DatastackLimit               **PyObject
	ExcState                     X_PyErr_StackItem
	CurrentExecutor              *PyObject
	DictGlobalVersion            c.Uint64T
	ThreadingLocalKey            *PyObject
	ThreadingLocalSentinel       *PyObject
	RemoteDebuggerSupport        X_PyRemoteDebuggerSupport
	DatastackCachedChunk         *X_PyStackChunk
}

type X_typeobject

type X_typeobject struct {
	ObBase             PyVarObject
	TpName             *c.Char
	TpBasicsize        PySsizeT
	TpItemsize         PySsizeT
	TpDealloc          Destructor
	TpVectorcallOffset PySsizeT
	TpGetattr          Getattrfunc
	TpSetattr          Setattrfunc
	TpAsAsync          *PyAsyncMethods
	TpRepr             Reprfunc
	TpAsNumber         *PyNumberMethods
	TpAsSequence       *PySequenceMethods
	TpAsMapping        *PyMappingMethods
	TpHash             Hashfunc
	TpCall             Ternaryfunc
	TpStr              Reprfunc
	TpGetattro         Getattrofunc
	TpSetattro         Setattrofunc
	TpAsBuffer         *PyBufferProcs
	TpFlags            c.Ulong
	TpDoc              *c.Char
	TpTraverse         Traverseproc
	TpClear            Inquiry
	TpRichcompare      Richcmpfunc
	TpWeaklistoffset   PySsizeT
	TpIter             Getiterfunc
	TpIternext         Iternextfunc
	TpMethods          *PyMethodDef
	TpMembers          *PyMemberDef
	TpGetset           *PyGetSetDef
	TpBase             *PyTypeObject
	TpDict             *PyObject
	TpDescrGet         Descrgetfunc
	TpDescrSet         Descrsetfunc
	TpDictoffset       PySsizeT
	TpInit             Initproc
	TpAlloc            Allocfunc
	TpNew              Newfunc
	TpFree             Freefunc
	TpIsGc             Inquiry
	TpBases            *PyObject
	TpMro              *PyObject
	TpCache            *PyObject
	TpSubclasses       unsafe.Pointer
	TpWeaklist         *PyObject
	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