mirror of
https://github.com/cimgui/cimgui.git
synced 2026-03-21 05:21:18 +00:00
Compare commits
2 Commits
a890b9f594
...
99f8065703
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99f8065703 | ||
|
|
b801b08eee |
@@ -76,6 +76,25 @@ function M.prtable(...)
|
||||
print("\n")
|
||||
end
|
||||
end
|
||||
local function deepcopy(object)
|
||||
local lookup_table = {}
|
||||
local function _copy(object)
|
||||
--assert(object~=REST)
|
||||
if type(object) ~= "table" then
|
||||
return object
|
||||
elseif lookup_table[object] then
|
||||
return lookup_table[object]
|
||||
end
|
||||
local new_table = {}
|
||||
lookup_table[object] = new_table
|
||||
for index, value in pairs(object) do
|
||||
new_table[_copy(index)] = _copy(value)
|
||||
end
|
||||
return setmetatable(new_table, getmetatable(object))
|
||||
end
|
||||
return _copy(object)
|
||||
end
|
||||
M.deepcopy = deepcopy
|
||||
local function str_split(str, pat)
|
||||
local t = {}
|
||||
local fpat = "(.-)" .. pat
|
||||
@@ -2046,7 +2065,10 @@ function M.Parser()
|
||||
print("--skip enum forward declaration:",it2)
|
||||
it2 = ""
|
||||
end
|
||||
if it2:match"=%s*ImVec" then
|
||||
--only vardef assign with number
|
||||
local assig = it2:match("static const [^=]*=([^;]*);")
|
||||
--print("it2",it2,"assig",assig,tonumber(assig))
|
||||
if assig and not tonumber(assig) then
|
||||
print("--skip = vardef declaration:",it2)
|
||||
it2 = ""
|
||||
end
|
||||
@@ -3025,7 +3047,7 @@ local function func_implementation(FP)
|
||||
assert(def)
|
||||
local custom
|
||||
if FP.custom_implementation then
|
||||
custom = FP.custom_implementation(outtab, def)
|
||||
custom = FP.custom_implementation(outtab, def, FP)
|
||||
end
|
||||
local manual = FP.get_manuals(def)
|
||||
if not custom and not manual and not def.templated and not FP.get_skipped(def) then
|
||||
|
||||
Reference in New Issue
Block a user