Documentation
¶
Index ¶
- Variables
- func Load_library() error
- func PyBytesToString(b WCharPtr) string
- type GilType
- type PyConfig_3_12
- type PyGILState
- type PyInterpreterConfig
- type PyInterpreterStatePtr
- type PyObjectPtr
- type PyPreConfig
- type PyStatus
- type PyThreadStatePtr
- type PyWideStringList
- type PythonLibraryPtr
- type StartToken
- type WCharPtr
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Py_DecodeLocale func(string, uint64) WCharPtr Py_EncodeLocale func(WCharPtr, uint64) string PyPreConfig_InitIsolatedConfig func(*PyPreConfig) PyConfig_InitPythonConfig func(*PyConfig_3_12) PyConfig_InitIsolatedPythonConfig func(*PyConfig_3_12) PyConfig_Clear func(*PyConfig_3_12) Py_FinalizeEx func() int32 Py_EndInterpreter func(PyThreadStatePtr) // Check if we have the GIL. 1 if true, 0 if false. PyGILState_Check func() int32 // Take a reference to the GIL. Caution: this is recursive. PyGILState_Ensure func() PyGILState // Release a reference to the GIL. PyGILState_Release func(PyGILState) PyEval_AcquireThread func(PyThreadStatePtr) PyEval_ReleaseThread func(PyThreadStatePtr) PyEval_SaveThread func() PyThreadStatePtr PyEval_RestoreThread func(PyThreadStatePtr) PyThreadState_Get func() PyThreadStatePtr PyThreadState_New func(PyInterpreterStatePtr) PyThreadStatePtr PyThreadState_Swap func(PyThreadStatePtr) PyThreadStatePtr PyThreadState_Clear func(PyThreadStatePtr) PyThreadState_Delete func(PyThreadStatePtr) PyThreadState_DeleteCurrent func() PyThreadState_GetInterpreter func(PyThreadStatePtr) PyInterpreterStatePtr PyInterpreterState_Get func() PyInterpreterStatePtr PyInterpreterState_GetID func(PyInterpreterStatePtr) int64 PyInterpreterState_Clear func(PyInterpreterStatePtr) PyInterpreterState_Delete func(PyInterpreterStatePtr) PyRun_SimpleString func(string) int32 PyRun_String func(s string, token StartToken, globals, locals PyObjectPtr) PyObjectPtr PyModule_New func(string) PyObjectPtr PyModule_AddObjectRef func(module PyObjectPtr, name string, item PyObjectPtr) int32 PyBool_FromLong func(int) PyObjectPtr PyLong_FromLong func(int) PyObjectPtr PyLong_FromUnsignedLong func(uint) PyObjectPtr PyLong_FromLongLong func(int64) PyObjectPtr PyLong_FromUnsignedLongLong func(uint64) PyObjectPtr PyTuple_New func(int64) PyObjectPtr PyTuple_SetItem func(tuple PyObjectPtr, pos int64, item PyObjectPtr) int32 PyDict_New func() PyObjectPtr PyDictProxy_New func(mapping PyObjectPtr) PyObjectPtr PyDict_Clear func(PyObjectPtr) PyDict_SetItem func(dict, key, val PyObjectPtr) int32 PyDict_SetItemString func(dict PyObjectPtr, key string, val PyObjectPtr) int Py_DecRef func(PyObjectPtr) Py_IncRef func(PyObjectPtr) PyErr_Clear func() PyErr_Print func() )
View Source
var ( Py_PreInitialize func(*PyPreConfig) PyStatus PyConfig_SetBytesString func(*PyConfig_3_12, *WCharPtr, string) PyStatus Py_InitializeFromConfig func(*PyConfig_3_12) PyStatus Py_NewInterpreterFromConfig func(state *PyThreadStatePtr, c *PyInterpreterConfig) PyStatus )
View Source
var TypeStatus = ffi.Type{Type: ffi.Struct, Elements: &[]*ffi.Type{&ffi.TypeSint32, &ffi.TypePointer, &ffi.TypePointer, &ffi.TypeSint32}[0]}
Functions ¶
func Load_library ¶
func Load_library() error
func PyBytesToString ¶
Types ¶
type PyConfig_3_12 ¶
type PyConfig_3_12 struct {
ConfigInit int32
Isolated int32
UseEnvironment int32
DevMode int32
InstallSignalHandlers int32
UseHashSeed int32
HashSeed uint
FaultHandler int32
TraceMalloc int32
PerfProfiling int32
ImportTime int32
CodeDebugRanges int32
ShowRefCount int32
DumpRefs int32
DumpRefsFile WCharPtr
MallocStats int32
FilesystemEncoding WCharPtr
FilesystemErrors WCharPtr
PycachePrefix WCharPtr
ParseArgv int32
OrigArgv PyWideStringList
Argv PyWideStringList
XOptions PyWideStringList
WarnOptions PyWideStringList
SiteImport int32
BytesWarning int32
WarnDefaultEncoding int32
Inspect int32
Interactive int32
OptimizationLevel int32
ParserDebug int32
WriteBytecode int32
Verbose int32
Quiet int32
UserSiteDirectory int32
ConfigureCStdio int32
BufferedStdio int32
StdioEncodings WCharPtr
StdioErrors WCharPtr
// LegacyWindowsStdio int32 // if windows
CheckHashPycsMode WCharPtr
UseFrozenModules int32
SafePath int32
IntMaxStrDigits int32
/* Path configuration inputs */
PathConfigWarnings int32
ProgramName WCharPtr
PythonPathEnv WCharPtr
Home WCharPtr
PlatLibDir WCharPtr
/* Path configuration outputs */
ModuleSearchPathsSet int32
ModuleSearchPaths PyWideStringList
StdlibDir *byte
Executable *byte
BaseExecutable *byte
Prefix *byte
BasePrefix *byte
ExecPrefix *byte
BaseExecPrefix *byte
/* Parameter only used by Py_Main */
SkipSourceFirstLine int32
RunCommand *byte
RunModule *byte
RunFilename *byte
/* Set by Py_Main */
SysPath0 *byte
/* Private Fields */
InstallImportLib int32
InitMain int32
IsPythonBuild int32
}
type PyGILState ¶
type PyGILState int32
type PyInterpreterConfig ¶
type PyInterpreterStatePtr ¶
type PyInterpreterStatePtr uintptr
type PyObjectPtr ¶
type PyObjectPtr uintptr
type PyPreConfig ¶
type PyWideStringList ¶
type PythonLibraryPtr ¶
type PythonLibraryPtr = uintptr
type StartToken ¶
type StartToken = int32
const ( PySingleInput StartToken = 256 // Used for single statements PyFileInput StartToken = 257 // Used for modules (i.e. many statements) PyEvalInput StartToken = 258 // Used for expressions(?) PyFuncTypeInput StartToken = 345 // ??? no idea )
Click to show internal directories.
Click to hide internal directories.