From: Alexis Laferrière Date: Sun, 25 Jan 2015 17:55:47 +0000 (-0500) Subject: C FFI: fix line offset in gcc errors on custom header code X-Git-Tag: v0.7.1~5^2~1 X-Git-Url: http://nitlanguage.org C FFI: fix line offset in gcc errors on custom header code Signed-off-by: Alexis Laferrière --- diff --git a/src/ffi/c.nit b/src/ffi/c.nit index ebd2277..1790f48 100644 --- a/src/ffi/c.nit +++ b/src/ffi/c.nit @@ -31,11 +31,13 @@ class CLanguage redef fun compile_module_block(block, ecc, mmodule) do if block.is_c_header then - ecc.header_custom.add( block.location.as_line_pragma ) - ecc.header_custom.add( block.code ) + ecc.header_custom.add block.location.as_line_pragma + ecc.header_custom.add "\n" + ecc.header_custom.add block.code else if block.is_c_body then - ecc.body_custom.add( block.location.as_line_pragma ) - ecc.body_impl.add( block.code ) + ecc.body_impl.add block.location.as_line_pragma + ecc.body_impl.add "\n" + ecc.body_impl.add block.code end end