Skip to content

Commit cc97b8a

Browse files
committed
Add an Action variant of TryUsingDll
1 parent e9283e3 commit cc97b8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/runtime/Runtime.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,9 @@ internal static unsafe nint Refcount(BorrowedReference op)
672672
[Pure]
673673
internal static int Refcount32(BorrowedReference op) => checked((int)Refcount(op));
674674

675+
internal static void TryUsingDll(Action op) =>
676+
TryUsingDll(() => { op(); return 0; });
677+
675678
/// <summary>
676679
/// Call specified function, and handle PythonDLL-related failures.
677680
/// </summary>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy