Skip to content

Commit 3eb1f33

Browse files
committed
Use RTLD_GLOBAL from ctypes to make type checkers happy
1 parent b7ea352 commit 3eb1f33

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

clr_loader/ffi/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
from ctypes import RTLD_GLOBAL
23
from pathlib import Path
34

45
import cffi
@@ -43,10 +44,10 @@ def load_hostfxr(dotnet_root: Path):
4344
def load_mono(path: Path | None = None):
4445
# Preload C++ standard library, Mono needs that and doesn't properly link against it
4546
if sys.platform == "linux":
46-
ffi.dlopen("stdc++", ffi.RTLD_GLOBAL)
47+
ffi.dlopen("stdc++", RTLD_GLOBAL)
4748

4849
path_str = str(path) if path else None
49-
return ffi.dlopen(path_str, ffi.RTLD_GLOBAL)
50+
return ffi.dlopen(path_str, RTLD_GLOBAL)
5051

5152

5253
def load_netfx():

0 commit comments

Comments
 (0)