getCname uses namespace

This commit is contained in:
Victor Bombi
2020-05-16 16:49:08 +02:00
parent da72704aa1
commit 9f99062c6f
2 changed files with 8 additions and 8 deletions

View File

@@ -428,8 +428,8 @@ gdefines = get_defines{"IMGUI_VERSION","FLT_MAX"}
local function parseImGuiHeader(header,names)
--prepare parser
local parser = cpp2ffi.Parser()
parser.getCname = function(stname,funcname)
local pre = (stname == "") and "ig" or stname.."_"
parser.getCname = function(stname,funcname,namespace)
local pre = (stname == "") and (namespace and (namespace=="ImGui" and "ig" or namespace.."_") or "ig") or stname.."_"
return pre..funcname
end
parser.cname_overloads = cimgui_overloads