Questions tagged [lua-api]

Anything related to Lua C Application Programming Interface (Lua C-API).

Lua has been designed to be easily integrated with C applications, thus it provides a rich API to interact with C code, which is called the Lua C-API.

The Lua C-API can be used both for:

  • enabling the Lua engine to communicate with an host application (the application which embeds the engine), and

  • enabling library code for Lua written in C to communicate with the Lua engine that loads the library.

197 questions
-2
votes
1 answer

Count the amount of lua_getfield

Is there any way to count the amount of lua_getfield that exists in my code? If yes how? I have a code with multiple lua_getfield as an example below: lua_getfield(L, -1, "MAC"); lua_getfield(L, -1, "IP"); lua_getfield(L, -1, "PASSWORD"); I want to…
Marcos Silva
  • 53
  • 1
  • 6
-2
votes
1 answer

Using C++ objects in Lua scripts

How I can use C++ objects in lua script? example class: class cMyClass { int a; void myTest(int b){}; } cMyClass MyObject; example using in lua(is what i need): MyObjectLuaName.myTest(7); MyObjectLuaName.a=12; Thanks!
Nataly
  • 15
  • 2
1 2 3
13
14