mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
17 lines
209 B
Perl
17 lines
209 B
Perl
local C = terralib.includecstring [[
|
|
typedef struct {
|
|
int a;
|
|
int b;
|
|
} Foo;
|
|
]]
|
|
for i,e in ipairs(C.Foo.entries) do
|
|
print(e.field,e.type)
|
|
end
|
|
|
|
terra useFoo()
|
|
var f : C.Foo
|
|
f.a = 1
|
|
f.b = 2
|
|
end
|
|
|
|
useFoo() |