@ -1144,10 +1144,14 @@ namespace CppSharp.Generators.CSharp
{
{
var final = field . Type . GetFinalPointee ( ) . Desugar ( ) ;
var final = field . Type . GetFinalPointee ( ) . Desugar ( ) ;
if ( final . IsPrimitiveType ( ) & & ! final . IsPrimitiveType ( PrimitiveType . Void ) & &
if ( final . IsPrimitiveType ( ) & & ! final . IsPrimitiveType ( PrimitiveType . Void ) & &
( ! final . IsPrimitiveType ( PrimitiveType . Char ) | |
( ! final . IsPrimitiveType ( PrimitiveType . Char ) & &
! final . IsPrimitiveType ( PrimitiveType . WideChar ) | |
( ! Context . Options . MarshalCharAsManagedChar & &
( ! Context . Options . MarshalCharAsManagedChar & &
! ( ( PointerType ) field . Type ) . QualifiedPointee . Qualifiers . IsConst ) ) )
! ( ( PointerType ) field . Type ) . QualifiedPointee . Qualifiers . IsConst ) ) )
@return = string . Format ( "({0}*) {1}" , field . Type . GetPointee ( ) . Desugar ( ) , @return ) ;
@return = string . Format ( "({0}*) {1}" , field . Type . GetPointee ( ) . Desugar ( ) , @return ) ;
if ( ! ( ( PointerType ) field . Type ) . QualifiedPointee . Qualifiers . IsConst & &
final . IsPrimitiveType ( PrimitiveType . WideChar ) )
@return = string . Format ( "({0}*) {1}" , field . Type . GetPointee ( ) . Desugar ( ) , @return ) ;
}
}
WriteLine ( "return {0};" , @return ) ;
WriteLine ( "return {0};" , @return ) ;