Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何使用 Lua C API 创建一个 lua_CFunction ,它需要堆栈上的单个函数参数?
干杯。
在书里。 在手册中。
// lua function that expects a single number argument int myfunction(lua_State* L) { double argument = lua_tonumber(L, 1); return 0; }