]> git.proxmox.com Git - ceph.git/blame - ceph/src/civetweb/examples/_obsolete/lua/lua_dll.c
import 12.2.13 release
[ceph.git] / ceph / src / civetweb / examples / _obsolete / lua / lua_dll.c
CommitLineData
7c673cae
FG
1#include <stdio.h>
2
3#include "lua.h"
4#include "lauxlib.h"
5
6static int smile(lua_State *L)
7{
8 (void) L; // Unused
9 printf("%s\n", ":-)");
10 return 0;
11}
12
13int LUA_API luaopen_lua_dll(lua_State *L)
14{
15 static const struct luaL_Reg api[] = {
16 {"smile", smile},
17 {NULL, NULL},
18 };
19 luaL_openlib(L, "lua_dll", api, 0);
20 return 1;
21}