teo-tsirpanis commented on code in PR #35810:
URL: https://github.com/apache/arrow/pull/35810#discussion_r1210668239
##########
csharp/src/Apache.Arrow/C/CArrowArrayExporter.cs:
##########
@@ -184,13 +189,12 @@ private unsafe static void
ConvertRecordBatch(ExportedAllocationOwner sharedOwne
cArray->dictionary = null;
}
+#if NET5_0_OR_GREATER
+ [UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvStdcall) })]
Review Comment:
If I understand correctly, are you saying to change this:
https://github.com/apache/arrow/blob/e628ca50078c749ea7a10b53defe12cbec7d581f/csharp/src/Apache.Arrow/C/CArrowArray.cs#L41
into this?
```csharp
#if NET5_0_OR_GREATER
public delegate* unmanaged<CArrowArray*, void> release;
#else
public delegate* unmanaged[Stdcall]<CArrowArray*, void> release;
#endif
```
That would cause an incompatible API surface between the assembly compiled
for .NET 6 and that compiled for the earlier frameworks. We have two options:
* Lie and keep the `stdcall` calling convention on the function pointers.
* Use the default unmanaged calling convention but support the C interface
only on .NET 6+ (we don't target 5 as it is unsupported).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]