This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Opcode.xs: silence compiler warning
[perl5.git] / ext / POSIX / typemap
1 Mode_t                  T_NV
2 pid_t                   T_NV
3 Uid_t                   T_NV
4 Time_t                  T_NV
5 Gid_t                   T_NV
6 Uid_t                   T_NV
7 Off_t                   T_NV
8 Dev_t                   T_NV
9 NV                      T_NV
10 fd                      T_IV
11 speed_t                 T_IV
12 tcflag_t                T_IV
13 cc_t                    T_IV
14 POSIX::SigSet           T_OPAQUEPTROBJ
15 POSIX::Termios          T_OPAQUEPTROBJ
16 POSIX::SigAction        T_HVREF
17
18 INPUT
19 T_OPAQUEPTROBJ
20         {
21             SV * sv = $arg;
22             if (SvROK(sv) && sv_derived_from(sv, \"${ntype}\"))
23                 $var = ($type)SvPV_nolen(SvRV(sv));
24             else
25                 croak(\"%s: %s is not of type %s\",
26                             ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
27                         \"$var\", \"$ntype\");
28         }
29
30 OUTPUT
31 T_OPAQUEPTROBJ
32         sv_setref_pvn($arg, \"${ntype}\", (const char*)$var, sizeof(*$var));