mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-14 21:48:30 +01:00
cpp2ffi: changes for name prefixing the const char* versions of ImStr
This commit is contained in:
@@ -813,7 +813,7 @@ local function ADDIMSTR_S(FP)
|
|||||||
if #defT.argsT > 0 then
|
if #defT.argsT > 0 then
|
||||||
caar = "("
|
caar = "("
|
||||||
for i,v in ipairs(defT.argsT) do
|
for i,v in ipairs(defT.argsT) do
|
||||||
local name = v.type == "ImStr" and "ImStr("..v.name..")" or v.name
|
local name = v.name --v.type == "ImStr" and "ImStr("..v.name..")" or v.name --wrap
|
||||||
if v.ret then --function pointer
|
if v.ret then --function pointer
|
||||||
caar = caar .. name .. ","
|
caar = caar .. name .. ","
|
||||||
else
|
else
|
||||||
@@ -825,10 +825,10 @@ local function ADDIMSTR_S(FP)
|
|||||||
else
|
else
|
||||||
caar = "()"
|
caar = "()"
|
||||||
end
|
end
|
||||||
defT2.call_args = caar:gsub("ImStr%(([^%(%)]+)%)","%1")
|
defT2.call_args = caar --:gsub("ImStr%(([^%(%)]+)%)","%1") --unwrap
|
||||||
------------------
|
------------------
|
||||||
defT2.signature = defT.signature:gsub("ImStr","const char*") --.."_S"
|
defT2.signature = defT.signature:gsub("ImStr","const char*") --.."_S"
|
||||||
--defT2.ov_cimguiname = (defT2.ov_cimguiname or defT2.cimguiname).."_S"
|
defT2.ov_cimguiname = "S"..defT2.ov_cimguiname
|
||||||
defT2.isIMSTR_S = 1
|
defT2.isIMSTR_S = 1
|
||||||
-- check there is not an equal version in imgui_stname
|
-- check there is not an equal version in imgui_stname
|
||||||
local doadd = true
|
local doadd = true
|
||||||
@@ -1573,7 +1573,7 @@ function M.Parser()
|
|||||||
for k,v in pairs(self.alltypes) do print(k, typetoStr(k) ) end
|
for k,v in pairs(self.alltypes) do print(k, typetoStr(k) ) end
|
||||||
end
|
end
|
||||||
function par:compute_overloads()
|
function par:compute_overloads()
|
||||||
ADDIMSTR_S(self)
|
--ADDIMSTR_S(self)
|
||||||
local strt = {}
|
local strt = {}
|
||||||
local numoverloaded = 0
|
local numoverloaded = 0
|
||||||
self.alltypes = {}
|
self.alltypes = {}
|
||||||
@@ -1617,7 +1617,7 @@ function M.Parser()
|
|||||||
end)
|
end)
|
||||||
--print(numoverloaded, "overloaded")
|
--print(numoverloaded, "overloaded")
|
||||||
table.insert(strt,string.format("%d overloaded",numoverloaded))
|
table.insert(strt,string.format("%d overloaded",numoverloaded))
|
||||||
--ADDIMSTR_S(self)
|
ADDIMSTR_S(self)
|
||||||
AdjustArguments(self)
|
AdjustArguments(self)
|
||||||
ADDnonUDT(self)
|
ADDnonUDT(self)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user