mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Revert "tests: Update run-make/issue-25581 to reflect how fat pointers are passed."
This reverts commit b12dcdef4f
.
This commit is contained in:
parent
89e437354a
commit
f9f5ab98b0
@ -2,10 +2,15 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
size_t slice_len(uint8_t *data, size_t len) {
|
||||
return len;
|
||||
struct ByteSlice {
|
||||
uint8_t *data;
|
||||
size_t len;
|
||||
};
|
||||
|
||||
size_t slice_len(struct ByteSlice bs) {
|
||||
return bs.len;
|
||||
}
|
||||
|
||||
uint8_t slice_elem(uint8_t *data, size_t len, size_t idx) {
|
||||
return data[idx];
|
||||
uint8_t slice_elem(struct ByteSlice bs, size_t idx) {
|
||||
return bs.data[idx];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user