@@ -78,7 +78,7 @@ public string GetGenericType (Dictionary<string, string> mappings)
78
78
79
79
public string FromNative ( CodeGenerationOptions opt , string var_name , bool owned )
80
80
{
81
- return String . Format ( "({0}[]? ) JNIEnv.GetArray ({1}, {2}, typeof ({3}))" , opt . GetOutputName ( ElementType ) , var_name , owned ? "JniHandleOwnership.TransferLocalRef" : "JniHandleOwnership.DoNotTransfer" , opt . GetOutputName ( sym . FullName ) ) ;
81
+ return String . Format ( "({0}[]{4} ) JNIEnv.GetArray ({1}, {2}, typeof ({3}))" , opt . GetOutputName ( ElementType ) , var_name , owned ? "JniHandleOwnership.TransferLocalRef" : "JniHandleOwnership.DoNotTransfer" , opt . GetOutputName ( sym . FullName ) , opt . NullableOperator ) ;
82
82
}
83
83
84
84
public string ToNative ( CodeGenerationOptions opt , string var_name , Dictionary < string , string > mappings = null )
@@ -117,7 +117,7 @@ public string[] PostCall (CodeGenerationOptions opt, string var_name)
117
117
118
118
public string [ ] PreCallback ( CodeGenerationOptions opt , string var_name , bool owned )
119
119
{
120
- return new string [ ] { String . Format ( "var {1} = ({0}[]? ) JNIEnv.GetArray ({2}, JniHandleOwnership.DoNotTransfer, typeof ({3}));" , opt . GetOutputName ( ElementType ) , opt . GetSafeIdentifier ( var_name ) , opt . GetSafeIdentifier ( TypeNameUtilities . GetNativeName ( var_name ) ) , opt . GetOutputName ( sym . FullName ) ) } ;
120
+ return new string [ ] { String . Format ( "var {1} = ({0}[]{4} ) JNIEnv.GetArray ({2}, JniHandleOwnership.DoNotTransfer, typeof ({3}));" , opt . GetOutputName ( ElementType ) , opt . GetSafeIdentifier ( var_name ) , opt . GetSafeIdentifier ( TypeNameUtilities . GetNativeName ( var_name ) ) , opt . GetOutputName ( sym . FullName ) , opt . NullableOperator ) } ;
121
121
}
122
122
123
123
public string [ ] PreCall ( CodeGenerationOptions opt , string var_name )
0 commit comments