Java FFI: support array in extern types
[nit.git] / src / ffi / cpp.nit
index f75c100..8ca389a 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)
@@ -178,11 +178,6 @@ class ExternCppFile
        super ExternFile
 
        var mmodule: MModule
-       init(path: String, mmodule: MModule)
-       do
-               super
-               self.mmodule = mmodule
-       end
 
        redef fun makefile_rule_name do return "{filename.basename("")}.o"
        redef fun makefile_rule_content do return "$(CXX) $(CFLAGS) {mmodule.cpp_compiler_options} -c {filename.basename("")} -o {filename.basename("")}.o"
@@ -193,11 +188,6 @@ class ForeignCppType
        super ForeignType
 
        var cpp_type: String
-
-       init (cpp_type: String)
-       do
-               self.cpp_type = cpp_type
-       end
 end
 
 redef class NitniCallback