Browse Source

[cs] don't generate multiple source headers

Dan Korostelev 10 years ago
parent
commit
2885f7c89f
1 changed files with 4 additions and 2 deletions
  1. 4 2
      gencs.ml

+ 4 - 2
gencs.ml

@@ -2595,8 +2595,10 @@ let configure gen =
 	in
 
 	let module_type_gen w md_tp =
-		let requires_root = no_root && len w = 0 in
-		Codegen.map_source_header gen.gcon (fun s -> print w "// %s\n" s);
+		let file_start = len w = 0 in
+		let requires_root = no_root && file_start in
+		if file_start then
+			Codegen.map_source_header gen.gcon (fun s -> print w "// %s\n" s);
 		reset_temps();
 		match md_tp with
 			| TClassDecl cl ->