From 8d37665b2e59491c37f563f4c10d0b907cbcf4bb Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Wed, 22 Jul 2026 12:39:20 +0200 Subject: [PATCH] Parse the MEOS headers with NDEBUG defined The catalog described eight assert-only catalog predicates (meos_basetype, alphanum_basetype, alphanum_temptype, set_basetype, talphanum_type, temporal_basetype, temptype_subtype, temptype_subtype_all) that no released libmeos exports: their declarations and definitions both sit behind "#ifndef NDEBUG", and the shipped library is a Release build. Bindings projected them into their FFI surface, where a call fails only at run time with an unresolved symbol. Define NDEBUG for the parse so the catalog describes the library bindings link against. Function count 4250 -> 4242 against MobilityDB e6d3cb410, the eight predicates being the whole difference. --- parser/parser.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/parser/parser.py b/parser/parser.py index 2fbb59d..67c1def 100644 --- a/parser/parser.py +++ b/parser/parser.py @@ -122,6 +122,14 @@ def parse_meos(entry: Path, include_dir: Path) -> dict: # it, and an undefined ``UNUSED`` makes clang error on the declarator and # silently drop the remaining parameters of that prototype. "-DUNUSED=__attribute__((unused))", + # The released libmeos is a Release build, where ``NDEBUG`` compiles out + # the assert-only catalog predicates (``meos_basetype``, + # ``temptype_subtype``, …): their declarations sit behind ``#ifndef + # NDEBUG`` and the shipped library exports no such symbol. Parsing with + # ``NDEBUG`` defined keeps the catalog a description of the library + # bindings actually link against, so no binding declares a symbol that + # resolves only in a debug build. + "-DNDEBUG", *(f"-D{family}=1" for family in _ALL_FAMILIES), ] + _clang_extra_args(), # Record ``#define`` macro definitions as cursors so the public