Fix an error
gfx [Sat, 27 Feb 2010 07:17:30 +0000 (16:17 +0900)]
xs-src/MouseAccessor.xs

index ca0bb90..fd4cf68 100644 (file)
@@ -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