File: typemap

package info (click to toggle)
remctl 3.15-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,224 kB
  • sloc: ansic: 20,027; sh: 5,047; perl: 1,791; java: 740; makefile: 683; xml: 501
file content (33 lines) | stat: -rw-r--r-- 718 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Typemap file for remctl Perl bindings.
#
# Written by Russ Allbery <eagle@eyrie.org>
# Copyright 2007
#     The Board of Trustees of the Leland Stanford Junior University
#
# SPDX-License-Identifier: MIT

TYPEMAP

Net::Remctl             T_PTROBJ_NU
Net::Remctl::Result	T_PTROBJ_NU
Net::Remctl::Output	T_PTROBJ_NU

INPUT

T_PTROBJ_NU
    if ($arg == &PL_sv_undef) {
        $var = NULL;
    } else if (sv_isa($arg, \"${ntype}\")) {
        IV tmp = SvIV((SV *) SvRV($arg));
        $var = INT2PTR($type, tmp);
    } else {
        croak(\"$var is not of type ${ntype}\");
    }

OUTPUT

T_PTROBJ_NU
    if ($var == NULL)
        $arg = &PL_sv_undef;
    else
        sv_setref_pv($arg, \"${ntype}\", (void *) $var);