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.
18 lines
453 B
Lua
18 lines
453 B
Lua
local base = string.match(..., "(.-)[^%.]+%.[^%.]+$")
|
|
local ffi = require("ffi")
|
|
local fh = require(base.."helper.ffi_struct")
|
|
|
|
local format = string.format
|
|
|
|
local mt, index = {}, {}
|
|
|
|
fh.gen_raw_accessor(index, "length")
|
|
fh.gen_raw_accessor(index, "delay")
|
|
|
|
function index:tostring()
|
|
return format("ff_replay{length=%d, delay=%d}", self.length, self.delay)
|
|
end
|
|
mt.__tostring = index.tostring
|
|
|
|
return fh.base(mt, index, ffi.typeof("struct ff_replay"))
|