[svn:parrot] r48638 - in trunk/src: . pmc
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Tue Aug 24 19:42:07 UTC 2010
Author: plobsing
Date: Tue Aug 24 19:42:06 2010
New Revision: 48638
URL: https://trac.parrot.org/parrot/changeset/48638
Log:
fix C++ build and unoptimized build
Modified:
trunk/src/hash.c
trunk/src/pmc/hash.pmc
Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c Tue Aug 24 17:52:39 2010 (r48637)
+++ trunk/src/hash.c Tue Aug 24 19:42:06 2010 (r48638)
@@ -510,8 +510,8 @@
ASSERT_ARGS(Parrot_hash_thaw)
const size_t num_entries = VTABLE_shift_integer(interp, info);
- const Hash_key_type key_type = VTABLE_shift_integer(interp, info);
- const PARROT_DATA_TYPE entry_type = VTABLE_shift_integer(interp, info);
+ const Hash_key_type key_type = (Hash_key_type)VTABLE_shift_integer(interp, info);
+ const PARROT_DATA_TYPE entry_type = (PARROT_DATA_TYPE)VTABLE_shift_integer(interp, info);
size_t entry_index;
Hash *hash;
@@ -982,7 +982,7 @@
NOTNULL(hash_comp_fn compare), NOTNULL(hash_hash_key_fn keyhash), UINTVAL size)
{
ASSERT_ARGS(parrot_create_hash_sized)
- UINTVAL initial_buckets = round_up_pow2(size);
+ UINTVAL initial_buckets = size > INITIAL_BUCKETS ? round_up_pow2(size) : INITIAL_BUCKETS;
HashBucket *bp;
void *alloc = Parrot_gc_allocate_memory_chunk_with_interior_pointers(
interp, sizeof (Hash) + HASH_ALLOC_SIZE(initial_buckets));
Modified: trunk/src/pmc/hash.pmc
==============================================================================
--- trunk/src/pmc/hash.pmc Tue Aug 24 17:52:39 2010 (r48637)
+++ trunk/src/pmc/hash.pmc Tue Aug 24 19:42:06 2010 (r48638)
@@ -1164,7 +1164,7 @@
VTABLE void freeze(PMC *info) {
SUPER(info);
- Parrot_hash_freeze(INTERP, SELF.get_pointer(), info);
+ Parrot_hash_freeze(INTERP, (Hash *)SELF.get_pointer(), info);
}
/*
@@ -1179,7 +1179,7 @@
VTABLE void thaw(PMC *info) {
SUPER(info);
- SELF.set_pointer(Parrot_hash_thaw(INTERP, info));
+ SELF.set_pointer((void *)Parrot_hash_thaw(INTERP, info));
}
}
More information about the parrot-commits
mailing list