Skip to content

Commit

Permalink
tests: Update run-make/issue-25581 to reflect how fat pointers are pa…
Browse files Browse the repository at this point in the history
…ssed.
  • Loading branch information
eddyb committed Mar 18, 2016
1 parent e177207 commit b12dcde
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/test/run-make/issue-25581/test.c
Expand Up @@ -2,15 +2,10 @@
#include <stddef.h>
#include <stdint.h>

struct ByteSlice {
uint8_t *data;
size_t len;
};

size_t slice_len(struct ByteSlice bs) {
return bs.len;
size_t slice_len(uint8_t *data, size_t len) {
return len;
}

uint8_t slice_elem(struct ByteSlice bs, size_t idx) {
return bs.data[idx];
uint8_t slice_elem(uint8_t *data, size_t len, size_t idx) {
return data[idx];
}

0 comments on commit b12dcde

Please sign in to comment.