Fix random, erroneous D binding type generation; add missing IDL defaults (#3210)

* 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.

* Fix mangling issue; use updated BindBC-Common API

* Add missing default to setTransform in IDL

* Fix erroneous generation of `uc_int64`

Non-deterministic ordering of hash-maps were the culprit all along!

* Add missing default to overrideInternal IDL & re-generate
This commit is contained in:
IchorDev
2023-12-03 01:19:45 +07:00
committed by GitHub
parent 7af65cbbfc
commit ae4b0cd5a9
3 changed files with 12 additions and 10 deletions

View File

@@ -228,20 +228,20 @@ local function convArray(array)
end
local typeSubs = {
uint32_t = "uint", int32_t = "int",
uint16_t = "ushort", int16_t = "short",
uint64_t = "c_uint64", int64_t = "c_int64",
uint8_t = "ubyte", int8_t = "byte",
uintptr_t = "size_t"
{"uint32_t", "uint"}, {"int32_t", "int"},
{"uint16_t", "ushort"}, {"int16_t", "short"},
{"uint64_t", "c_uint64"}, {"int64_t", "c_int64"},
{"uint8_t", "ubyte"}, {"int8_t", "byte"},
{"uintptr_t", "size_t"}
}
local function convSomeType(arg, isFnArg)
local type = arg.fulltype
if type == "bx::AllocatorI*" or type == "CallbackI*" then
type = "void*"
else
for from, to in pairs(typeSubs) do
if type:find(from) then
type = type:gsub(from, to)
for _, item in ipairs(typeSubs) do
if type:find(item[1]) then
type = type:gsub(item[1], item[2])
break
end
end