aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/DNS-LDNS/typemap
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/DNS-LDNS/typemap')
-rw-r--r--contrib/DNS-LDNS/typemap6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/DNS-LDNS/typemap b/contrib/DNS-LDNS/typemap
index 568404bbb472..7bafc613e022 100644
--- a/contrib/DNS-LDNS/typemap
+++ b/contrib/DNS-LDNS/typemap
@@ -46,7 +46,7 @@ LDNS_GENERIC_STRUCT_OPT
$var = INT2PTR($type, tmp);
}
else
- croak(\"$var is not of type ${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\")
+ croak(\"$var is not of type ${(my $ntt=$ntype)=~s/__/::/g;$ntt=~s/::Opt$//;\$ntt}\")
INPUT
LDNS_GENERIC_STRUCT
@@ -62,6 +62,10 @@ LDNS_GENERIC_STRUCT
sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\", (void*)$var);
OUTPUT
+LDNS_GENERIC_STRUCT_OPT
+ sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/__/::/g;$ntt=~s/::Opt$//;\$ntt}\", (void*)$var);
+
+OUTPUT
Mortal_PV
sv_setsv($arg, sv_2mortal(newSVpv($var, 0)));
free((void *)$var);