Root/lua/examples/lua_calls_C1/fromlua.c

1#include "lua.h"
2#include "lualib.h"
3#include "lauxlib.h"
4#include <stdio.h>
5
6static int myCfunc ( lua_State *L) {
7  printf ("lua SIE's Test\n");
8  return 0; }
9
10int luaopen_fromlua ( lua_State *L) {
11  static const luaL_reg Map [] = {
12    {"dothis", myCfunc},
13    {NULL,NULL} } ;
14  luaL_register(L, "cstuff", Map);
15  return 1; }
16

Archive Download this file

Branches:
master



interactive