Repository navigation
Take a public function's input arrays as Python lists - #33
Merged
estebanzimanyi merged 1 commit intoOct 22, 2026
Merged
Conversation
estebanzimanyi
force-pushed
the
feat/input-arrays-as-lists
branch
from
October 22, 2026 17:46
54f48ae to
0cf1dae
Compare
shape.inputArrays names each array a function reads and the parameter its length comes from. A public function takes each such array as one list (bytes for uint8_t), its length leaves the signature and is the list's own, and arrays sharing one length must agree. Elements convert as a scalar argument of their type does, a pointer element is cast, and a struct element is the struct itself. This replaces the hand modifiers of the set and span set constructors, tsequenceset_make_gaps and the from_wkb functions, and covers the other public array readers, tpointseq_make_coords among them. Internal functions keep the pointer and the count: tsequence_make_free and its siblings free the array they are given, which must be MEOS's own. An arrayReturn length is an output only when MEOS writes it through a pointer. temparr_round, stboxarr_round, cbufferarr_round and posearr_round take it by value as the length of the input array the return matches, and read it from that list.
estebanzimanyi
force-pushed
the
feat/input-arrays-as-lists
branch
from
October 22, 2026 19:15
0cf1dae to
c699196
Compare
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.
The catalog's
shape.inputArraysnames each array a function reads and the parameter its length comes from. A public function takes each such array as one Python list (bytesforuint8_t): the length is not an argument, it is the list's own, and arrays sharing one length must agree in length.span._inner[0]).tsequenceset_make_gaps, the*_from_wkbfunctions andtpointseq_make_coordsamong them. Their hand modifiers are removed.tsequence_make_freeand its siblings free the array they are given, which must be MEOS's own.arrayReturnlength is an output only when MEOS writes it through a pointer;temparr_round,stboxarr_round,cbufferarr_roundandposearr_roundtake it by value and read it from the list.The surface is generated from the catalog of MobilityDB master ff56f3f93f, the MEOS 1.4 line.
Witness: against libmeos built from that commit,
builder/smoke_test.pypasses, and a call per element kind (TInstant *,TSequence *,Temporal *,Span,STBox,text *,TimestampTz,DateADT,double,int,int64,GSERIALIZED *,uint8_t) returns the expected value; parallel arrays of different lengths raiseValueError.