#define CHECK_INSTANCE(instance) STMT_START{ \
if(!(SvROK(instance) && SvTYPE(SvRV(instance)) == SVt_PVHV)){ \
- croak("Invalid object for instance managers"); \
+ croak("Invalid object instance"); \
} \
} STMT_END
* before calling methods, so SvGETMAGIC(self) is not necessarily needed here.
*/
- self = ST(0);
- if(!IsObject(self)){
- croak("Cant call %s as a class method", GvNAME(CvGV(cv)));
- }
- return self;
+ return ST(0);
}
XSRETURN(1);
}
-/* simple instance slot accessor */
+/* simple instance slot accessor (or Mouse::Meta::Instance) */
SV*
mouse_instance_create(pTHX_ HV* const stash) {