X-Git-Url: http://nitlanguage.org diff --git a/src/ffi/c.nit b/src/ffi/c.nit index 92697f5..ebd2277 100644 --- a/src/ffi/c.nit +++ b/src/ffi/c.nit @@ -68,23 +68,22 @@ redef class AExternCodeBlock end redef class Location - fun as_line_pragma: String do return "#line {line_start} \"{file.filename}\"\n" + fun as_line_pragma: String do return "#line {line_start-1} \"{file.filename}\"\n" end redef class MModule - var c_compiler_options = "" is writable - var c_linker_options = "" is writable + var cflags = "" is writable + var ldflags = "" is writable + + # Additional libraries needed for the compilation + # Will be used with pkg-config + var pkgconfigs = new Array[String] end class ForeignCType super ForeignType redef var ctype: String - - init(ctype: String) - do - self.ctype = ctype - end end redef class NitniCallback @@ -114,7 +113,7 @@ end class ToCCallContext super CallContext - private init do end + # TODO: private init because singleton instance (see `to_c_call_context`) redef fun name_mtype(mtype) do @@ -127,7 +126,7 @@ end class FromCCallContext super CallContext - private init do end + # TODO: private init because singleton instance (see `from_c_call_context`) redef fun name_mtype(mtype) do return mtype.cname end