nitc: FFI and nitni use MModule::c_name
[nit.git] / src / nitni / nitni_base.nit
index dd2fe10..6685029 100644 (file)
@@ -51,11 +51,6 @@ redef class MMethod
        end
 end
 
-redef class MModule
-       # Mangled name of this module in C
-       fun cname: String do return name
-end
-
 redef class MMethodDef
        # Name of the function to callback this method from C,
        # also used in other functions names used for this method.
@@ -90,7 +85,7 @@ redef class MClassType
                if name == "Bool" then return "int"
                if name == "Char" then return "char"
                if name == "Float" then return "double"
-               if name == "Int" then return "int"
+               if name == "Int" then return "long"
                if name == "NativeString" then return "char*"
                if mclass.kind == extern_kind then
                        var ctype = mclass.ctype
@@ -105,7 +100,7 @@ redef class MClassType
                if name == "Bool" then return "int"
                if name == "Char" then return "char"
                if name == "Float" then return "double"
-               if name == "Int" then return "int"
+               if name == "Int" then return "long"
                if name == "NativeString" then return "char*"
                if mclass.kind == extern_kind then return "void*"
                return "struct nitni_instance *"