ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/staticperl/perl/ext/Thread/typemap
Revision: 1.1
Committed: Thu Jun 30 14:27:05 2005 UTC (21 years, 4 months ago) by root
Branch: MAIN
CVS Tags: PERL-5-8-7, HEAD
Branch point for: PERL
Log Message:
*** empty log message ***

File Contents

# Content
1 Thread T_XSCPTR
2
3 INPUT
4 T_XSCPTR
5 STMT_START {
6 MAGIC *mg;
7 SV *sv = ($arg);
8
9 if (!sv_isobject(sv))
10 croak(\"$var is not an object\");
11 sv = (SV*)SvRV(sv);
12 if (!SvRMAGICAL(sv) || !(mg = mg_find(sv, '~'))
13 || mg->mg_private != ${ntype}_MAGIC_SIGNATURE)
14 croak(\"XSUB ${func_name}: $var is a forged ${ntype} object\");
15 $var = ($type) SvPVX(mg->mg_obj);
16 DEBUG_S(PerlIO_printf(Perl_debug_log,
17 \"XSUB ${func_name}: %p\\n\", $var));
18 } STMT_END
19 T_IVREF
20 if (SvROK($arg))
21 $var = ($type) SvIV((SV*)SvRV($arg));
22 else
23 croak(\"$var is not a reference\")
24