[svn:parrot] r45536 - trunk/src/pmc

mikehh at svn.parrot.org mikehh at svn.parrot.org
Sat Apr 10 17:15:16 UTC 2010


Author: mikehh
Date: Sat Apr 10 17:15:16 2010
New Revision: 45536
URL: https://trac.parrot.org/parrot/changeset/45536

Log:
add some casts to get src/pmc/hash.pmc to build with g++

Modified:
   trunk/src/pmc/hash.pmc

Modified: trunk/src/pmc/hash.pmc
==============================================================================
--- trunk/src/pmc/hash.pmc	Sat Apr 10 15:55:54 2010	(r45535)
+++ trunk/src/pmc/hash.pmc	Sat Apr 10 17:15:16 2010	(r45536)
@@ -1142,16 +1142,16 @@
 
                 switch (k_type) {
                   case Hash_key_type_int:
-                    key_fn = key_hash_int;
-                    cmp_fn = int_compare;
+                    key_fn = (hash_hash_key_fn)key_hash_int;
+                    cmp_fn = (hash_comp_fn)int_compare;
                     break;
                   case Hash_key_type_STRING:
-                    key_fn = key_hash_STRING;
-                    cmp_fn = STRING_compare;
+                    key_fn = (hash_hash_key_fn)key_hash_STRING;
+                    cmp_fn = (hash_comp_fn)STRING_compare;
                     break;
                   case Hash_key_type_PMC:
-                    key_fn = key_hash_PMC;
-                    cmp_fn = PMC_compare;
+                    key_fn = (hash_hash_key_fn)key_hash_PMC;
+                    cmp_fn = (hash_comp_fn)PMC_compare;
                     break;
                   default:
                     Parrot_ex_throw_from_c_args(interp, NULL, 1,
@@ -1159,7 +1159,7 @@
                     break;
                 }
 
-                SELF.set_pointer(parrot_create_hash(INTERP, v_type, k_type, cmp_fn, key_fn));
+                SELF.set_pointer(parrot_create_hash(INTERP, (PARROT_DATA_TYPE)v_type, (Hash_key_type)k_type, cmp_fn, key_fn));
             }
 
             hash = (Hash *)SELF.get_pointer();


More information about the parrot-commits mailing list