We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e177207 commit b12dcdeCopy full SHA for b12dcde
src/test/run-make/issue-25581/test.c
@@ -2,15 +2,10 @@
2
#include <stddef.h>
3
#include <stdint.h>
4
5
-struct ByteSlice {
6
- uint8_t *data;
7
- size_t len;
8
-};
9
-
10
-size_t slice_len(struct ByteSlice bs) {
11
- return bs.len;
+size_t slice_len(uint8_t *data, size_t len) {
+ return len;
12
}
13
14
-uint8_t slice_elem(struct ByteSlice bs, size_t idx) {
15
- return bs.data[idx];
+uint8_t slice_elem(uint8_t *data, size_t len, size_t idx) {
+ return data[idx];
16
0 commit comments