Skip to content

Normalize the canonical spelling of recovered 64-bit typedefs#58

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/normalize-cell-id-typedef-spelling
Jul 16, 2026
Merged

Normalize the canonical spelling of recovered 64-bit typedefs#58
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/normalize-cell-id-typedef-spelling

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

When a fixed-width integer typedef (H3Index from libh3, or the int64/uint64 family) reaches libclang already resolved to its platform builtin spelling (uint64_tunsigned long on LP64), typerecover rewrites the c-type to the typedef but leaves the canonical field at the platform spelling. The same underlying type then spells inconsistently across the catalog — e.g. the Tcell<T> cell-id accessors th3index_start_value (H3Index) and tquadbin_start_value (Quadbin) carry canonical unsigned long vs uint64_t, though both are uint64 cell ids and must be identical.

Normalizes the canonical field to the recovered typedef spelling via a platform-alias set, so identical underlying types are spelled identically (90 unsigned longuint64_t and 3 longint64_t canonical flips on the current catalog; no other slots change). Guarded by tests/test_typerecover.py::test_cell_id_canonical_normalized_uniform.

When a fixed-width integer typedef (H3Index from libh3, or the int64/uint64 family) reaches libclang already resolved to its platform builtin spelling (uint64_t -> "unsigned long" on LP64), typerecover rewrites the c-type to the typedef but leaves the canonical field at the platform spelling. The same underlying type then spells inconsistently across the catalog -- e.g. the Tcell<T> cell-id accessors th3index_start_value (H3Index) and tquadbin_start_value (Quadbin) read "unsigned long" and "uint64_t" respectively, though both are uint64 cell ids.

Normalize the canonical field to the recovered typedef spelling via a platform-alias set, so identical underlying types are spelled identically.
@estebanzimanyi
estebanzimanyi merged commit 3f1c733 into MobilityDB:master Jul 16, 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