---
name: "zt_pack_rune"
section: "3"
platform: "linux"
package: "libzt-doc"
version: "0.3.1-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/zt_pack_rune"
---

# zt\_pack\_rune(3)

pack a character into a variant

## NAME

**zt\_pack\_rune** – pack a character into a variant

## SYNOPSIS

**#include \<zt.h\>**

*zt\_value*\

**zt\_pack\_rune**(*int value*, *const char \*source*);

## DESCRIPTION

**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.

## SEE ALSO

[zt\_pack\_nothing(3)](/zt_pack_nothing/3.md), [zt\_pack\_integer(3)](/zt_pack_integer/3.md), [zt\_pack\_rune(3)](/zt_pack_rune/3.md), [zt\_pack\_integer(3)](/zt_pack_integer/3.md), [zt\_pack\_unsigned(3)](/zt_pack_unsigned/3.md), [zt\_pack\_string(3)](/zt_pack_string/3.md), [zt\_pack\_pointer(3)](/zt_pack_pointer/3.md) [zt\_value(3)](/zt_value/3.md),

## HISTORY

**zt\_pack\_rune** first appeared in libzt 0.1

## AUTHORS

Zygmunt Krynicki ⟨*me@zygoon.pl*⟩
