From d3412499bb2a3f80b76a530699c8baea445e33bd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 23 Apr 2016 01:20:28 +0200 Subject: [PATCH] Use the original function name in C code wrappers Using "sym:name" in the wrapping code is wrong, it is different from "name" if the function has been renamed and we need to call the original C function, not whichever name it is exported under. --- Source/Modules/c.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/c.cxx b/Source/Modules/c.cxx index 6d8f04d43..916875a3b 100644 --- a/Source/Modules/c.cxx +++ b/Source/Modules/c.cxx @@ -694,7 +694,7 @@ ready: Printv(wrapper->code, return_type, " result;\n", NIL); Printf(wrapper->code, "result = "); } - Printv(wrapper->code, name, "(", arg_names, ");\n", NIL); + Printv(wrapper->code, Getattr(n, "name"), "(", arg_names, ");\n", NIL); Append(wrapper->code, append_feature(n)); if (!is_void_return) Printf(wrapper->code, "return result;\n");