]> granicus.if.org Git - onig/commitdiff
Fix a compilation warning under windows
authorIndrek Ardel <indrek@ardel.eu>
Sat, 24 Oct 2015 11:12:38 +0000 (14:12 +0300)
committerIndrek Ardel <indrek@ardel.eu>
Sat, 24 Oct 2015 11:12:38 +0000 (14:12 +0300)
warning C4133: 'function' : incompatible types -
from 'hash_data_type *' to 'st_data_t *'

regint.h

index 0fba09bb584b0d5b99ca2cdcbff015fc555af16a..406e08bfccff826ac38eaa295a039664d8e93513 100644 (file)
--- a/regint.h
+++ b/regint.h
@@ -789,7 +789,12 @@ extern int  onig_is_code_in_cc_len P_((int enclen, OnigCodePoint code, CClassNod
 
 /* strend hash */
 typedef void hash_table_type;
+#ifdef _WIN32
+# include <windows.h>
+typedef ULONG_PTR hash_data_type;
+#else
 typedef unsigned long hash_data_type;
+#endif
 
 extern hash_table_type* onig_st_init_strend_table_with_size P_((int size));
 extern int onig_st_lookup_strend P_((hash_table_type* table, const UChar* str_key, const UChar* end_key, hash_data_type *value));