mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-25 16:28:57 +05:30
declared function where del sharedlib is not needed anymore
This commit is contained in:
parent
a2d91cd56b
commit
360de0dea5
@ -1,11 +1,12 @@
|
|||||||
import ctypes
|
import ctypes
|
||||||
|
|
||||||
|
def loadlibc():
|
||||||
sharedlib = './lib3ddevil1.so'
|
sharedlib = './lib3ddevil1.so'
|
||||||
|
libc = None
|
||||||
try:
|
try:
|
||||||
libc = ctypes.cdll.LoadLibrary(sharedlib)
|
libc = ctypes.cdll.LoadLibrary(sharedlib)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
print("Error loading dynamically linked library.\nOSError: " + str(e))
|
print("Error loading dynamically linked library.\nOSError: " + str(e))
|
||||||
raise SystemExit("Couldn't load %s" % sharedlib)
|
raise SystemExit("Couldn't load %s" % sharedlib)
|
||||||
|
|
||||||
# Don't need these anymore
|
libc = loadlibc()
|
||||||
del sharedlib
|
|
Loading…
Reference in New Issue
Block a user