Skip to content

Sword 0.2.3 — Fold

Choose a tag to compare

@PedroTessaro PedroTessaro released this 20 Oct 20:34
· 279 commits to main since this release
066a640

2026-10-20. A hotfix to Fold for programs that talk to C: strings cross
between the two without each program writing its own conversion.

Standard library

  • strings.FromC reads a C string up to its zero, and strings.FromCMax
    also stops at a limit, for a char[N] field the text fills. Both answer with
    a view of the C memory and copy nothing.
  • strings.ToC writes a string and its zero into a buffer of the caller's
    for a C function that wants a const char *, and refuses a string holding a
    zero, which C would read as a different, shorter one.

Nothing that compiled before stops compiling.