-# typemap for Perl 5 interface to Berkeley DB
+# typemap for Perl 5 interface to Berkeley
#
-# written by Paul Marquess (pmarquess@bfsec.bt.co.uk)
-# last modified 28th June 1996
-# version 0.2
+# written by Paul Marquess <Paul.Marquess@btinternet.com>
+# last modified 10th December 2000
+# version 1.74
#
#################################### DB SECTION
#
INPUT
T_dbtkeydatum
- if (db->type != DB_RECNO) {
- $var.data = SvPV($arg, na);
- $var.size = (int)na;
- }
- else {
- Value = GetRecnoKey(db, SvIV($arg)) ;
- $var.data = & Value;
- $var.size = (int)sizeof(recno_t);
+ DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
+ DBT_clear($var) ;
+ if (SvOK($arg)){
+ if (db->type != DB_RECNO) {
+ $var.data = SvPV($arg, PL_na);
+ $var.size = (int)PL_na;
+ }
+ else {
+ Value = GetRecnoKey(aTHX_ db, SvIV($arg)) ;
+ $var.data = & Value;
+ $var.size = (int)sizeof(recno_t);
+ }
}
T_dbtdatum
- $var.data = SvPV($arg, na);
- $var.size = (int)na;
+ DBM_ckFilter($arg, filter_store_value, \"filter_store_value\");
+ DBT_clear($var) ;
+ if (SvOK($arg)) {
+ $var.data = SvPV($arg, PL_na);
+ $var.size = (int)PL_na;
+ }
OUTPUT