IDL: Cleanup.

This commit is contained in:
Бранимир Караџић 2019-07-04 16:07:18 -07:00
parent 4127cc3ab1
commit 7184da2050

View File

@ -15,7 +15,7 @@ using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security; using System.Security;
internal struct NativeFunctions internal struct bgfx
{ {
$types $types
@ -268,7 +268,7 @@ function converter.types(typ)
end end
function converter.funcs(func) function converter.funcs(func)
yield("[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]") yield("[DllImport(DllName, EntryPoint=\"bgfx_" .. func.cname .. "\", CallingConvention = CallingConvention.Cdecl)]")
if func.ret.cpptype == "bool" then if func.ret.cpptype == "bool" then
yield("[return: MarshalAs(UnmanagedType.I1)]") yield("[return: MarshalAs(UnmanagedType.I1)]")
@ -287,7 +287,7 @@ function converter.funcs(func)
first = ", " first = ", "
end end
yield("internal static extern unsafe " .. convert_ret_type(func.ret) .. " bgfx_" .. func.cname .. args .. ");") yield("internal static extern unsafe " .. convert_ret_type(func.ret) .. " " .. func.cname .. args .. ");")
end end
print(gen()) print(gen())