This commit is contained in:
2026-06-16 16:09:42 +08:00
commit bffb0cb6b7
644 changed files with 86620 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
"""
Auto-generated Python stub file from cpython.py
Module: cpython
"""
import t, c
class PyObject:
ob_refcnt: t.CLong
ob_type: t.CPtr
def Py_Initialize() -> t.CVoid | t.CExtern | t.State: pass
def PyLong_FromLong(value: t.CLong) -> PyObject | t.CPtr | t.CExtern | t.State: pass
def PyObject_Str(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.CExtern | t.State: pass
def PyUnicode_AsUTF8(unicode_obj: PyObject | t.CPtr) -> str | t.CExtern | t.State: pass
def Py_DecRef(obj: PyObject | t.CPtr) -> t.CVoid | t.CExtern | t.State: pass
def Py_Finalize() -> t.CVoid | t.CExtern | t.State: pass

View File

@@ -0,0 +1,19 @@
"""
Auto-generated Python stub file from viperlib.py
Module: viperlib
"""
import t, c
import viperio
from stdarg import arg
TEMP_BUF_SIZE: t.CDefine = 24
def get_digit_count(num: t.CUnsignedInt, base: t.CInt) -> t.CStatic | t.CInt | t.State: pass
def sprintf(buf: t.CChar | t.CPtr, rule: str, *args) -> t.CVoid | t.State: pass
def vsprintf(buf: t.CChar | t.CPtr, rule: str, *args) -> t.CInt | t.State: pass
def snprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, *args) -> t.CInt | t.State: pass

View File

@@ -0,0 +1,67 @@
"""
Auto-generated Python stub file from stdint.py
Module: stdint
"""
import c
import t
INT: t.CTypedef = t.CInt
INTPTR: t.CTypedef = t.CInt | t.CPtr
BOOL: t.CTypedef = t.CInt
UINT: t.CTypedef = t.CUnsignedInt
UINTPTR: t.CTypedef = UINT | t.CPtr
BYTE: t.CTypedef = t.CUnsignedChar
BYTEPTR: t.CTypedef = BYTE | t.CPtr
WORD: t.CTypedef = t.CUInt16T
DWORD: t.CTypedef = t.CUInt32T
QWORD: t.CTypedef = t.CUInt64T
TCHAR: t.CTypedef = t.CChar
CHARLIST: t.CTypedef = str | t.CPtr
VOID: t.CTypedef = t.CVoid
SHORT: t.CTypedef = t.CShort
SHORTPTR: t.CTypedef = t.CShort | t.CPtr
USHORT: t.CTypedef = t.CUnsignedShort
USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr
LONGLONG: t.CTypedef = t.CLong | t.CLong
ULONGLONG: t.CTypedef = t.CUnsignedLong | t.CLong
LONG: t.CTypedef = t.CLong
ULONG: t.CTypedef = t.CUnsignedLong
WCHAR: t.CTypedef = WORD
WCHARPTR: t.CTypedef = WORD | t.CPtr
CHARPTR: t.CTypedef = t.CChar | t.CPtr
FSIZE_t: t.CTypedef = DWORD
LBA_t: t.CTypedef = DWORD
UINTPTR: t.CTypedef = t.CUnsignedInt | t.CPtr
VOIDPTR: t.CTypedef = t.CVoid | t.CPtr
FLOAT: t.CTypedef = t.CFloat
DOUBLE: t.CTypedef = t.CDouble
FLOAT8: t.CTypedef = t.CFloat8T
FLOAT16: t.CTypedef = t.CFloat16T
FLOAT32: t.CTypedef = t.CFloat32T
FLOAT64: t.CTypedef = t.CFloat64T
FLOAT128: t.CTypedef = t.CFloat128T
INT8: t.CTypedef = t.CInt8T
INT16: t.CTypedef = t.CInt16T
INT32: t.CTypedef = t.CInt32T
INT64: t.CTypedef = t.CInt64T
UINT8: t.CTypedef = t.CUInt8T
UINT16: t.CTypedef = t.CUInt16T
UINT32: t.CTypedef = t.CUInt32T
UINT64: t.CTypedef = t.CUInt64T
INT8PTR: t.CTypedef = t.CInt8T | t.CPtr
INT16PTR: t.CTypedef = t.CInt16T | t.CPtr
INT32PTR: t.CTypedef = t.CInt32T | t.CPtr
INT64PTR: t.CTypedef = t.CInt64T | t.CPtr
UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr
UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr
UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr
UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr
CHAR8: t.CTypedef = t.CChar8T
CHAR16: t.CTypedef = t.CChar16T
CHAR32: t.CTypedef = t.CChar32T
CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr
CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr
CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr

View File

@@ -0,0 +1,14 @@
"""
Auto-generated Python stub file from main.py
Module: main
"""
import t, c
from t import CInt, CPtr, CChar, CLong
import viperlib
import cpython
def SetDllDirectoryA(lpPathName: str | CPtr) -> CInt | t.CExtern | t.State: pass
def main() -> CInt | t.CExport | t.State: pass

View File

@@ -0,0 +1,20 @@
"""
Auto-generated Python stub file from stdarg.py
Module: stdarg
"""
import c
import t
def va_start(args: t.CPtr, last_arg: t.CPtr) -> t.State | t.CExtern | t.CExport: pass
def va_arg(args: t.CPtr, type: t.CType) -> t.CType | t.CExtern | t.CExport | t.State: pass
def va_end(args: t.CPtr) -> t.State | t.CExtern | t.CExport: pass
va_list: t.CTypedef = t.CUnsignedChar | t.CPtr
def arg(type: t.CType) -> t.State | t.CExtern | t.CExport: pass

View File

@@ -0,0 +1,14 @@
"""
Auto-generated Python stub file from main.py
Module: main
"""
import t, c
from t import CInt, CPtr, CChar, CLong
import viperlib
import cpython
def SetDllDirectoryA(lpPathName: str | CPtr) -> CInt | t.CExtern | t.State: pass
def main() -> CInt | t.CExport | t.State: pass

View File

@@ -0,0 +1,6 @@
3e1c3f98e99cff7a:cpython.py
4d342c40331fc964:includes/viperlib.py
56cdd754a8a09347:includes/stdint.py
6999814920e8b3d5:main.py
81ac26077a460417:includes/stdarg.py
c9f4be41ca1cc2b4:includes/viperio.py

Binary file not shown.

View File

@@ -0,0 +1,22 @@
"""
Auto-generated Python stub file from viperio.py
Module: viperio
"""
import t, c
from stdint import *
class Buf:
data: t.CChar | t.CPtr
length: t.CSizeT
capacity: t.CSizeT
owned: bool
def __init__(self: Buf, data: t.CChar | t.CPtr, capacity: t.CSizeT, length: t.CSizeT, owned: bool) -> t.CVoid | t.State: pass
def clear(self: Buf) -> t.CVoid | t.State: pass
def write(self: Buf, src: t.CChar | t.CPtr, count: t.CSizeT) -> t.CSizeT | t.State: pass
def cstr(self: Buf) -> t.CChar | t.CPtr | t.State: pass
def reset(self: Buf) -> t.CVoid | t.State: pass
def __enter__(self: Buf) -> 'Buf' | t.CPtr | t.State: pass
def __exit__(self: Buf) -> t.CVoid | t.State: pass
def free(self: Buf) -> t.CVoid | t.State: pass

View File

@@ -0,0 +1,17 @@
"""
Auto-generated Python stub file from viperio.py
Module: viperio
"""
import t, c
@t.Object
class Buf:
buf: str
length: t.CSizeT
capacity: t.CSizeT
onHeap: bool
def __init__(self: Buf, buf: str, length: t.CSizeT, onHeap: bool) -> t.CVoid | t.State: pass
def free(self: Buf) -> t.CVoid | t.State: pass
def __del__(self: Buf) -> t.CVoid | t.State: pass