[svn:parrot] r42163 - trunk/src
petdance at svn.parrot.org
petdance at svn.parrot.org
Thu Oct 29 15:05:59 UTC 2009
Author: petdance
Date: Thu Oct 29 15:05:56 2009
New Revision: 42163
URL: https://trac.parrot.org/parrot/changeset/42163
Log:
const a couple of locals, and remove unnecessary braces
Modified:
trunk/src/hash.c
Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c Thu Oct 29 07:27:25 2009 (r42162)
+++ trunk/src/hash.c Thu Oct 29 15:05:56 2009 (r42163)
@@ -1454,7 +1454,7 @@
get_integer_pmc(PARROT_INTERP, INTVAL value)
{
ASSERT_ARGS(get_integer_pmc)
- PMC *ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
+ PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
VTABLE_set_integer_native(interp, ret, value);
return ret;
}
@@ -1475,7 +1475,7 @@
get_number_pmc(PARROT_INTERP, FLOATVAL value)
{
ASSERT_ARGS(get_number_pmc)
- PMC *ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
VTABLE_set_number_native(interp, ret, value);
return ret;
}
@@ -1495,7 +1495,7 @@
get_string_pmc(PARROT_INTERP, ARGIN(STRING *value))
{
ASSERT_ARGS(get_string_pmc)
- PMC *ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+ PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
VTABLE_set_string_native(interp, ret, value);
return ret;
}
@@ -1747,10 +1747,8 @@
PMC *ret;
switch (hash->key_type) {
case Hash_key_type_int:
- {
ret = get_integer_pmc(interp, (INTVAL)key);
break;
- }
case Hash_key_type_PMC:
ret = (PMC*)key;
break;
More information about the parrot-commits
mailing list