https://github.com/ysoftware/luaexample
https://github.com/ysoftware/luaexample
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ysoftware/luaexample
- Owner: ysoftware
- Created: 2025-02-23T10:34:55.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-02-23T11:28:52.000Z (3 months ago)
- Last Synced: 2025-02-23T11:29:03.351Z (3 months ago)
- Language: C
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Lua from C.
- Initialize Lua (with a custom allocator).
- Set up the stack and call a Lua function with arguments from C.
- Provide a C procedure to be called from Lua.
- Print out the return value of the function.```console
$ make && ./main
clang main.c -Ilua-5.4.7/src lua-5.4.7/src/liblua.a -lm -o main
Adding: 25 24 20
Result of add is 69.
```