PyCyBase 0.1.10__cp315-cp315-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cbase/__infra__.pxd +6 -0
- cbase/__init__.pxd +6 -0
- cbase/__init__.py +31 -0
- cbase/allocator_protocol/__infra__.pxd +65 -0
- cbase/allocator_protocol/__init__.pxd +65 -0
- cbase/allocator_protocol/__init__.py +45 -0
- cbase/allocator_protocol/c_allocator_protocol.c +31874 -0
- cbase/allocator_protocol/c_allocator_protocol.cp315-win_amd64.pyd +0 -0
- cbase/allocator_protocol/c_allocator_protocol.h +352 -0
- cbase/allocator_protocol/c_allocator_protocol.pxd +66 -0
- cbase/allocator_protocol/c_allocator_protocol.pyi +144 -0
- cbase/allocator_protocol/c_allocator_protocol.pyx +209 -0
- cbase/allocator_protocol/c_heap_allocator.c +38225 -0
- cbase/allocator_protocol/c_heap_allocator.cp315-win_amd64.pyd +0 -0
- cbase/allocator_protocol/c_heap_allocator.h +554 -0
- cbase/allocator_protocol/c_heap_allocator.pxd +105 -0
- cbase/allocator_protocol/c_heap_allocator.pyi +161 -0
- cbase/allocator_protocol/c_heap_allocator.pyx +303 -0
- cbase/allocator_protocol/c_nt_shm_allocator.c +33455 -0
- cbase/allocator_protocol/c_nt_shm_allocator.cp315-win_amd64.pyd +0 -0
- cbase/allocator_protocol/c_nt_shm_allocator.h +1105 -0
- cbase/allocator_protocol/c_nt_shm_allocator.pxd +110 -0
- cbase/allocator_protocol/c_nt_shm_allocator.pyx +223 -0
- cbase/allocator_protocol/c_shm_allocator.h +1270 -0
- cbase/allocator_protocol/c_shm_allocator.pxd +150 -0
- cbase/allocator_protocol/c_shm_allocator.pyi +299 -0
- cbase/allocator_protocol/c_shm_allocator.pyx +445 -0
- cbase/allocator_protocol/c_shm_comp.c +4654 -0
- cbase/allocator_protocol/c_shm_comp.cp315-win_amd64.pyd +0 -0
- cbase/allocator_protocol/c_shm_comp.h +49 -0
- cbase/allocator_protocol/c_shm_comp.pxd +46 -0
- cbase/allocator_protocol/c_shm_comp.pyx +1 -0
- cbase/backports/__infra__.pxd +17 -0
- cbase/backports/__init__.pxd +17 -0
- cbase/backports/__init__.py +9 -0
- cbase/backports/pydict.h +55 -0
- cbase/backports/pydict.pxd +5 -0
- cbase/backports/pylong.c +9965 -0
- cbase/backports/pylong.cp315-win_amd64.pyd +0 -0
- cbase/backports/pylong.h +79 -0
- cbase/backports/pylong.pxd +23 -0
- cbase/backports/pylong.pyx +61 -0
- cbase/bytemap/__infra__.pxd +42 -0
- cbase/bytemap/__init__.pxd +42 -0
- cbase/bytemap/__init__.py +21 -0
- cbase/bytemap/c_bytemap.c +52151 -0
- cbase/bytemap/c_bytemap.cp315-win_amd64.pyd +0 -0
- cbase/bytemap/c_bytemap.h +867 -0
- cbase/bytemap/c_bytemap.pxd +370 -0
- cbase/bytemap/c_bytemap.pyx +1760 -0
- cbase/bytemap/xxh3.h +55 -0
- cbase/bytemap/xxhash.c +42 -0
- cbase/bytemap/xxhash.h +7487 -0
- cbase/config_view.c +7253 -0
- cbase/config_view.cp315-win_amd64.pyd +0 -0
- cbase/config_view.pyx +85 -0
- cbase/env.c +11120 -0
- cbase/env.cp315-win_amd64.pyd +0 -0
- cbase/env.pxd +8 -0
- cbase/env.pyi +48 -0
- cbase/env.pyx +46 -0
- cbase/includes/cbase/allocator_protocol/c_allocator_protocol.c +31874 -0
- cbase/includes/cbase/allocator_protocol/c_allocator_protocol.h +352 -0
- cbase/includes/cbase/allocator_protocol/c_heap_allocator.c +38225 -0
- cbase/includes/cbase/allocator_protocol/c_heap_allocator.h +554 -0
- cbase/includes/cbase/allocator_protocol/c_nt_shm_allocator.c +33455 -0
- cbase/includes/cbase/allocator_protocol/c_nt_shm_allocator.h +1105 -0
- cbase/includes/cbase/allocator_protocol/c_shm_allocator.h +1270 -0
- cbase/includes/cbase/allocator_protocol/c_shm_comp.c +4654 -0
- cbase/includes/cbase/allocator_protocol/c_shm_comp.h +49 -0
- cbase/includes/cbase/backports/pydict.h +55 -0
- cbase/includes/cbase/backports/pylong.c +9965 -0
- cbase/includes/cbase/backports/pylong.h +79 -0
- cbase/includes/cbase/bytemap/c_bytemap.c +52151 -0
- cbase/includes/cbase/bytemap/c_bytemap.h +867 -0
- cbase/includes/cbase/bytemap/xxh3.h +55 -0
- cbase/includes/cbase/bytemap/xxhash.c +42 -0
- cbase/includes/cbase/bytemap/xxhash.h +7487 -0
- cbase/includes/cbase/config_view.c +7253 -0
- cbase/includes/cbase/env.c +11120 -0
- cbase/includes/cbase/int128.h +81 -0
- cbase/includes/cbase/intern_string/c_intern_string.c +28138 -0
- cbase/includes/cbase/intern_string/c_intern_string.h +614 -0
- cbase/includes/cbase/nt/pthread_nt_compat.h +102 -0
- cbase/includes/cbase/nt/regex_nt_compat.h +133 -0
- cbase/includes/cbase/nt/time_sched_nt_compat.h +32 -0
- cbase/int128.h +81 -0
- cbase/int128.pxd +15 -0
- cbase/intern_string/BENCHMARK.md +157 -0
- cbase/intern_string/__infra__.pxd +13 -0
- cbase/intern_string/__init__.pxd +13 -0
- cbase/intern_string/__init__.py +19 -0
- cbase/intern_string/c_intern_string.c +28138 -0
- cbase/intern_string/c_intern_string.cp315-win_amd64.pyd +0 -0
- cbase/intern_string/c_intern_string.h +614 -0
- cbase/intern_string/c_intern_string.pxd +121 -0
- cbase/intern_string/c_intern_string.pyi +376 -0
- cbase/intern_string/c_intern_string.pyx +765 -0
- cbase/nt/pthread_nt_compat.h +102 -0
- cbase/nt/regex_nt_compat.h +133 -0
- cbase/nt/time_sched_nt_compat.h +32 -0
- pycybase-0.1.10.dist-info/METADATA +190 -0
- pycybase-0.1.10.dist-info/RECORD +105 -0
- pycybase-0.1.10.dist-info/WHEEL +5 -0
- pycybase-0.1.10.dist-info/top_level.txt +1 -0
|
Binary file
|
cbase/config_view.pyx
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# config_view.pyx — compile-time macro registry for PyCyBase
|
|
2
|
+
#
|
|
3
|
+
# Exposes every overridable compile-time constant as a read-only
|
|
4
|
+
# mappingproxy (CONFIG_VIEW) so that downstream code and diagnostics
|
|
5
|
+
# can inspect the build configuration at runtime.
|
|
6
|
+
|
|
7
|
+
from cbase.allocator_protocol.c_allocator_protocol cimport (
|
|
8
|
+
AP_ALLOC_VIGILANT, AP_ALLOC_MAGIC, AP_DEALLOC_MAGIC, AP_DECREF_AUTOFREE,
|
|
9
|
+
AP_ALLOC_WITH_LOCK, AP_ALLOC_WITH_SHM, AP_ALLOC_WITH_FREELIST,
|
|
10
|
+
)
|
|
11
|
+
from cbase.allocator_protocol.c_heap_allocator cimport (
|
|
12
|
+
AP_HEAP_AUTOPAGE_CAPACITY, AP_HEAP_AUTOPAGE_CAPACITY_MAX, AP_HEAP_AUTOPAGE_ALIGNMENT,
|
|
13
|
+
AP_HEAP_EXACT_BIN_COUNT, AP_HEAP_LARGE_BIN_COUNT, AP_HEAP_BIN_COUNT,
|
|
14
|
+
AP_HEAP_PAGE_EXTEND_MAX, AP_HEAP_PAGE_FIT_TO_REQUEST, AP_HEAP_EXACT_BIN_PROBE_COUNT,
|
|
15
|
+
)
|
|
16
|
+
from cbase.allocator_protocol.c_shm_comp cimport (
|
|
17
|
+
AP_SHM_AUTOPAGE_CAPACITY, AP_SHM_AUTOPAGE_CAPACITY_MAX, AP_SHM_AUTOPAGE_ALIGNMENT,
|
|
18
|
+
AP_SHM_ALLOCATOR_PREFIX, AP_SHM_ALLOCATOR_DEFAULT_REGION_SIZE,
|
|
19
|
+
AP_SHM_NAME_LEN, AP_SHM_PREFIX_MAX,
|
|
20
|
+
AP_SHM_EXACT_BIN_COUNT, AP_SHM_LARGE_BIN_COUNT, AP_SHM_BIN_COUNT,
|
|
21
|
+
AP_SHM_PAGE_EXTEND_MAX, AP_SHM_PAGE_FIT_TO_REQUEST, AP_SHM_EXACT_BIN_PROBE_COUNT,
|
|
22
|
+
)
|
|
23
|
+
from cbase.bytemap.c_bytemap cimport (
|
|
24
|
+
MIN_BYTEMAP_CAPACITY, DEFAULT_BYTEMAP_CAPACITY, BYTEMAP_GROWTH_FACTOR,
|
|
25
|
+
MAX_BYTEMAP_CAPACITY, BYTEMAP_SALT_MAGIC,
|
|
26
|
+
)
|
|
27
|
+
from cbase.intern_string.c_intern_string cimport (
|
|
28
|
+
ISTR_INITIAL_CAPACITY, FNV_OFFSET_BASIS, FNV_PRIME, ISTR_USE_BYTEMAP_BACKEND,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# -- Internal (mutable) dict -----------------------------------------------
|
|
33
|
+
cdef dict _config_view = {
|
|
34
|
+
# === allocator protocol ===
|
|
35
|
+
'AP_ALLOC_VIGILANT': AP_ALLOC_VIGILANT,
|
|
36
|
+
'AP_ALLOC_MAGIC': AP_ALLOC_MAGIC,
|
|
37
|
+
'AP_DEALLOC_MAGIC': AP_DEALLOC_MAGIC,
|
|
38
|
+
'AP_DECREF_AUTOFREE': AP_DECREF_AUTOFREE,
|
|
39
|
+
'AP_ALLOC_WITH_LOCK': AP_ALLOC_WITH_LOCK,
|
|
40
|
+
'AP_ALLOC_WITH_SHM': AP_ALLOC_WITH_SHM,
|
|
41
|
+
'AP_ALLOC_WITH_FREELIST': AP_ALLOC_WITH_FREELIST,
|
|
42
|
+
|
|
43
|
+
# === heap allocator ===
|
|
44
|
+
'AP_HEAP_AUTOPAGE_CAPACITY': AP_HEAP_AUTOPAGE_CAPACITY,
|
|
45
|
+
'AP_HEAP_AUTOPAGE_CAPACITY_MAX': AP_HEAP_AUTOPAGE_CAPACITY_MAX,
|
|
46
|
+
'AP_HEAP_AUTOPAGE_ALIGNMENT': AP_HEAP_AUTOPAGE_ALIGNMENT,
|
|
47
|
+
'AP_HEAP_EXACT_BIN_COUNT': AP_HEAP_EXACT_BIN_COUNT,
|
|
48
|
+
'AP_HEAP_LARGE_BIN_COUNT': AP_HEAP_LARGE_BIN_COUNT,
|
|
49
|
+
'AP_HEAP_BIN_COUNT': AP_HEAP_BIN_COUNT,
|
|
50
|
+
'AP_HEAP_PAGE_EXTEND_MAX': AP_HEAP_PAGE_EXTEND_MAX,
|
|
51
|
+
'AP_HEAP_PAGE_FIT_TO_REQUEST': AP_HEAP_PAGE_FIT_TO_REQUEST,
|
|
52
|
+
'AP_HEAP_EXACT_BIN_PROBE_COUNT': AP_HEAP_EXACT_BIN_PROBE_COUNT,
|
|
53
|
+
|
|
54
|
+
# === shared-memory allocator ===
|
|
55
|
+
'AP_SHM_AUTOPAGE_CAPACITY': AP_SHM_AUTOPAGE_CAPACITY,
|
|
56
|
+
'AP_SHM_AUTOPAGE_CAPACITY_MAX': AP_SHM_AUTOPAGE_CAPACITY_MAX,
|
|
57
|
+
'AP_SHM_AUTOPAGE_ALIGNMENT': AP_SHM_AUTOPAGE_ALIGNMENT,
|
|
58
|
+
'AP_SHM_ALLOCATOR_PREFIX': AP_SHM_ALLOCATOR_PREFIX.decode() if isinstance(AP_SHM_ALLOCATOR_PREFIX, bytes) else AP_SHM_ALLOCATOR_PREFIX,
|
|
59
|
+
'AP_SHM_ALLOCATOR_DEFAULT_REGION_SIZE': AP_SHM_ALLOCATOR_DEFAULT_REGION_SIZE,
|
|
60
|
+
'AP_SHM_NAME_LEN': AP_SHM_NAME_LEN,
|
|
61
|
+
'AP_SHM_PREFIX_MAX': AP_SHM_PREFIX_MAX,
|
|
62
|
+
'AP_SHM_EXACT_BIN_COUNT': AP_SHM_EXACT_BIN_COUNT,
|
|
63
|
+
'AP_SHM_LARGE_BIN_COUNT': AP_SHM_LARGE_BIN_COUNT,
|
|
64
|
+
'AP_SHM_BIN_COUNT': AP_SHM_BIN_COUNT,
|
|
65
|
+
'AP_SHM_PAGE_EXTEND_MAX': AP_SHM_PAGE_EXTEND_MAX,
|
|
66
|
+
'AP_SHM_PAGE_FIT_TO_REQUEST': AP_SHM_PAGE_FIT_TO_REQUEST,
|
|
67
|
+
'AP_SHM_EXACT_BIN_PROBE_COUNT': AP_SHM_EXACT_BIN_PROBE_COUNT,
|
|
68
|
+
|
|
69
|
+
# === bytemap ===
|
|
70
|
+
'MIN_BYTEMAP_CAPACITY': MIN_BYTEMAP_CAPACITY,
|
|
71
|
+
'DEFAULT_BYTEMAP_CAPACITY': DEFAULT_BYTEMAP_CAPACITY,
|
|
72
|
+
'BYTEMAP_GROWTH_FACTOR': BYTEMAP_GROWTH_FACTOR,
|
|
73
|
+
'MAX_BYTEMAP_CAPACITY': MAX_BYTEMAP_CAPACITY,
|
|
74
|
+
'BYTEMAP_SALT_MAGIC': BYTEMAP_SALT_MAGIC,
|
|
75
|
+
|
|
76
|
+
# === intern string ===
|
|
77
|
+
'ISTR_INITIAL_CAPACITY': ISTR_INITIAL_CAPACITY,
|
|
78
|
+
'ISTR_USE_BYTEMAP_BACKEND': ISTR_USE_BYTEMAP_BACKEND,
|
|
79
|
+
'FNV_OFFSET_BASIS': FNV_OFFSET_BASIS,
|
|
80
|
+
'FNV_PRIME': FNV_PRIME,
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
# -- Public read-only view -------------------------------------------------
|
|
84
|
+
from types import MappingProxyType
|
|
85
|
+
CONFIG_VIEW = MappingProxyType(_config_view)
|