if (SvMAGICAL(handle) && (mg = mg_find((SV*)handle, 'q'))) {
if (SvMAGICAL(sv) && (mg = mg_find(sv, 'q'))) {
MP_INLINE int modperl_io_handle_tied(pTHX_ GV *handle, char *classname){    MAGIC *mg;    if (SvMAGICAL(handle) && (mg = mg_find((SV*)handle, 'q'))) {	char *package = HvNAME(SvSTASH((SV*)SvRV(mg->mg_obj)));	if (!strEQ(package, classname)) {	    MP_TRACE_g(MP_FUNC, "%s tied to %s\n", GvNAME(handle), package);	    return TRUE;	}    }    return FALSE;}