File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,13 @@ def map_symbol(
55
55
else :
56
56
prototype = _FUNCTION_TYPE (restype )
57
57
try :
58
- self . func_name = prototype ((func_name , self ))
58
+ func = prototype ((func_name , self ))
59
59
except AttributeError :
60
60
raise ImportError (
61
61
f'Could not map function "{ func_name } " from library { self ._name } '
62
62
) from None
63
63
64
- self . func_name ._name = func_name # pylint: disable=protected-access
64
+ func ._name = func_name # pylint: disable=protected-access
65
65
log .debug (
66
66
'Wrapped function "%s", result type: %s, error_check %s' ,
67
67
func_name ,
@@ -70,9 +70,10 @@ def map_symbol(
70
70
)
71
71
72
72
if errcheck is not None :
73
- self . func_name .errcheck = errcheck
73
+ func .errcheck = errcheck
74
74
75
- return self .func_name
75
+ setattr (self , func_name , func )
76
+ return func
76
77
77
78
78
79
if sys .platform == "win32" :
You can’t perform that action at this time.
0 commit comments