开发者

Calling C function from lua

Can someone tell me is it p开发者_开发技巧ossible to somehow call c function or simply wrap it into a lua function WITHOUT building a new module.


If it works for you, try the FFI library. See also luaffi.


Lua can't call arbitrary C functions - they have to be bound to something in the Lua namespace first. (This is intentional to prevent breaking out of sandboxes in embedded applications.)


Or the Alien library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜