Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcc97b8a

Browse files
committed
Add an Action variant of TryUsingDll
1 parente9283e3 commitcc97b8a

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
internalstaticint Refcount32(BorrowedReferenceop)=>checked((int)Refcount(op));
674674

675+
internalstaticvoid TryUsingDll(Actionop)=>
676+
TryUsingDll(()=>{op();return0;});
677+
675678
/// <summary>
676679
/// Call specified function, and handle PythonDLL-related failures.
677680
/// </summary>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp