소스 검색

Fix static-function-variable setting

Hugh Sanderson 14 년 전
부모
커밋
844974bde2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      gencpp.ml

+ 1 - 1
gencpp.ml

@@ -1949,7 +1949,7 @@ let gen_member_def ctx class_def is_static is_interface field =
 		(* Add a "dyn" function for variable to unify variable/function access *)
 		(match follow field.cf_type with
 		| TFun (_,_) ->
-			output "	";
+			output (if is_static then "		static " else "		");
 			gen_type ctx field.cf_type;
 			output (" &" ^ remap_name ^ "_dyn() { return " ^ remap_name ^ ";}\n" )
 		| _ ->  (match field.cf_kind with