mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 01:30:22 +00:00
14 lines
196 B
Perl
14 lines
196 B
Perl
C = terralib.includecstring [[
|
|
struct A {
|
|
int a;
|
|
};
|
|
static struct A foo;
|
|
struct A * getfoo() {
|
|
foo.a = 4;
|
|
return &foo;
|
|
}
|
|
]]
|
|
|
|
assert(C.getfoo().a == 4)
|
|
|