From: gfx Date: Sat, 27 Feb 2010 07:17:30 +0000 (+0900) Subject: Fix an error X-Git-Tag: 0.50_05~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=73d8d597ca6a3ba5d79fde6b9be8e497dbae4bb8;p=gitmo%2FMouse.git Fix an error --- diff --git a/xs-src/MouseAccessor.xs b/xs-src/MouseAccessor.xs index ca0bb90..fd4cf68 100644 --- a/xs-src/MouseAccessor.xs +++ b/xs-src/MouseAccessor.xs @@ -1,9 +1,9 @@ #include "mouse.h" -#define CHECK_INSTANCE(instance) STMT_START{ \ - if(!IsHashRef(instance)){ \ - croak("Invalid object instance"); \ - } \ +#define CHECK_INSTANCE(instance) STMT_START{ \ + if(!(SvROK(instance) && SvTYPE(SvRV(instance)) == SVt_PVHV)){ \ + croak("Invalid object instance"); \ + } \ } STMT_END