From c8e753d2da4cc4f0d198cc2594ddb15f31dd098a Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Mon, 25 Nov 2013 00:18:43 +0100 Subject: [PATCH] Moved address parameter to last place This way, it is the last item on the evaluation stack before calling the unmanaged function pointer. This simplifies the calli rewrite procedure. --- Source/Bind/CSharpSpecWriter.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Bind/CSharpSpecWriter.cs b/Source/Bind/CSharpSpecWriter.cs index 97020dcc..03753436 100644 --- a/Source/Bind/CSharpSpecWriter.cs +++ b/Source/Bind/CSharpSpecWriter.cs @@ -1149,14 +1149,15 @@ namespace Bind } sb.Append(">"); } - sb.AppendFormat("(EntryPoints[{0}]", d.Slot); + sb.Append("("); var parameter_string = GetInvocationString(d.Parameters, respect_wrappers); if (!String.IsNullOrEmpty(parameter_string)) { - sb.Append(", "); sb.Append(parameter_string); + sb.Append(", "); } + sb.AppendFormat("EntryPoints[{0}]", d.Slot); sb.Append(")"); return sb.ToString();