X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FODBM_File%2Ftypemap;h=4f4802cfa5790a1569d438fd9c0b351f00e69d16;hb=3c83a670ef5b88bf7bcdc0857c28022b13bf2106;hp=5e12e739338d9094ea78caf2e65d096652715152;hpb=6b88bc9c1f6d4b32c70e7ef68f8c65266e431623;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/ODBM_File/typemap b/ext/ODBM_File/typemap index 5e12e73..4f4802c 100644 --- a/ext/ODBM_File/typemap +++ b/ext/ODBM_File/typemap @@ -2,7 +2,9 @@ #################################### DBM SECTION # -datum T_DATUM +datum_key T_DATUM_K +datum_key_copy T_DATUM_K_C +datum_value T_DATUM_V gdatum T_GDATUM NDBM_File T_PTROBJ GDBM_File T_PTROBJ @@ -13,13 +15,40 @@ DBZ_File T_PTROBJ FATALFUNC T_OPAQUEPTR INPUT -T_DATUM +T_DATUM_K + DBM_ckFilter($arg, filter_store_key, \"filter_store_key\"); $var.dptr = SvPV($arg, PL_na); $var.dsize = (int)PL_na; +T_DATUM_K_C + { + SV * tmpSV ; + if (db->filter_store_key){ + tmpSV = sv_2mortal(newSVsv($arg)); + DBM_ckFilter(tmpSV, filter_store_key, \"filter_store_key\"); + } + else + tmpSV = $arg; + $var.dptr = SvPV(tmpSV, PL_na); + $var.dsize = (int)PL_na; + } +T_DATUM_V + DBM_ckFilter($arg, filter_store_value, \"filter_store_value\"); + if (SvOK($arg)) { + $var.dptr = SvPV($arg, PL_na); + $var.dsize = (int)PL_na; + } + else { + $var.dptr = \"\"; + $var.dsize = 0; + } T_GDATUM UNIMPLEMENTED OUTPUT -T_DATUM +T_DATUM_K sv_setpvn($arg, $var.dptr, $var.dsize); + DBM_ckFilter($arg, filter_fetch_key,\"filter_fetch_key\"); +T_DATUM_V + sv_setpvn($arg, $var.dptr, $var.dsize); + DBM_ckFilter($arg, filter_fetch_value,\"filter_fetch_value\"); T_GDATUM sv_usepvn($arg, $var.dptr, $var.dsize);