1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-06-05 10:02:39 +03:00
libhttp/examples/lua/lua_dll.c
Thomas Davis b745f22107 Normallized coding style in a predictable way.
Uses astyle program which is freely avaiable on all platforms.
2013-10-07 14:22:22 -04:00

22 lines
359 B
C

#include <stdio.h>
#include "lua.h"
#include "lauxlib.h"
static int smile(lua_State *L)
{
(void) L; // Unused
printf("%s\n", ":-)");
return 0;
}
int LUA_API luaopen_lua_dll(lua_State *L)
{
static const struct luaL_Reg api[] = {
{"smile", smile},
{NULL, NULL},
};
luaL_openlib(L, "lua_dll", api, 0);
return 1;
}