summaryrefslogtreecommitdiff
path: root/ext/arybase
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2011-10-24 10:15:37 +1100
committerTony Cook <tony@develop-help.com>2011-10-24 10:15:37 +1100
commitf39efbfaef55d5a320eec6763aff5f496a8355e9 (patch)
treea5fbcfd3186b3063a545637f07f1bbaeaa10b02b /ext/arybase
parent4319b00c03e6a517525c01b22c9047f87f7dc6e5 (diff)
downloadperl-f39efbfaef55d5a320eec6763aff5f496a8355e9.tar.gz
fix g++ build breakage introduced in 03d9f026ae25
C++ requires a cast to convert from void * to other types.
Diffstat (limited to 'ext/arybase')
-rw-r--r--ext/arybase/arybase.xs6
-rw-r--r--ext/arybase/ptable.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/ext/arybase/arybase.xs b/ext/arybase/arybase.xs
index 3151d31fe9..b5d007b569 100644
--- a/ext/arybase/arybase.xs
+++ b/ext/arybase/arybase.xs
@@ -28,7 +28,7 @@ STATIC const ab_op_info *ab_map_fetch(const OP *o, ab_op_info *oi) {
MUTEX_LOCK(&ab_op_map_mutex);
#endif
- val = ptable_fetch(ab_op_map, o);
+ val = (ab_op_info *)ptable_fetch(ab_op_map, o);
if (val) {
*oi = *val;
val = oi;
@@ -48,8 +48,8 @@ STATIC const ab_op_info *ab_map_store_locked(
ab_map_store_locked(aPTBLMS_ (O), (PP), (B))
ab_op_info *oi;
- if (!(oi = ptable_fetch(ab_op_map, o))) {
- oi = PerlMemShared_malloc(sizeof *oi);
+ if (!(oi = (ab_op_info *)ptable_fetch(ab_op_map, o))) {
+ oi = (ab_op_info *)PerlMemShared_malloc(sizeof *oi);
ptable_map_store(ab_op_map, o, oi);
}
diff --git a/ext/arybase/ptable.h b/ext/arybase/ptable.h
index e492e2fac2..de6d816f27 100644
--- a/ext/arybase/ptable.h
+++ b/ext/arybase/ptable.h
@@ -75,10 +75,10 @@ typedef struct ptable {
#ifndef ptable_new
STATIC ptable *ptable_new(pPTBLMS) {
#define ptable_new() ptable_new(aPTBLMS)
- ptable *t = PerlMemShared_malloc(sizeof *t);
+ ptable *t = (ptable *)PerlMemShared_malloc(sizeof *t);
t->max = 63;
t->items = 0;
- t->ary = PerlMemShared_calloc(t->max + 1, sizeof *t->ary);
+ t->ary = (ptable_ent **)PerlMemShared_calloc(t->max + 1, sizeof *t->ary);
return t;
}
#endif /* !ptable_new */
@@ -121,7 +121,7 @@ STATIC void ptable_split(pPTBLMS_ ptable * const t) {
UV newsize = oldsize * 2;
UV i;
- ary = PerlMemShared_realloc(ary, newsize * sizeof(*ary));
+ ary = (ptable_ent **)PerlMemShared_realloc(ary, newsize * sizeof(*ary));
Zero(&ary[oldsize], newsize - oldsize, sizeof(*ary));
t->max = --newsize;
t->ary = ary;
@@ -153,7 +153,7 @@ STATIC void PTABLE_PREFIX(_store)(pPTBL_ ptable * const t, const void * const ke
ent->val = val;
} else if (val) {
const UV i = PTABLE_HASH(key) & t->max;
- ent = PerlMemShared_malloc(sizeof *ent);
+ ent = (ptable_ent *)PerlMemShared_malloc(sizeof *ent);
ent->key = key;
ent->val = val;
ent->next = t->ary[i];