From 416b4f017b2176eff769d13a820110d401e67205 Mon Sep 17 00:00:00 2001 From: Victor Bombi Date: Fri, 25 Sep 2020 15:46:33 +0200 Subject: [PATCH] cpp2ffi: get correct line number when compiler outputs defines (gcc -dD) --- generator/cpp2ffi.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/generator/cpp2ffi.lua b/generator/cpp2ffi.lua index 29f5e67..300ce2e 100644 --- a/generator/cpp2ffi.lua +++ b/generator/cpp2ffi.lua @@ -1654,6 +1654,7 @@ local function location(file,locpathT,defines,COMPILER) end end elseif in_location then + loc_num_incr = loc_num_incr + 1 local name,val = line:match(define_re) if name and val then --while defines[val] do val = defines[val] end