Skip to content

Commit

Permalink
Revert "tests: Update run-make/issue-25581 to reflect how fat pointer…
Browse files Browse the repository at this point in the history
…s are passed."

This reverts commit b12dcde.
  • Loading branch information
eddyb committed Nov 19, 2017
1 parent 89e4373 commit f9f5ab9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/test/run-make/issue-25581/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

0 comments on commit f9f5ab9

Please sign in to comment.