From f41ec9bbf6d210b1f66210f3bea9b8327fe16831 Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Fri, 27 Mar 2015 14:00:13 +0100 Subject: [PATCH] ctpyes: set argtypes & restype --- beetsplug/thumbnails.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/beetsplug/thumbnails.py b/beetsplug/thumbnails.py index 58f8d3071..6ec629118 100644 --- a/beetsplug/thumbnails.py +++ b/beetsplug/thumbnails.py @@ -232,6 +232,10 @@ class GioURI(URIGetter): def __init__(self): self.libgio = self.get_library() 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): lib_name = ctypes.util.find_library("gio-2")