File: typemap

package info (click to toggle)
libperlbal-xs-httpheaders-perl 0.20-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 188 kB
  • sloc: cpp: 500; perl: 110; pascal: 69; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 863 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
TYPEMAP
HTTPHeaders *       HTTPHEADERS_REF
char *              STRINGMAYBEUNDEF

OUTPUT
HTTPHEADERS_REF
                    // used to use "CLASS"
                    sv_setref_pv( $arg, "Perlbal::XS::HTTPHeaders", (void*)$var );
STRINGMAYBEUNDEF
                    warn(\"${Package}::$func_name() -- UNABLE TO RETURN CHAR *\");

INPUT
HTTPHEADERS_REF
                    if (sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG))
                        $var = ($type)SvIV((SV*)SvRV($arg));
                    else {
                        warn(\"${Package}::$func_name() -- $var is not a blessed SV reference\");
                        XSRETURN_UNDEF;
                    }
STRINGMAYBEUNDEF
                    if ($arg == &PL_sv_undef)
                        $var = NULL;
                    else
                        $var = (char *)SvPV_nolen($arg);