@@ -876,7 +876,8 @@ private void GenerateVariableSetter(Variable var)
876
876
if ( ctx . HasCodeBlock )
877
877
Indent ( ) ;
878
878
879
- WriteLine ( $ "*{ ptr } = { marshal . Context . Return } ;", marshal . Context . Return ) ;
879
+ WriteLine ( $@ "*{ ptr } = { marshal . Context . ArgumentPrefix } {
880
+ marshal . Context . Return } ;" , marshal . Context . Return ) ;
880
881
881
882
if ( ctx . HasCodeBlock )
882
883
UnindentAndWriteCloseBrace ( ) ;
@@ -974,7 +975,7 @@ private void GenerateFieldSetter(Field field, Class @class, QualifiedType fieldT
974
975
Write ( "(object) " ) ;
975
976
}
976
977
}
977
- WriteLine ( $ "{ marshal . Context . Return } ;") ;
978
+ WriteLine ( $ "{ marshal . Context . ArgumentPrefix } { marshal . Context . Return } ;") ;
978
979
}
979
980
980
981
if ( ( arrayType != null && @class . IsValueType ) || ctx . HasCodeBlock )
@@ -1049,21 +1050,21 @@ private void GenerateIndexerSetter(Function function)
1049
1050
GetInstanceParam ( function ) } , { paramMarshal . Context . ArgumentPrefix } { paramMarshal . Name } )" ;
1050
1051
if ( type . IsPrimitiveType ( ) )
1051
1052
{
1052
- WriteLine ( $ "*{ call } = { marshal . Context . Return } ;") ;
1053
+ WriteLine ( $ "*{ call } = { marshal . Context . ArgumentPrefix } { marshal . Context . Return } ;") ;
1053
1054
}
1054
1055
else
1055
1056
{
1056
1057
Class @class ;
1057
1058
if ( type . TryGetClass ( out @class ) && @class . HasNonTrivialCopyConstructor )
1058
1059
{
1059
1060
Method cctor = @class . Methods . First ( c => c . IsCopyConstructor ) ;
1060
- WriteLine ( $@ "{ @class . Visit ( TypePrinter ) } .{ Helpers . InternalStruct } .{
1061
- GetFunctionNativeIdentifier ( cctor ) } ({ call } , {
1062
- ctx . Parameter . Name } .{ Helpers . InstanceIdentifier } );" ) ;
1061
+ WriteLine ( $@ "{ TypePrinter . PrintNative ( type ) } .{
1062
+ GetFunctionNativeIdentifier ( cctor ) } ({ call } , { marshal . Context . Return } );" ) ;
1063
1063
}
1064
1064
else
1065
1065
{
1066
- WriteLine ( $ "*({ TypePrinter . PrintNative ( type ) } *) { call } = { marshal . Context . Return } ;") ;
1066
+ WriteLine ( $@ "*({ TypePrinter . PrintNative ( type ) } *) { call } = {
1067
+ marshal . Context . ArgumentPrefix } { marshal . Context . Return } ;" ) ;
1067
1068
}
1068
1069
}
1069
1070
}
@@ -1790,13 +1791,12 @@ private void GenerateVTableManagedCall(Method method)
1790
1791
if ( method . HasIndirectReturnTypeParameter )
1791
1792
{
1792
1793
var retParam = method . Parameters . First ( p => p . Kind == ParameterKind . IndirectReturnType ) ;
1793
- WriteLine ( "*({0}*) {1} = {2};" ,
1794
- TypePrinter . PrintNative ( method . OriginalReturnType ) ,
1795
- retParam . Name , marshal . Context . Return ) ;
1794
+ WriteLine ( $@ "*({ TypePrinter . PrintNative ( method . OriginalReturnType ) } *) {
1795
+ retParam . Name } = { marshal . Context . ArgumentPrefix } { marshal . Context . Return } ;" ) ;
1796
1796
}
1797
1797
else
1798
1798
{
1799
- WriteLine ( "return {0};" , marshal . Context . Return ) ;
1799
+ WriteLine ( $ "return { marshal . Context . ArgumentPrefix } { marshal . Context . Return } ;" ) ;
1800
1800
}
1801
1801
}
1802
1802
0 commit comments