FnPtr changes to FnretvalPtr to allow 2 overloadings with different FnPtr, corrected checking equal ov_cimguiname

This commit is contained in:
Victor Bombi
2020-05-30 15:18:38 +02:00
parent f30441fd5d
commit 16846a206b

View File

@@ -392,8 +392,10 @@ local function name_overloadsAlgo(v)
return aa,bb return aa,bb
end end
local function typetoStr(typ) local function typetoStr(typ)
--print("typetoStr",typ)
--typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","%1") -- funcs --typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","%1") -- funcs
typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","FnPtr") --typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","FnPtr")
typ = typ:gsub("([^%(%)]+)%(%*?(.+)%).+","Fn%1Ptr")
typ = typ:gsub("[%w_]+%[(%d*)%]","arr%1") typ = typ:gsub("[%w_]+%[(%d*)%]","arr%1")
typ = typ:gsub("%*","Ptr") typ = typ:gsub("%*","Ptr")
typ = typ:gsub("void","") typ = typ:gsub("void","")
@@ -1199,7 +1201,7 @@ function M.Parser()
end end
--check not two names are equal (produced by bad cimguiname_overload) --check not two names are equal (produced by bad cimguiname_overload)
for i=1,#v-1 do for i=1,#v-1 do
for j=i+1,#v-1 do for j=i+1,#v do
if v[i].ov_cimguiname == v[j].ov_cimguiname then if v[i].ov_cimguiname == v[j].ov_cimguiname then
local t,tj = v[i],v[j] local t,tj = v[i],v[j]
print("Error caused by Bad overloading "..t.ov_cimguiname.." of function ",t.funcname,t.signature,"conflicts with ",tj.funcname,tj.signature) print("Error caused by Bad overloading "..t.ov_cimguiname.." of function ",t.funcname,t.signature,"conflicts with ",tj.funcname,tj.signature)