提交 b12dcdef 编写于 作者: E Eduard Burtescu

tests: Update run-make/issue-25581 to reflect how fat pointers are passed.

上级 e177207b
...@@ -2,15 +2,10 @@ ...@@ -2,15 +2,10 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
struct ByteSlice { size_t slice_len(uint8_t *data, size_t len) {
uint8_t *data; return len;
size_t len;
};
size_t slice_len(struct ByteSlice bs) {
return bs.len;
} }
uint8_t slice_elem(struct ByteSlice bs, size_t idx) { uint8_t slice_elem(uint8_t *data, size_t len, size_t idx) {
return bs.data[idx]; return data[idx];
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册