Scan pgtypes for @ingroup and skip preprocessor lines in the fndef#63
Merged
estebanzimanyi merged 1 commit intoJul 16, 2026
Conversation
The exported base-type functions (text_out, date_in, timestamp_cmp_internal, …) live in the vendored pgtypes/ tree at the repo root, not under meos/src, and carry @InGroup meos_base_* there. Scan pgtypes/ alongside meos/src so the catalog picks up the base surface too: _name_to_group now accepts several source roots and run.py passes both. Make _FNDEF robust to the layouts those base sources use. A doxygen block and the function it labels can be separated by a #if MEOS guard, a multi-line comment, and blank lines (cstring_to_text is all three), and some sources ship CRLF. The fndef scanner now skips any run of blank / preprocessor / comment lines before the return-type line, and tolerates carriage returns. The meos/src group map is unchanged (verified: identical assignments across 3419 groups).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Teaches the
@ingrouppass to see the vendored base-type sources and to cope with the way those sources lay out a function under its doxygen block.Why
The base-type functions the MEOS umbrella headers export —
text_out,date_in,timestamp_cmp_internal, and the rest — live in the vendoredpgtypes/tree at the repo root, not undermeos/src, and they already carry@ingroup meos_base_*there.doxygroup.pyonly globsmeos/src/**/*.c, so those groups never reach the catalog and the base surface looks group-less. This is the signal a binding needs to place the base functions in the reference-manual structure and to derive their public/internal status from the tag.Changes
_name_to_groupaccepts several source roots;run.pypasses bothmeos/srcandpgtypes/._FNDEFskips any run of blank / preprocessor / comment lines between the doxygen close and the return-type line, and tolerates carriage returns. A base source separates the doxygen block from the function by a#if MEOSguard, a multi-line comment, and blank lines —cstring_to_textshows all three together — and some sources use CRLF endings; the old one-optional-line pattern mis-binds those.Equivalence
The
meos/srcgroup map stays byte-identical: the same assignments across 3419 groups (a diff of the produced name->group map shows no change). The pgtypes scan adds the base groups on top (meos_base_*,meos_json_base_*).Tests
New
tests/test_doxygroup.pycovers the plain case, the#if MEOS-guarded twin with a multi-line comment, a blank line before the return type, CRLF sources, the multi-root scan, and a missing root. The pre-existingtest_struct_layout/test_object_modelfailures are unrelated: they read FFI struct offsets from a catalog theprovision-meosaction builds, and this change only writes thegroupfield, which those tests never read.