nitc: use mmodule.filepath at some place
authorJean Privat <jean@pryen.org>
Fri, 18 Dec 2015 15:59:40 +0000 (10:59 -0500)
committerJean Privat <jean@pryen.org>
Fri, 18 Dec 2015 18:09:52 +0000 (13:09 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiler/abstract_compiler.nit
src/testing/testing_doc.nit

index 626607e..905812e 100644 (file)
@@ -1659,7 +1659,7 @@ abstract class AbstractCompilerVisitor
        # This is used for the legacy FFI
        fun add_extern(mmodule: MModule)
        do
-               var file = mmodule.location.file.filename
+               var file = mmodule.filepath
                file = file.strip_extension(".nit")
                var tryfile = file + ".nit.h"
                if tryfile.file_exists then
index 6bd8f0b..2c0e456 100644 (file)
@@ -276,7 +276,7 @@ class NitUnitExecutor
                end
                var opts = new Array[String]
                if mmodule != null then
-                       opts.add "-I {mmodule.location.file.filename.dirname}"
+                       opts.add "-I {mmodule.filepath.dirname}"
                end
                var cmd = "{nitc} --ignore-visibility --no-color '{file}' {opts.join(" ")} >'{file}.out1' 2>&1 </dev/null -o '{file}.bin'"
                var res = sys.system(cmd)