mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
ctpyes: set argtypes & restype
This commit is contained in:
parent
35ff1f821d
commit
f41ec9bbf6
1 changed files with 4 additions and 0 deletions
|
|
@ -232,6 +232,10 @@ class GioURI(URIGetter):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.libgio = self.get_library()
|
self.libgio = self.get_library()
|
||||||
self.available = bool(self.libgio)
|
self.available = bool(self.libgio)
|
||||||
|
if self.available:
|
||||||
|
self.libgio.g_file_new_for_path.restype = ctypes.c_void_p
|
||||||
|
self.libgio.g_file_get_uri.argtypes = [ctypes.c_void_p]
|
||||||
|
self.libgio.g_object_unref.argtypes = [ctypes.c_void_p]
|
||||||
|
|
||||||
def get_library(self):
|
def get_library(self):
|
||||||
lib_name = ctypes.util.find_library("gio-2")
|
lib_name = ctypes.util.find_library("gio-2")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue