nitg/ffi: fix indirect function declaration in C++ FFI
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 5 Nov 2014 19:56:32 +0000 (14:56 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 5 Nov 2014 19:58:58 +0000 (14:58 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/ffi/cpp.nit

index f75c100..197be69 100644 (file)
@@ -103,7 +103,7 @@ class CPPLanguage
                end
                fc.exprs.add(mproperty.build_ccall(mclass_type, mmodule, "___cpp_impl", long_signature, cpp_call_context, "_for_cpp"))
                fc.exprs.add("\n")
-               mmodule.cpp_file.add_local_function(fc)
+               mmodule.cpp_file.add_exported_function(fc)
 
                # Custom C++, the body of the Nit C++ method is copied to its own C++ function
                var cpp_signature = mproperty.build_csignature(mclass_type, mmodule, "___cpp_impl", long_signature, cpp_call_context)