source: web/old/remctl-2.14/perl/typemap @ f6f3e91

web
Last change on this file since f6f3e91 was f6f3e91, checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago

Preserve directory hierarchy (not sure what happened to it)

  • Property mode set to 100644
File size: 730 bytes
Line 
1# Typemap file for the Perl bindings to the remctl client library.
2#
3# Written by Russ Allbery <rra@stanford.edu>
4# Copyright 2007 Board of Trustees, Leland Stanford Jr. University
5#
6# See LICENSE for licensing terms.
7
8TYPEMAP
9
10Net::Remctl             T_PTROBJ_NU
11Net::Remctl::Result     T_PTROBJ_NU
12Net::Remctl::Output     T_PTROBJ_NU
13
14INPUT
15
16T_PTROBJ_NU
17    if ($arg == &PL_sv_undef) {
18        $var = NULL;
19    } else if (sv_isa($arg, \"${ntype}\")) {
20        IV tmp = SvIV((SV *) SvRV($arg));
21        $var = INT2PTR($type, tmp);
22    } else {
23        croak(\"$var is not of type ${ntype}\");
24    }
25
26OUTPUT
27
28T_PTROBJ_NU
29    if ($var == NULL)
30        $arg = &PL_sv_undef;
31    else
32        sv_setref_pv($arg, \"${ntype}\", (void *) $var);
Note: See TracBrowser for help on using the repository browser.