lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I am new to Embedding Lua to my C App.
I understand that you can Embed your Functions you coded in Pure C by:
luaL_reg(lua_State, "the character name of the function exposed to lua", the
function in C)
But, how can you Glue Variables like that?
So I can put my config in Lua.
And link it easily to:
struct config {
  int keyUp;
  int keyLeft;
  int keyRight;
  int keyDown;

  int volumeEffect;
  int volumeMusic;

  char playerName[9];
} *cfg;


View this message in context:
Sent from the Lua - General mailing list archive at