]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/extern-fn-with-extern-types/ctest.c
Auto merge of #100201 - RalfJung:thread-local-key, r=thomcc
[rust.git] / src / test / run-make-fulldeps / extern-fn-with-extern-types / ctest.c
1 #include <stdio.h>
2 #include <stdint.h>
3
4 typedef struct data {
5     uint32_t magic;
6 } data;
7
8 data* data_create(uint32_t magic) {
9     static data d;
10     d.magic = magic;
11     return &d;
12 }
13
14 uint32_t data_get(data* p) {
15     return p->magic;
16 }