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 34 35 36 37 38 39 40 41
|
# Typemap file for the Perl bindings to the WebAuth library.
#
# Written by Roland Schemers and Russ Allbery <eagle@eyrie.org>
# Copyright 2003, 2005, 2009, 2011, 2012
# The Board of Trustees of the Leland Stanford Junior University
#
# See LICENSE for licensing terms.
TYPEMAP
enum webauth_key_type T_IV
enum webauth_key_size T_IV
enum webauth_key_usage T_IV
enum webauth_krb5_canon T_IV
const unsigned char * T_PV
WebAuth T_PTROBJ_NU
WebAuth::Key T_PTROBJ_NU
WebAuth::Keyring T_PTROBJ_NU
WebAuth::KeyringEntry T_PTROBJ_NU
WebAuth::Krb5 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);
|