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 | |
---|
8 | TYPEMAP |
---|
9 | |
---|
10 | Net::Remctl T_PTROBJ_NU |
---|
11 | Net::Remctl::Result T_PTROBJ_NU |
---|
12 | Net::Remctl::Output T_PTROBJ_NU |
---|
13 | |
---|
14 | INPUT |
---|
15 | |
---|
16 | T_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 | |
---|
26 | OUTPUT |
---|
27 | |
---|
28 | T_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.