[svn:parrot] r48973 - in trunk/src: . string

mikehh at svn.parrot.org mikehh at svn.parrot.org
Mon Sep 13 10:49:06 UTC 2010


Author: mikehh
Date: Mon Sep 13 10:49:06 2010
New Revision: 48973
URL: https://trac.parrot.org/parrot/changeset/48973

Log:
add casts to get g++ to build

Modified:
   trunk/src/hash.c
   trunk/src/string/api.c

Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c	Mon Sep 13 07:38:06 2010	(r48972)
+++ trunk/src/hash.c	Mon Sep 13 10:49:06 2010	(r48973)
@@ -1465,7 +1465,7 @@
 
     if (hash->key_type == Hash_key_type_STRING) {
         const STRING * const s = (STRING *)key;
-        hashval                = key_hash_STRING(interp, s, hash->seed);
+        hashval                = key_hash_STRING(interp, (STRING *)s, hash->seed);
         bucket                 = hash->index[hashval & hash->mask];
 
         while (bucket) {

Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c	Mon Sep 13 07:38:06 2010	(r48972)
+++ trunk/src/string/api.c	Mon Sep 13 10:49:06 2010	(r48973)
@@ -996,7 +996,7 @@
         true_length = (UINTVAL)(src_length - true_offset);
 
     if (true_length == src_length && !offset)
-        return src;
+        return (STRING *)src;
     else
         return STRING_substr(interp, src, true_offset, true_length);
 }


More information about the parrot-commits mailing list