fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

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