X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=libextl%2Flibextl-mkexports.in;h=a23ab1fbc3d14cba6f35ba7e8d14a09b0b0ed538;hp=14674ba892bf6edbadcb6eca4cb503858ca106a2;hb=e3aec18706513a87eaa7839dfdaf7e0fcd0d8d2a;hpb=831140ef97f8ad74f97b65346da5c3b70924311b diff --git a/libextl/libextl-mkexports.in b/libextl/libextl-mkexports.in index 14674ba..a23ab1f 100644 --- a/libextl/libextl-mkexports.in +++ b/libextl/libextl-mkexports.in @@ -18,16 +18,16 @@ -- Helper functions {{{ -function errorf(...) - error(string.format(...), 2) +function errorf(fmt, ...) + error(string.format(fmt, unpack(arg)), 2) end function matcherr(s) error(string.format("Parse error in \"%s...\"", string.sub(s, 1, 50)), 2) end -function fprintf(h, ...) - h:write(string.format(...)) +function fprintf(h, fmt, ...) + h:write(string.format(fmt, unpack(arg))) end function trim(str) @@ -208,7 +208,7 @@ function parse(d) end param=trim(param) if string.len(param)>0 then - for p in string.gmatch(param .. ",", "([^,]*),") do + for p in string.gfind(param .. ",", "([^,]*),") do local spec, objtype, varname=parse_type(p) idesc=idesc .. spec table.insert(itypes, objtype)