File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616_PROTOCOL_DIR = _ROOT / "libqretprop" / "_protocol"
1717
1818ffi = cffi .FFI ()
19- ffi .cdef ((_LIB_DIR / "qlcp_lib_expanded.h" ).read_text ())
19+ ffi .cdef (
20+ (_LIB_DIR / "qlcp_lib_expanded.h" ).read_text ()
21+ + "\n #define QLCP_HEADER_SIZE ..." # Tells cffi to treat this #define as a constant pulled from the header
22+ )
2023ffi .set_source (
2124 "_qlcp" , # flat name — no dots
2225 '#include "qlcp_lib.h"' ,
Original file line number Diff line number Diff line change 1313_MAX_CONFIG = 4096
1414_ENCODE_BUF_SIZE = 4096
1515
16- # HEADER_SIZE cannot be sourced from the C header via cffi since it's a #define
17- # This must be kept in sync with the actual header size in qlcp_lib.h
18- HEADER_SIZE = 9
16+ HEADER_SIZE = _lib .QLCP_HEADER_SIZE
1917
2018# ============================================================================
2119# UTILS
You can’t perform that action at this time.
0 commit comments