浏览代码

[cs] don't generate multiple source headers

Dan Korostelev 10 年之前
父节点
当前提交
2885f7c89f
共有 1 个文件被更改,包括 4 次插入2 次删除
  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 ->