Fix cdef size_t size on Win64 (LLP64), require 64-bit builds
The generated cdef typedef'd size_t as unsigned long: 8 bytes on LP64 but only 4 on 64-bit Windows, where C's size_t is 8. cffi's import-time struct layout verification then failed (aegis_raf_scratch.len: cdef says 4, C compiler says 8). cffi pre-defines size_t/uint8_t with the correct platform sizes, so don't typedef them. Also hard-fail 32-bit build attempts in setup.py; 32-bit platforms are no longer supported.
This commit is contained in:
1 parent
c3c4d66ea8
commit
9583a1f9a8
3 files changed
+8
-6
No files matched your search
@@ -9,6 +9,11 @@ from setuptools import setup
|
||||
|
||||
ROOT = Path(__file__).parent.resolve()
|
||||
|
||||
if sys.maxsize <= 2**32:
|
||||
raise RuntimeError(
|
||||
"aeg does not support 32-bit platforms; build with a 64-bit Python"
|
||||
)
|
||||
|
||||
libaegis_static = ROOT / "libaegis/zig-out/lib" / (
|
||||
"aegis.lib" if sys.platform == "win32" else "libaegis.a"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user