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.
Files changed (105) hide show
  1. cbase/__infra__.pxd +6 -0
  2. cbase/__init__.pxd +6 -0
  3. cbase/__init__.py +31 -0
  4. cbase/allocator_protocol/__infra__.pxd +65 -0
  5. cbase/allocator_protocol/__init__.pxd +65 -0
  6. cbase/allocator_protocol/__init__.py +45 -0
  7. cbase/allocator_protocol/c_allocator_protocol.c +31874 -0
  8. cbase/allocator_protocol/c_allocator_protocol.cp315-win_amd64.pyd +0 -0
  9. cbase/allocator_protocol/c_allocator_protocol.h +352 -0
  10. cbase/allocator_protocol/c_allocator_protocol.pxd +66 -0
  11. cbase/allocator_protocol/c_allocator_protocol.pyi +144 -0
  12. cbase/allocator_protocol/c_allocator_protocol.pyx +209 -0
  13. cbase/allocator_protocol/c_heap_allocator.c +38225 -0
  14. cbase/allocator_protocol/c_heap_allocator.cp315-win_amd64.pyd +0 -0
  15. cbase/allocator_protocol/c_heap_allocator.h +554 -0
  16. cbase/allocator_protocol/c_heap_allocator.pxd +105 -0
  17. cbase/allocator_protocol/c_heap_allocator.pyi +161 -0
  18. cbase/allocator_protocol/c_heap_allocator.pyx +303 -0
  19. cbase/allocator_protocol/c_nt_shm_allocator.c +33455 -0
  20. cbase/allocator_protocol/c_nt_shm_allocator.cp315-win_amd64.pyd +0 -0
  21. cbase/allocator_protocol/c_nt_shm_allocator.h +1105 -0
  22. cbase/allocator_protocol/c_nt_shm_allocator.pxd +110 -0
  23. cbase/allocator_protocol/c_nt_shm_allocator.pyx +223 -0
  24. cbase/allocator_protocol/c_shm_allocator.h +1270 -0
  25. cbase/allocator_protocol/c_shm_allocator.pxd +150 -0
  26. cbase/allocator_protocol/c_shm_allocator.pyi +299 -0
  27. cbase/allocator_protocol/c_shm_allocator.pyx +445 -0
  28. cbase/allocator_protocol/c_shm_comp.c +4654 -0
  29. cbase/allocator_protocol/c_shm_comp.cp315-win_amd64.pyd +0 -0
  30. cbase/allocator_protocol/c_shm_comp.h +49 -0
  31. cbase/allocator_protocol/c_shm_comp.pxd +46 -0
  32. cbase/allocator_protocol/c_shm_comp.pyx +1 -0
  33. cbase/backports/__infra__.pxd +17 -0
  34. cbase/backports/__init__.pxd +17 -0
  35. cbase/backports/__init__.py +9 -0
  36. cbase/backports/pydict.h +55 -0
  37. cbase/backports/pydict.pxd +5 -0
  38. cbase/backports/pylong.c +9965 -0
  39. cbase/backports/pylong.cp315-win_amd64.pyd +0 -0
  40. cbase/backports/pylong.h +79 -0
  41. cbase/backports/pylong.pxd +23 -0
  42. cbase/backports/pylong.pyx +61 -0
  43. cbase/bytemap/__infra__.pxd +42 -0
  44. cbase/bytemap/__init__.pxd +42 -0
  45. cbase/bytemap/__init__.py +21 -0
  46. cbase/bytemap/c_bytemap.c +52151 -0
  47. cbase/bytemap/c_bytemap.cp315-win_amd64.pyd +0 -0
  48. cbase/bytemap/c_bytemap.h +867 -0
  49. cbase/bytemap/c_bytemap.pxd +370 -0
  50. cbase/bytemap/c_bytemap.pyx +1760 -0
  51. cbase/bytemap/xxh3.h +55 -0
  52. cbase/bytemap/xxhash.c +42 -0
  53. cbase/bytemap/xxhash.h +7487 -0
  54. cbase/config_view.c +7253 -0
  55. cbase/config_view.cp315-win_amd64.pyd +0 -0
  56. cbase/config_view.pyx +85 -0
  57. cbase/env.c +11120 -0
  58. cbase/env.cp315-win_amd64.pyd +0 -0
  59. cbase/env.pxd +8 -0
  60. cbase/env.pyi +48 -0
  61. cbase/env.pyx +46 -0
  62. cbase/includes/cbase/allocator_protocol/c_allocator_protocol.c +31874 -0
  63. cbase/includes/cbase/allocator_protocol/c_allocator_protocol.h +352 -0
  64. cbase/includes/cbase/allocator_protocol/c_heap_allocator.c +38225 -0
  65. cbase/includes/cbase/allocator_protocol/c_heap_allocator.h +554 -0
  66. cbase/includes/cbase/allocator_protocol/c_nt_shm_allocator.c +33455 -0
  67. cbase/includes/cbase/allocator_protocol/c_nt_shm_allocator.h +1105 -0
  68. cbase/includes/cbase/allocator_protocol/c_shm_allocator.h +1270 -0
  69. cbase/includes/cbase/allocator_protocol/c_shm_comp.c +4654 -0
  70. cbase/includes/cbase/allocator_protocol/c_shm_comp.h +49 -0
  71. cbase/includes/cbase/backports/pydict.h +55 -0
  72. cbase/includes/cbase/backports/pylong.c +9965 -0
  73. cbase/includes/cbase/backports/pylong.h +79 -0
  74. cbase/includes/cbase/bytemap/c_bytemap.c +52151 -0
  75. cbase/includes/cbase/bytemap/c_bytemap.h +867 -0
  76. cbase/includes/cbase/bytemap/xxh3.h +55 -0
  77. cbase/includes/cbase/bytemap/xxhash.c +42 -0
  78. cbase/includes/cbase/bytemap/xxhash.h +7487 -0
  79. cbase/includes/cbase/config_view.c +7253 -0
  80. cbase/includes/cbase/env.c +11120 -0
  81. cbase/includes/cbase/int128.h +81 -0
  82. cbase/includes/cbase/intern_string/c_intern_string.c +28138 -0
  83. cbase/includes/cbase/intern_string/c_intern_string.h +614 -0
  84. cbase/includes/cbase/nt/pthread_nt_compat.h +102 -0
  85. cbase/includes/cbase/nt/regex_nt_compat.h +133 -0
  86. cbase/includes/cbase/nt/time_sched_nt_compat.h +32 -0
  87. cbase/int128.h +81 -0
  88. cbase/int128.pxd +15 -0
  89. cbase/intern_string/BENCHMARK.md +157 -0
  90. cbase/intern_string/__infra__.pxd +13 -0
  91. cbase/intern_string/__init__.pxd +13 -0
  92. cbase/intern_string/__init__.py +19 -0
  93. cbase/intern_string/c_intern_string.c +28138 -0
  94. cbase/intern_string/c_intern_string.cp315-win_amd64.pyd +0 -0
  95. cbase/intern_string/c_intern_string.h +614 -0
  96. cbase/intern_string/c_intern_string.pxd +121 -0
  97. cbase/intern_string/c_intern_string.pyi +376 -0
  98. cbase/intern_string/c_intern_string.pyx +765 -0
  99. cbase/nt/pthread_nt_compat.h +102 -0
  100. cbase/nt/regex_nt_compat.h +133 -0
  101. cbase/nt/time_sched_nt_compat.h +32 -0
  102. pycybase-0.1.10.dist-info/METADATA +190 -0
  103. pycybase-0.1.10.dist-info/RECORD +105 -0
  104. pycybase-0.1.10.dist-info/WHEEL +5 -0
  105. 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)