mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-06 13:48:55 -04:00
patch from VOVKASM 4: (new) fixed HV typemap
This commit is contained in:
parent
a73d60adaa
commit
f74f7e821d
1 changed files with 21 additions and 0 deletions
21
typemap
Normal file
21
typemap
Normal file
|
@ -0,0 +1,21 @@
|
|||
HV * T_HVREF_REFCOUNT_FIXED
|
||||
|
||||
INPUT
|
||||
T_HVREF_REFCOUNT_FIXED
|
||||
STMT_START {
|
||||
SV* const xsub_tmp_sv = $arg;
|
||||
SvGETMAGIC(xsub_tmp_sv);
|
||||
if (SvROK(xsub_tmp_sv) && SvTYPE(SvRV(xsub_tmp_sv)) == SVt_PVHV){
|
||||
$var = (HV*)SvRV(xsub_tmp_sv);
|
||||
}
|
||||
else{
|
||||
Perl_croak(aTHX_ \"%s: %s is not a HASH reference\",
|
||||
${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
|
||||
\"$var\");
|
||||
}
|
||||
} STMT_END
|
||||
|
||||
OUTPUT
|
||||
T_HVREF_REFCOUNT_FIXED
|
||||
$arg = newRV_noinc((SV*)$var);
|
||||
|
Loading…
Add table
Reference in a new issue