Skip to content

Declare the pointer fields of a MEOS struct - #93

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/struct-pointer-fields
Dec 6, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/struct-pointer-fields

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The cdef declares a field of a MEOS struct when its type is a scalar, an
enum or a struct already declared by value, and a pointer field when it
points to a scalar, an enum, void or a struct the cdef has already
declared, as a function's pointer parameter names one. Flexible-array and
function-pointer fields stay behind the struct's "...;".

A point cloud schema is registered from the name, the position and the
interpretation of each dimension (PCDimensionSpec), and
meos_pc_schema_register_dims refuses a dimension with no name, so a caller
needs the name field to register any schema.

Witness: the smoke test registers a schema of three dimensions and reads
the X of a point made on it. Against the cdef master writes, it fails with
"cdata 'PCDimensionSpec' has no field 'name'"; with this change it passes,
and PyMEOS's suite passes on the rebuilt package (5154 tests).

The cdef declares a field of a MEOS struct when its type is a scalar, an
enum or a struct already declared by value, and a pointer field when it
points to a scalar, an enum, void or a struct the cdef has already
declared, as a function's pointer parameter names one. Flexible-array and
function-pointer fields stay behind the struct's "...;".

A point cloud schema is registered from the name, the position and the
interpretation of each dimension (PCDimensionSpec), and
meos_pc_schema_register_dims refuses a dimension with no name, so a caller
needs the name field to register any schema.

Witness: the smoke test registers a schema of three dimensions and reads
the X of a point made on it. Against the cdef master writes, it fails with
"cdata 'PCDimensionSpec' has no field 'name'"; with this change it passes,
and PyMEOS's suite passes on the rebuilt package (5154 tests).
@estebanzimanyi
estebanzimanyi force-pushed the fix/struct-pointer-fields branch from efc764b to 3898421 Compare December 5, 2026 23:43
@estebanzimanyi
estebanzimanyi merged commit 1a08c51 into MobilityDB:master Dec 6, 2026
5 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/struct-pointer-fields branch December 6, 2026 07:23
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