cpp2ffi: add skipped table for functions not wrapped but not manually created

This commit is contained in:
Victor Bombi
2020-10-09 16:43:01 +02:00
parent a3ad64dbfa
commit e35d99e432

View File

@@ -724,6 +724,9 @@ local function parseFunction(self,stname,itt,namespace,locat)
if self.get_manuals(defT) then
defT.manual = true
end
if self.get_skipped(defT) then
defT.skipped = true
end
if ret then
defT.ret = clean_spaces(ret:gsub("&","*"))
defT.retref = ret:match("&")
@@ -928,6 +931,7 @@ function M.Parser()
par.typedefs_dict = {}
par.cname_overloads = {}
par.manuals = {}
par.skipped = {}
par.UDTs = {}
function par:insert(line,loca)
@@ -946,6 +950,9 @@ function M.Parser()
function par.get_manuals(def)
return par.manuals[def.ov_cimguiname] or par.manuals[def.cimguiname]
end
function par.get_skipped(def)
return par.skipped[def.ov_cimguiname] or par.skipped[def.cimguiname]
end
function par:take_lines(cmd_line,names,compiler)
local pipe,err = io.popen(cmd_line,"r")
if not pipe then
@@ -1792,7 +1799,7 @@ local function func_implementation(FP)
local def = cimf[t.signature]
assert(def)
local manual = FP.get_manuals(def)
if not manual and not def.templated then
if not manual and not def.templated and not FP.get_skipped(def) then
if def.constructor then
assert(def.stname ~= "","constructor without struct")
local empty = def.args:match("^%(%)") --no args
@@ -1859,7 +1866,7 @@ local function func_header_generate_funcs(FP)
local def = cimf[t.signature]
assert(def,t.signature..t.cimguiname)
local manual = FP.get_manuals(def)
if not manual and not def.templated then
if not manual and not def.templated and not FP.get_skipped(def) then
local addcoment = "" --def.comment or ""
local empty = def.args:match("^%(%)") --no args