[svn:parrot] r45743 - branches/immutable_strings_part1/src
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Sat Apr 17 11:00:27 UTC 2010
Author: chromatic
Date: Sat Apr 17 11:00:26 2010
New Revision: 45743
URL: https://trac.parrot.org/parrot/changeset/45743
Log:
[hash] Tidied code; no functional changes.
Modified:
branches/immutable_strings_part1/src/hash.c
Modified: branches/immutable_strings_part1/src/hash.c
==============================================================================
--- branches/immutable_strings_part1/src/hash.c Sat Apr 17 10:41:59 2010 (r45742)
+++ branches/immutable_strings_part1/src/hash.c Sat Apr 17 11:00:26 2010 (r45743)
@@ -183,7 +183,8 @@
return 1;
/* COWed strings */
- if (Buffer_bufstart(s1) == Buffer_bufstart(s2) && s1->bufused == s2->bufused)
+ if (Buffer_bufstart(s1) == Buffer_bufstart(s2)
+ && s1->bufused == s2->bufused)
return 0;
return CHARSET_COMPARE(interp, s1, s2);
@@ -1323,13 +1324,14 @@
/* When the hash is constant, check that the key and value are also
* constant. */
if (!PMC_IS_NULL(hash->container)
- && PObj_constant_TEST(hash->container)) {
+ && PObj_constant_TEST(hash->container)) {
if (hash->key_type == Hash_key_type_STRING
- && !PObj_constant_TEST((PObj *)key))
+ && !PObj_constant_TEST((PObj *)key))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"Used non-constant key in constant hash.");
- if (((hash->entry_type == enum_type_PMC) || (hash->entry_type == enum_type_STRING))
- && !PObj_constant_TEST((PObj *)value))
+ if (((hash->entry_type == enum_type_PMC)
+ || (hash->entry_type == enum_type_STRING))
+ && !PObj_constant_TEST((PObj *)value))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"Used non-constant value in constant hash.");
}
@@ -1450,9 +1452,8 @@
"hash corruption: type = %d\n", hash->entry_type);
};
- if (key){
+ if (key)
parrot_hash_put(interp, dest, key, valtmp);
- }
}
}
More information about the parrot-commits
mailing list