Culled D bindings for header-only C++ functions (#3130)

* Reformatted comments; fixed a couple of oversights

* D bindings: deterministic sub-struct order

* Added missing default to IDL

* Fixed sub-struct linkage; regenerate D binds

* Culled D bindings for header-only C++ functions

* Added missing default to bgfx.idl

* cppinline now supported by all auto-gen bindings

The pattern "func.cppinline and not func.conly" is to make sure that C bindings for `bgfx_vertex_layout_has` are still generated.
This commit is contained in:
IchorDev
2023-07-20 10:53:42 +07:00
committed by GitHub
parent faf69bbe20
commit 878767e751
8 changed files with 16 additions and 34 deletions

View File

@@ -334,7 +334,7 @@ local function genVersion()
end
local function genStructMemberFn(func) --NOTE: this does not work on nested structs
if func.class ~= nil and func.conly == nil then
if func.class ~= nil and func.conly == nil and func.cppinline == nil then
local st = allStructs[func.class]
local attribs = ""
if func.comments ~= nil then
@@ -804,7 +804,7 @@ extern(C++, "bgfx") package final abstract class %s{
end
function converter.funcs(func)
if func.class == nil and func.conly == nil then
if func.class == nil and func.conly == nil and func.cppinline == nil then
local extern = "C++, \"bgfx\""
local attribs = ""
if func.cfunc ~= nil and func.name ~= "init" then --what the is "cfunc" even meant to mean?