File: typemap

package info (click to toggle)
libpackage-stash-xs-perl 0.29-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 612 kB
  • sloc: perl: 2,221; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 484 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
TYPEMAP
varspec_t	T_VARSPEC
vartype_t	T_VARTYPE

INPUT
T_VARSPEC
    if (SvPOK($arg))
        _deconstruct_variable_name($arg, &$var);
    else if (SvROK($arg) && SvTYPE(SvRV($arg)) == SVt_PVHV)
        _deconstruct_variable_hash((HV*)SvRV($arg), &$var);
    else
        croak(\"varspec must be a string or a hashref\");
    _check_varspec_is_valid(&$var);

T_VARTYPE
    if (!SvPOK($arg))
        croak(\"vartype must be a string\");
    $var = string_to_vartype(SvPV_nolen($arg));