lib/serialization: add README.md
[nit.git] / src / c_tools.nit
index 7e235b0..932f03d 100644 (file)
@@ -49,9 +49,9 @@ class CCompilationUnit
 
        fun add_local_function( efc : CFunction )
        do
-               body_decl.add( "{efc.signature};\n" )
-               body_impl.add( "\n" )
-               body_impl.add( efc.to_writer )
+               body_decl.add "static {efc.signature};\n"
+               body_impl.add "\n"
+               body_impl.add efc.to_writer
        end
 
        fun add_exported_function( efc : CFunction )
@@ -61,7 +61,7 @@ class CCompilationUnit
                body_impl.add( efc.to_writer )
        end
 
-       fun compile_header_core( stream : OStream )
+       fun compile_header_core( stream : Writer )
        do
                header_c_base.write_to( stream )
                header_custom.write_to( stream )
@@ -69,7 +69,7 @@ class CCompilationUnit
                header_decl.write_to( stream )
        end
 
-       fun compile_body_core( stream : OStream )
+       fun compile_body_core( stream : Writer )
        do
                body_decl.write_to( stream )
                body_custom.write_to( stream )
@@ -125,14 +125,7 @@ end
 class ExternCFile
        super ExternFile
 
-       init (filename, cflags: String)
-       do
-               super filename
-
-               self.cflags = cflags
-       end
-
-       # Additional specific CC compiler -c flags
+       # Custom options for the C compiler (CFLAGS)
        var cflags: String
 
        redef fun hash do return filename.hash