Use IsObject()
gfx [Sun, 6 Sep 2009 08:58:17 +0000 (17:58 +0900)]
xs/MOP.xs

index c4af174..e7b5a5b 100644 (file)
--- a/xs/MOP.xs
+++ b/xs/MOP.xs
@@ -23,7 +23,7 @@ mop_is_instance_of(pTHX_ SV* const sv, SV* const klass){
     assert(sv);
     assert(klass);
 
-    if(SvROK(sv) && SvOBJECT(SvRV(sv)) && SvOK(klass)){
+    if(IsObject(sv) && SvOK(klass)){
         bool ok;
 
         ENTER;