Skip to content

Match one-line MEOS-C definitions when attaching @csqlfn#30

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/sqlfn-oneline-def-attribution
Jul 8, 2026
Merged

Match one-line MEOS-C definitions when attaching @csqlfn#30
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/sqlfn-oneline-def-attribution

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

attach_sqlfn_map links each MEOS-C function to its SQL name by finding the function definition that follows a @csqlfn doxygen block. _FNDEF matched that definition only when the return type sat on its own line (bool\nname(). A one-line definition — bool tpcbox_eq(const TPCBox *box1, ...), the pointcloud predicate style — was not matched, so the tag attached to the next matchable definition instead. Several wrappers then collapsed onto one MEOS function, and the skipped functions were left with no SQL name.

The regex now also accepts an optional same-line return-type prefix (word/space/*) before the name, so both layouts resolve.

Regenerating the catalog against master restores the SQL name of ten functions that were previously dropped from every binding — the tpcbox_eq, tpcbox_ne, tpcbox_lt, tpcbox_le, tpcbox_gt, tpcbox_ge comparison operators, the tpcbox_hasx/tpcbox_hasz/tpcbox_hast accessors, and pcpatch_get_pcid — and changes nothing else (thirteen catalog entries move, all corrections; the test suite is green: 147 passed, 14 skipped).

`_FNDEF` located the MEOS-C definition following a `@csqlfn` doxygen block
only when the return type was on its own line (`bool\nname(`). A one-line
definition (`bool tpcbox_eq(const TPCBox *box1, ...)`, the pointcloud
predicate style) was not matched, so the tag attached to the next matchable
definition instead — collapsing several wrappers onto one MEOS function and
leaving the skipped functions with no SQL name.

Allow an optional same-line return-type prefix before the name. Regenerating
the catalog restores the SQL name of ten functions that were previously
dropped from every binding (the `tpcbox_eq..ge` comparison operators, the
`hasX/hasZ/hasT` accessors and `pcpatch_get_pcid`) with no other change.
@estebanzimanyi estebanzimanyi merged commit 40f4814 into MobilityDB:master Jul 8, 2026
2 checks passed
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