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 89e4373 commit f9f5ab9Copy full SHA for f9f5ab9
src/test/run-make/issue-25581/test.c
@@ -2,10 +2,15 @@
2
#include <stddef.h>
3
#include <stdint.h>
4
5
-size_t slice_len(uint8_t *data, size_t len) {
6
- return len;
+struct ByteSlice {
+ uint8_t *data;
7
+ size_t len;
8
+};
9
+
10
+size_t slice_len(struct ByteSlice bs) {
11
+ return bs.len;
12
}
13
-uint8_t slice_elem(uint8_t *data, size_t len, size_t idx) {
- return data[idx];
14
+uint8_t slice_elem(struct ByteSlice bs, size_t idx) {
15
+ return bs.data[idx];
16
0 commit comments