瀏覽代碼

Fix is_interface check. Remove redundant class checks

Hugh Sanderson 14 年之前
父節點
當前提交
1c6b370dba
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      gencpp.ml

+ 1 - 3
gencpp.ml

@@ -398,7 +398,7 @@ let member_type ctx field_object member =
 	with Not_found -> "?";;
 
 let is_interface obj =
-	match obj.etype with
+	match follow obj.etype with
 	| TInst (klass,params) -> klass.cl_interface
 	| _ -> false;;
 
@@ -2566,8 +2566,6 @@ let generate_class_files common_ctx member_types super_deps constructor_deps cla
 	if (not class_def.cl_interface) then begin
 		(* Remap the specialised "extern" classes back to the generic names *)
 		let class_name_text = match class_path with
-			| ["cpp"], "CppDate__" -> "Date"
-			| ["cpp"], "CppXml__" -> "Xml"
 			| path -> join_class_path path "." in
 
 		output_cpp ("Class " ^ class_name ^ "::__mClass;\n\n");