This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function printf(s, ...) | |
io.write(s:format(...)) | |
end | |
local ffi = require("ffi") | |
ffi.cdef[[ | |
typedef void (*cb)(void); | |
void set_v(int n, void (*)(void )); | |
void set_i(int n, void (*)(int )); | |
void set_d(int n, void (*)(double)); |