This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
POSIX: Check signal numbers against negatives.
[perl5.git] / ext / POSIX / typemap
CommitLineData
a0d0e21e 1Mode_t T_NV
86200d5c 2pid_t T_NV
a0d0e21e
LW
3Uid_t T_NV
4Time_t T_NV
5Gid_t T_NV
a043a685 6Uid_t T_NV
a0d0e21e 7Off_t T_NV
14a3f258 8Dev_t T_NV
e1ca407b 9NV T_NV
a0d0e21e
LW
10fd T_IV
11speed_t T_IV
12tcflag_t T_IV
13cc_t T_IV
92b39396 14POSIX::SigSet T_OPAQUEPTROBJ
11a39fe4 15POSIX::Termios T_OPAQUEPTROBJ
a0d0e21e 16POSIX::SigAction T_HVREF
69b5fd06 17POSIX::SigNo T_SIGNO
11a39fe4
NC
18
19INPUT
20T_OPAQUEPTROBJ
42c07143
DD
21 {
22 SV * sv = $arg;
23 if (SvROK(sv) && sv_derived_from(sv, \"${ntype}\"))
24 $var = ($type)SvPV_nolen(SvRV(sv));
25 else
26 croak(\"%s: %s is not of type %s\",
27 ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
28 \"$var\", \"$ntype\");
11a39fe4 29 }
11a39fe4 30
69b5fd06
JH
31T_SIGNO
32 if ((sig = SvIV($arg)) < 0) {
33 croak(\"%s: Negative signals are not allowed %d\",
34 ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
35 sig);
36 }
37
11a39fe4
NC
38OUTPUT
39T_OPAQUEPTROBJ
40 sv_setref_pvn($arg, \"${ntype}\", (const char*)$var, sizeof(*$var));