mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-02 23:21:05 +00:00
* CppSpecWriter.cs: Fixed handling of return types in wrappers.
Removed [OutAttribute] from the header.
This commit is contained in:
parent
a5924bb414
commit
828f0c0a8b
|
@ -207,7 +207,9 @@ namespace Bind
|
||||||
if (d != last_delegate)
|
if (d != last_delegate)
|
||||||
{
|
{
|
||||||
last_delegate = d;
|
last_delegate = d;
|
||||||
var parameters = d.Parameters.ToString().Replace(".", "::");
|
var parameters = d.Parameters.ToString()
|
||||||
|
.Replace(".", "::")
|
||||||
|
.Replace("[OutAttribute]", String.Empty);
|
||||||
sw.WriteLine("typedef {0} (*p{1}){2};", d.ReturnType, d.Name, parameters);
|
sw.WriteLine("typedef {0} (*p{1}){2};", d.ReturnType, d.Name, parameters);
|
||||||
sw.WriteLine("static p{0} {0};", d.Name);
|
sw.WriteLine("static p{0} {0};", d.Name);
|
||||||
}
|
}
|
||||||
|
@ -271,7 +273,9 @@ namespace Bind
|
||||||
continue;
|
continue;
|
||||||
last_delegate = f.WrappedDelegate;
|
last_delegate = f.WrappedDelegate;
|
||||||
|
|
||||||
var parameters = f.WrappedDelegate.Parameters.ToString().Replace(".", "::");
|
var parameters = f.WrappedDelegate.Parameters.ToString()
|
||||||
|
.Replace(".", "::")
|
||||||
|
.Replace("[OutAttribute]", String.Empty);
|
||||||
sw.WriteLine("static inline {0} {1}{2}", f.WrappedDelegate.ReturnType,
|
sw.WriteLine("static inline {0} {1}{2}", f.WrappedDelegate.ReturnType,
|
||||||
f.TrimmedName, parameters);
|
f.TrimmedName, parameters);
|
||||||
sw.WriteLine("{");
|
sw.WriteLine("{");
|
||||||
|
@ -299,10 +303,10 @@ namespace Bind
|
||||||
|
|
||||||
static void WriteMethodBody(BindStreamWriter sw, Function f)
|
static void WriteMethodBody(BindStreamWriter sw, Function f)
|
||||||
{
|
{
|
||||||
if (f.ReturnType != null)
|
if (f.ReturnType != null && !f.ReturnType.ToString().ToLower().Contains("void"))
|
||||||
sw.WriteLine("return Delegates::{0}{1}", f.WrappedDelegate.Name, f.CallString());
|
sw.WriteLine("return Delegates::{0}{1}", f.WrappedDelegate.Name, f.Parameters.CallString());
|
||||||
else
|
else
|
||||||
sw.WriteLine("Delegates::{0}{1}", f.WrappedDelegate.Name, f.CallString());
|
sw.WriteLine("Delegates::{0}{1}", f.WrappedDelegate.Name, f.Parameters.CallString());
|
||||||
}
|
}
|
||||||
|
|
||||||
static DocProcessor processor = new DocProcessor(Path.Combine(Settings.DocPath, Settings.DocFile));
|
static DocProcessor processor = new DocProcessor(Path.Combine(Settings.DocPath, Settings.DocFile));
|
||||||
|
|
Loading…
Reference in a new issue