summaryrefslogtreecommitdiffstats
path: root/waftools/fragments/lua.c
blob: 43d678b476bb1c1700fa8076e1d33d083189b98d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdlib.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>

// filled on the python side with .format()
{additional_lua_test_header}

void test_lua(void) {{
    lua_State *L = luaL_newstate();
    lua_pushstring(L, "test");
    lua_setglobal(L, "test");
}}

void test_other(void) {{
    // filled on the python side with .format()
    {additional_lua_test_code}
}}

int main(void) {{
    test_lua();
    test_other();
    return 0;
}}