Skip to content

INT: token/stream support for reading/writing int32 and int64

Mark OLESEN requested to merge mixed-precision-streams into develop

Previously all integral types would be cast to label for the I/O streams. This meant that it was not possible to use IPstream/OPstream to encode and send an int64_t on an WL_LABEL_SIZE=64 compilation. Similarly, the ASCII output would be truncated as label.

With the reworked integration of the .org changes, the token now has int32/64 (signed/unsigned) variants. The serial tokenizer has been extended to handle large integral types (int64 should normally be enough). If the integral conversion is successful, the tokenizer attempts to narrow to 32-bit representations wherever possible.

The handling within token itself becomes a fair bit uglier again, but is at least isolated.

Merge request reports

Loading