Skip to content

Ankus 0.2.36

Choose a tag to compare

@willibrandon willibrandon released this 01 Dec 19:57
29c3cc8

Ankus 0.2.36 generates the last three macros pgrx 0.20.1 generates that had no method in Ankus: GET_STRING_RELOPTION, multi_for_advance_cell and lengthof.

A member that a macro reads through another operand, which pgrx's macros take by name, is now passed by address. GET_STRING_RELOPTION(options, &options->path_offset) reads the string at the offset that member holds, and multi_for_advance_cell(&cell, &state.l1, &state.i1) advances a list cursor, leaving out the state operand the macro reads only members of. An array that a macro measures with its first element takes both types, so lengthof<TArray, TElement>() counts a generated inline array's elements.

Operands passed by address, which a macro dereferences, assigns or reads as a member, now have an overload for every integer width and double, so an int* or short* finds its own method. Dereferenced operands had sbyte*, byte*, long* and ulong*, and assigned ones long*, ulong* and double*. Every earlier method is still generated.

The runtime and compiler packages stay at 10.0.15-ankus.3 and 11.0.0-ankus.3. To update, run dotnet tool update --global Ankus.Tool --version 0.2.36, then ankus upgrade in your solution.