-# 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 23rd June 1994
-# version 0.1
+# last modified 9th Sept 1997
+# version 1.53
#
#################################### DB SECTION
#
INPUT
T_dbtkeydatum
- if (db->close != DB_recno_close)
- {
+ if (db->type != DB_RECNO) {
$var.data = SvPV($arg, na);
$var.size = (int)na;
+ DBT_flags($var);
}
- else
- {
- Value = SvIV($arg) ;
- ++ Value ;
+ else {
+ Value = GetRecnoKey(db, SvIV($arg)) ;
$var.data = & Value;
$var.size = (int)sizeof(recno_t);
+ DBT_flags($var);
}
T_dbtdatum
$var.data = SvPV($arg, na);
$var.size = (int)na;
+ DBT_flags($var);
OUTPUT
OutputKey($arg, $var)
T_dbtdatum
OutputValue($arg, $var)
+T_PTROBJ
+ sv_setref_pv($arg, dbtype, (void*)$var);