Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Commit 43bf780

Browse files
committed
Fix order of callback parameters.
1 parent 33846cb commit 43bf780

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

native_objects.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,7 @@ local function process_module_file(file)
12891289
-- convert params to "cb_in" records.
12901290
local params = func_type.params
12911291
local vars = {}
1292+
local idx=1
12921293
for i=1,#params,2 do
12931294
local c_type = params[i]
12941295
local name = params[i + 1]
@@ -1298,7 +1299,8 @@ local function process_module_file(file)
12981299
end
12991300
-- add cb_in to this rec.
13001301
local v_in = cb_in{ c_type, name}
1301-
rec:insert_record(v_in, 1)
1302+
rec:insert_record(v_in, idx)
1303+
idx = idx + 1
13021304
src[#src+1] = c_type .. " ${" .. v_in.name .. "}"
13031305
typedef[#typedef+1] = c_type .. " " .. v_in.name
13041306
vars[#vars+1] = "${" .. v_in.name .. "}"

0 commit comments

Comments
 (0)