# libc: reimplement swab in Zig \(\#31130\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/fa3228ae42d3bc92ad66fe91e108511583129ffd)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: fa3228ae42d3bc92ad66fe91e108511583129ffd

Requested commit: fa3228ae42d3bc92ad66fe91e108511583129ffd

Commit: fa3228ae42d3bc92ad66fe91e108511583129ffd

Tree: d29d7d2bd80dfc23387850a509a83be906a795f3

Author: Ivel

Committer: Andrew Kelley

## Message

```
libc: reimplement swab in Zig (#31130)

This PR replaces the bundled musl swab() implementation with zig's one.

Contributes towards #30978.

It looks like there are not test cases for swab() in test-libc.

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31130
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: Ivel <ivel.santos@proton.me>
Co-committed-by: Ivel <ivel.santos@proton.me>

```

## Parents

- [c77e7146f5fa8e83c06cd6612b7298df06912974](https://git.cafe/gitcafe/zig/commit/c77e7146f5fa8e83c06cd6612b7298df06912974?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/fa3228ae42d3bc92ad66fe91e108511583129ffd?format=markdown)
