File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,13 @@ def map_symbol(
5555 else :
5656 prototype = _FUNCTION_TYPE (restype )
5757 try :
58- self . func_name = prototype ((func_name , self ))
58+ func = prototype ((func_name , self ))
5959 except AttributeError :
6060 raise ImportError (
6161 f'Could not map function "{ func_name } " from library { self ._name } '
6262 ) from None
6363
64- self . func_name ._name = func_name # pylint: disable=protected-access
64+ func ._name = func_name # pylint: disable=protected-access
6565 log .debug (
6666 'Wrapped function "%s", result type: %s, error_check %s' ,
6767 func_name ,
@@ -70,9 +70,10 @@ def map_symbol(
7070 )
7171
7272 if errcheck is not None :
73- self . func_name .errcheck = errcheck
73+ func .errcheck = errcheck
7474
75- return self .func_name
75+ setattr (self , func_name , func )
76+ return func
7677
7778
7879if sys .platform == "win32" :
You can’t perform that action at this time.
0 commit comments