$51 GRAYBYTE WORDPRESS FILE MANAGER $64

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/cffi/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/cffi//commontypes.py
import sys
from . import model
from .error import FFIError


COMMON_TYPES = {}

try:
    # fetch "bool" and all simple Windows types
    from _cffi_backend import _get_common_types
    _get_common_types(COMMON_TYPES)
except ImportError:
    pass

COMMON_TYPES['FILE'] = model.unknown_type('FILE', '_IO_FILE')
COMMON_TYPES['bool'] = '_Bool'    # in case we got ImportError above

for _type in model.PrimitiveType.ALL_PRIMITIVE_TYPES:
    if _type.endswith('_t'):
        COMMON_TYPES[_type] = _type
del _type

_CACHE = {}

def resolve_common_type(parser, commontype):
    try:
        return _CACHE[commontype]
    except KeyError:
        cdecl = COMMON_TYPES.get(commontype, commontype)
        if not isinstance(cdecl, str):
            result, quals = cdecl, 0    # cdecl is already a BaseType
        elif cdecl in model.PrimitiveType.ALL_PRIMITIVE_TYPES:
            result, quals = model.PrimitiveType(cdecl), 0
        elif cdecl == 'set-unicode-needed':
            raise FFIError("The Windows type %r is only available after "
                           "you call ffi.set_unicode()" % (commontype,))
        else:
            if commontype == cdecl:
                raise FFIError(
                    "Unsupported type: %r.  Please look at "
        "http://cffi.readthedocs.io/en/latest/cdef.html#ffi-cdef-limitations "
                    "and file an issue if you think this type should really "
                    "be supported." % (commontype,))
            result, quals = parser.parse_type_and_quals(cdecl)   # recursive

        assert isinstance(result, model.BaseTypeByIdentity)
        _CACHE[commontype] = result, quals
        return result, quals


# ____________________________________________________________
# extra types for Windows (most of them are in commontypes.c)


def win_common_types():
    return {
        "UNICODE_STRING": model.StructType(
            "_UNICODE_STRING",
            ["Length",
             "MaximumLength",
             "Buffer"],
            [model.PrimitiveType("unsigned short"),
             model.PrimitiveType("unsigned short"),
             model.PointerType(model.PrimitiveType("wchar_t"))],
            [-1, -1, -1]),
        "PUNICODE_STRING": "UNICODE_STRING *",
        "PCUNICODE_STRING": "const UNICODE_STRING *",

        "TBYTE": "set-unicode-needed",
        "TCHAR": "set-unicode-needed",
        "LPCTSTR": "set-unicode-needed",
        "PCTSTR": "set-unicode-needed",
        "LPTSTR": "set-unicode-needed",
        "PTSTR": "set-unicode-needed",
        "PTBYTE": "set-unicode-needed",
        "PTCHAR": "set-unicode-needed",
        }

if sys.platform == 'win32':
    COMMON_TYPES.update(win_common_types())

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
17 Dec 2025 3.08 AM
root / root
0755
__pycache__
--
14 Aug 2025 9.24 PM
root / root
0755
__init__.py
0.501 KB
17 Apr 2025 8.10 PM
root / root
0644
_cffi_errors.h
3.816 KB
17 Apr 2025 8.10 PM
root / root
0644
_cffi_include.h
14.453 KB
17 Apr 2025 8.10 PM
root / root
0644
_embedding.h
17.266 KB
17 Apr 2025 8.10 PM
root / root
0644
api.py
41.078 KB
17 Apr 2025 8.10 PM
root / root
0644
backend_ctypes.py
41.459 KB
17 Apr 2025 8.10 PM
root / root
0644
cffi_opcode.py
5.59 KB
17 Apr 2025 8.10 PM
root / root
0644
commontypes.py
2.626 KB
17 Apr 2025 8.10 PM
root / root
0644
cparser.py
43.194 KB
17 Apr 2025 8.10 PM
root / root
0644
error.py
0.856 KB
17 Apr 2025 8.10 PM
root / root
0644
ffiplatform.py
3.951 KB
17 Apr 2025 8.10 PM
root / root
0644
lock.py
0.729 KB
17 Apr 2025 8.10 PM
root / root
0644
model.py
21.258 KB
17 Apr 2025 8.10 PM
root / root
0644
parse_c_type.h
5.836 KB
17 Apr 2025 8.10 PM
root / root
0644
pkgconfig.py
4.271 KB
17 Apr 2025 8.10 PM
root / root
0644
recompiler.py
63.084 KB
17 Apr 2025 8.10 PM
root / root
0644
setuptools_ext.py
8.722 KB
17 Apr 2025 8.10 PM
root / root
0644
vengine_cpy.py
42.305 KB
17 Apr 2025 8.10 PM
root / root
0644
vengine_gen.py
26.059 KB
17 Apr 2025 8.10 PM
root / root
0644
verifier.py
10.989 KB
17 Apr 2025 8.10 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF