fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
258 B15 linesraw
1#include <stddef.h>
2#include <stdint.h>
3
4struct ByteSlice {
5        uint8_t *data;
6        size_t len;
7};
8
9size_t slice_len(struct ByteSlice bs) {
10        return bs.len;
11}
12
13uint8_t slice_elem(struct ByteSlice bs, size_t idx) {
14        return bs.data[idx];
15}