nitni: add indirection to use `MModule::c_name` without all the compilers
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 10 Dec 2014 00:36:55 +0000 (19:36 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 10 Dec 2014 12:59:17 +0000 (07:59 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/nitni/nitni_base.nit

index cc0ffa2..4f31aaf 100644 (file)
@@ -22,6 +22,7 @@ module nitni_base
 
 import parser
 import modelbuilder # builder only for externcalls
+private import compiler::abstract_compiler
 
 redef class MMethod
        # Short name of this method in C (without the class name)
@@ -53,7 +54,8 @@ end
 
 redef class MModule
        # Mangled name of this module in C
-       fun cname: String do return name
+       fun cname: String do return c_name # FIXME this is a hack to keep the internal FFI
+       # API independent of the compilers while still using the `MModule::c_name` service.
 end
 
 redef class MMethodDef