You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
583 B
Lua

local base = string.match(..., "(.-)[^%.]+%.[^%.]+$")
local ffi = require("ffi")
local fh = require(base.."helper.ffi_struct")
local format = string.format
-- missing from header
ffi.cdef[[
struct inputor_repeat_settings
{
int delay, period;
};
]]
local mt, index = {}, {}
fh.gen_raw_accessor(index, "delay")
fh.gen_raw_accessor(index, "period")
function index:tostring()
return format("repeat_settings{delay=%d, period=%d}",
self.delay, self.period)
end
mt.__tostring = index.tostring
return fh.base(mt, index, ffi.typeof("struct inputor_repeat_settings"))