Skip to content

Commit f9f5ab9

Browse files
committed
Revert "tests: Update run-make/issue-25581 to reflect how fat pointers are passed."
This reverts commit b12dcde.
1 parent 89e4373 commit f9f5ab9

File tree

1 file changed

+9
-4
lines changed
  • src/test/run-make/issue-25581

1 file changed

+9
-4
lines changed

src/test/run-make/issue-25581/test.c

+9-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
#include <stddef.h>
33
#include <stdint.h>
44

5-
size_t slice_len(uint8_t *data, size_t len) {
6-
return len;
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;
712
}
813

9-
uint8_t slice_elem(uint8_t *data, size_t len, size_t idx) {
10-
return data[idx];
14+
uint8_t slice_elem(struct ByteSlice bs, size_t idx) {
15+
return bs.data[idx];
1116
}

0 commit comments

Comments
 (0)