소스 검색

64 bits fix

Nicolas Cannasse 13 년 전
부모
커밋
a32ebccefe
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      interp.ml

+ 2 - 1
interp.ml

@@ -214,7 +214,8 @@ let hash f =
 	for i = 0 to String.length f - 1 do
 		h := !h * 223 + int_of_char (String.unsafe_get f i);
 	done;
-	!h
+	(* truncate for 64 bits ints *)
+	!h land 0x7FFFFFFF
 
 let constants =
 	let h = Hashtbl.create 0 in