Skip to content

Commit

Permalink
Improved debug messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Feb 25, 2019
1 parent a61a0bd commit d432c54
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ctyped/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,14 @@ def function_(func_py: Callable):
if 'cfunc' in func_args:
# Use existing function, pass `cfunc`.

LOGGER.debug(
'Function %s (%s) is wrapped and implements manual `cfunc` handling.', info.name_py, name)
LOGGER.debug('Func [ %s -> %s ] uses wrapped manual call.', name, info.name_py)

func_swapped = partialmethod(func_py, cfunc=partial(cfunc_wrapped, f=func_c))

else:
# Use automatic function.

LOGGER.debug(
'Function %s (%s) is wrapped and implements automatic proxied ctypes call.', info.name_py, name)
LOGGER.debug('Func [ %s -> %s ] uses wrapped auto call.', name, info.name_py)

func_swapped = partialmethod(cfunc_direct, f=func_c)

Expand All @@ -222,7 +220,7 @@ def function_(func_py: Callable):

else:

LOGGER.debug('Function %s is swapped with direct ctypes %s call.' % (info.name_py, name))
LOGGER.debug('Func [ %s -> %s ] uses direct call.' % (name, info.name_py))

func_out = func_c

Expand Down

0 comments on commit d432c54

Please sign in to comment.