zt_pack_rune3
Pack a character into a variant
Usage
#include <zt.h>
zt_value
zt_pack_rune(int value, const char *source);
Overview
zt_pack_rune packs a rune, as well as the string describing the expression evaluated to obtain it, into a variant-like zt_value. The source argument is retained by the value and is typically a constant string literal produced by the preprocessor.
Runes are generalized characters. Unlike char, they are never negative and can be though of as Unicode code points.
Implementation notes
zt_pack_rune() compensates for signed negative characters by masking them with 0xFF.
Return values
The packed value.
Releases
Unchanged in 3 releases since Debian 11 (Bullseye).