Use mcall1s() instead of raw perl API
gfx [Sat, 27 Feb 2010 03:05:26 +0000 (12:05 +0900)]
xs-src/Mouse.xs

index e94d476..979fcd3 100644 (file)
@@ -377,18 +377,7 @@ mouse_initialize_metaclass(pTHX_ SV* const klass) {
     SV* meta = get_metaclass(klass);
 
     if(!SvOK(meta)){
-        dSP;
-        PUSHMARK(SP);
-
-        EXTEND(SP, 2);
-        mPUSHp("Mouse::Meta::Class", sizeof("Mouse::Meta::Class")-1);
-        PUSHs(klass);
-        PUTBACK;
-
-        call_method("initialize", G_SCALAR);
-        SPAGAIN;
-        meta = POPs;
-        PUTBACK;
+        meta = mcall1s(newSVpvs_flags("Mouse::Meta::Class", SVs_TEMP), "initialize", klass);
     }
 
     return meta;