Skip to content

Extract public #define integer macros into the catalog#46

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/extract-define-macros
Jul 10, 2026
Merged

Extract public #define integer macros into the catalog#46
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/extract-define-macros

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A set of MEOS public integer constants are object-like #define macros rather than enum values — the WKB / WKT output-variant flags (WKB_NDR, WKB_EXTENDED, WKB_XDR, …), the MEOS_FLAG_* bit masks, and similar. An enum walk never sees them, so a binding derived purely from the catalog cannot carry them, yet a binding's FFI needs them (meos-rs selects a WKB variant with WKB_EXTENDED / WKB_NDR / WKB_XDR).

The amalgamation is parsed with the detailed preprocessing record so #define definitions surface as cursors. Each public object-like integer macro is recorded under a new catalog macros[] array with its name, value, file, and family. Function-like macros and expression / string macros are skipped.

The installed public headers yield 36 macros; function, struct, and enum extraction are unchanged. A regression test covers the WKB variant flags, the integer-value invariant, and the object-like-only filter.

The MEOS public headers expose a set of integer constants as object-like
#define macros rather than enum values — the WKB / WKT output-variant flags
(WKB_NDR, WKB_EXTENDED, WKB_XDR …), the MEOS_FLAG_* bit masks, and similar.
An enum walk never sees them, so a binding derived purely from the catalog
cannot carry them, yet a binding's FFI needs them (meos-rs selects a WKB
variant with WKB_EXTENDED / WKB_NDR / WKB_XDR).

Parse the amalgamation with the detailed preprocessing record so #define
definitions surface as cursors, and record each public object-like integer
macro under a new catalog macros[] array (name, value, file, family).
Function-like and expression / string macros are skipped.
@estebanzimanyi estebanzimanyi merged commit b3ce66b into MobilityDB:master Jul 10, 2026
2 checks passed
@estebanzimanyi estebanzimanyi deleted the feat/extract-define-macros branch July 10, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant