From: gfx Date: Sat, 9 Jan 2010 08:43:26 +0000 (+0900) Subject: Fix type casts incompatible with c++ (delected by -Wc++compat) X-Git-Tag: 0.46~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1b3644156b3851b66b0ede7cbbd127ce441ccc9a;p=gitmo%2FMouse.git Fix type casts incompatible with c++ (delected by -Wc++compat) --- diff --git a/xs-src/MouseTypeConstraints.xs b/xs-src/MouseTypeConstraints.xs index fb3ab4e..41a1d79 100644 --- a/xs-src/MouseTypeConstraints.xs +++ b/xs-src/MouseTypeConstraints.xs @@ -491,7 +491,7 @@ mouse_tc_generate(pTHX_ const char* const name, check_fptr_t const fptr, SV* con param, /* mg_obj: refcnt will be increased */ PERL_MAGIC_ext, &mouse_util_type_constraints_vtbl, - (void*)fptr, /* mg_ptr */ + (char*)fptr, /* mg_ptr */ 0 /* mg_len: 0 for static data */ ); @@ -507,18 +507,18 @@ mouse_generate_isa_predicate_for(pTHX_ SV* const klass, const char* const predic STRLEN klass_len; const char* klass_pv = SvPV_const(klass, klass_len); SV* param; - void* fptr; + check_fptr_t fptr; klass_pv = mouse_canonicalize_package_name(klass_pv); if(strNE(klass_pv, "UNIVERSAL")){ param = (SV*)gv_stashpvn(klass_pv, klass_len, GV_ADD); - fptr = (void*)mouse_is_an_instance_of; + fptr = (check_fptr_t)mouse_is_an_instance_of; } else{ param = NULL; - fptr = (void*)mouse_is_an_instance_of_universal; + fptr = (check_fptr_t)mouse_is_an_instance_of_universal; } return mouse_tc_generate(aTHX_ predicate_name, fptr, param);