IDL: Cleanup.
This commit is contained in:
parent
4127cc3ab1
commit
7184da2050
@ -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())
|
||||||
|
Loading…
Reference in New Issue
Block a user