You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "lidavidm (via GitHub)" <gi...@apache.org> on 2023/07/24 16:59:48 UTC

[GitHub] [arrow-adbc] lidavidm commented on a diff in pull request #931: fix(csharp): fix C api to work under .NET 4.7.2

lidavidm commented on code in PR #931:
URL: https://github.com/apache/arrow-adbc/pull/931#discussion_r1272502507


##########
csharp/src/Apache.Arrow.Adbc/C/NativeDelegate.cs:
##########
@@ -20,22 +20,15 @@
 
 namespace Apache.Arrow.Adbc.C
 {
-    internal readonly struct NativeDelegate<T>
+    internal readonly struct NativeDelegate<T> where T : Delegate
     {
         private readonly T _managedDelegate; // For lifetime management
-        private readonly IntPtr _nativePointer;
 
         public NativeDelegate(T managedDelegate)
         {
             _managedDelegate = managedDelegate;
-            _nativePointer = Marshal.GetFunctionPointerForDelegate<T>(managedDelegate);
         }
 
-        public static implicit operator IntPtr(NativeDelegate<T> thunk)
-        {
-            return thunk._nativePointer;
-        }
-
-        public IntPtr Pointer { get { return _nativePointer; } }
+        public IntPtr Pointer { get; }

Review Comment:
   Isn't this always a null pointer then?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org