Skip to content

Commit

Permalink
fix C++ build and unoptimized build
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@48638 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
plobsing committed Aug 24, 2010
1 parent 2d16f81 commit 7cacbdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ Parrot_hash_thaw(PARROT_INTERP, ARGMOD(PMC *info))
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;

Expand Down Expand Up @@ -982,7 +982,7 @@ parrot_create_hash_sized(PARROT_INTERP, PARROT_DATA_TYPE val_type, Hash_key_type
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));
Expand Down
4 changes: 2 additions & 2 deletions src/pmc/hash.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ Used to archive the hash.

VTABLE void freeze(PMC *info) {
SUPER(info);
Parrot_hash_freeze(INTERP, SELF.get_pointer(), info);
Parrot_hash_freeze(INTERP, (Hash *)SELF.get_pointer(), info);
}

/*
Expand All @@ -1179,7 +1179,7 @@ Used to unarchive the hash.

VTABLE void thaw(PMC *info) {
SUPER(info);
SELF.set_pointer(Parrot_hash_thaw(INTERP, info));
SELF.set_pointer((void *)Parrot_hash_thaw(INTERP, info));
}
}

Expand Down

0 comments on commit 7cacbdb

Please sign in to comment.