parameters: (func)
return_statement: return (f'  orig_{func.name}_type orig_{func.name};\n'
            f'  orig_{func.name} = reinterpret_cast<orig_{func.name}_type>'
            f'(dlsym(RTLD_NEXT, \"{func.name}\"));\n'
            f'  return orig_{func.name}({fun_args});')
docstring: Produce a string with a dlsym call and the original function call.
docstring_summary: Produce a string with a dlsym call and the original function call.
docstring_tokens: Produce a string with a dlsym call and the original function call .
function: def dlsym_call(func):
    """Produce a string with a dlsym call and the original function call."""
    fun_args = ', '.join(argname(arg) for arg in func.args)
    return (f'  orig_{func.name}_type orig_{func.name};\n'
            f'  orig_{func.name} = reinterpret_cast<orig_{func.name}_type>'
            f'(dlsym(RTLD_NEXT, \"{func.name}\"));\n'
            f'  return orig_{func.name}({fun_args});')
function_tokens: def dlsym_call ( func ) : fun_args = ', ' . join ( argname ( arg ) for arg in func . args ) return ( f'  orig_{func.name}_type orig_{func.name};\n' f'  orig_{func.name} = reinterpret_cast<orig_{func.name}_type>' f'(dlsym(RTLD_NEXT, \"{func.name}\"));\n' f'  return orig_{func.name}({fun_args});' )