Skip to content

Commit beab9ac

Browse files
committed
Removed the use of out byref for return buffers.
Fixes #196 Contributes to #233
1 parent ea86f8f commit beab9ac

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Biohazrd.CSharp/CSharpLibraryGenerator.Functions.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -358,18 +358,12 @@ void WriteOutReturnBuffer(EmitFunctionContext emitContext)
358358
if (!first)
359359
{ Writer.Write(", "); }
360360

361-
if (!declaration.IsVirtual)
362-
{ Writer.Write("out "); }
363-
else if (mode == EmitParameterListMode.TrampolineArguments)
361+
if (mode == EmitParameterListMode.TrampolineArguments)
364362
{ Writer.Write("&"); }
365363

366364
if (writeTypes)
367365
{
368-
WriteType(context, declaration, declaration.ReturnType);
369-
370-
//TODO: When fixing https://github.com/InfectedLibraries/Biohazrd/issues/196, use WriteTypeAsReference instead.
371-
if (mode == EmitParameterListMode.VTableFunctionPointerParameters)
372-
{ Writer.Write('*'); }
366+
WriteTypeAsReference(context, declaration, declaration.ReturnType);
373367

374368
if (writeNames)
375369
{ Writer.Write(' '); }

0 commit comments

Comments
 (0)