[svn:parrot] r48421 - trunk/src
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Wed Aug 11 21:15:36 UTC 2010
Author: NotFound
Date: Wed Aug 11 21:15:36 2010
New Revision: 48421
URL: https://trac.parrot.org/parrot/changeset/48421
Log:
ugly cast to make c++ happy without too much changes
Modified:
trunk/src/hash.c
Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c Wed Aug 11 20:47:04 2010 (r48420)
+++ trunk/src/hash.c Wed Aug 11 21:15:36 2010 (r48421)
@@ -179,7 +179,10 @@
{
ASSERT_ARGS(get_hash_val)
if (hash->hash_val == (hash_hash_key_fn)key_hash_STRING) {
- const STRING * const s = (const STRING *)key;
+ /* Must be non-const because str_to_hashval caches the result
+ * in the STRING struct */
+ DECL_CONST_CAST;
+ STRING * const s = (STRING *)PARROT_const_cast(void *, key);
if (s->hashval)
return s->hashval;
return Parrot_str_to_hashval(interp, s);
More information about the parrot-commits
mailing list