This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
DB_File-1.74
[perl5.git] / ext / DB_File / typemap
1 # typemap for Perl 5 interface to Berkeley 
2 #
3 # written by Paul Marquess <Paul.Marquess@btinternet.com>
4 # last modified 10th December 2000
5 # version 1.74
6 #
7 #################################### DB SECTION
8 #
9
10
11 u_int                   T_U_INT
12 DB_File                 T_PTROBJ
13 DBT                     T_dbtdatum
14 DBTKEY                  T_dbtkeydatum
15
16 INPUT
17 T_dbtkeydatum
18         ckFilter($arg, filter_store_key, \"filter_store_key\");
19         DBT_clear($var) ;
20         if (db->type != DB_RECNO) {
21             $var.data = SvPV($arg, PL_na);
22             $var.size = (int)PL_na;
23         }
24         else {
25             Value =  GetRecnoKey(aTHX_ db, SvIV($arg)) ; 
26             $var.data = & Value; 
27             $var.size = (int)sizeof(recno_t);
28         }
29 T_dbtdatum
30         ckFilter($arg, filter_store_value, \"filter_store_value\");
31         DBT_clear($var) ;
32         if (SvOK($arg)) {
33             $var.data = SvPV($arg, PL_na);
34             $var.size = (int)PL_na;
35         }
36
37 OUTPUT
38
39 T_dbtkeydatum
40         OutputKey($arg, $var)
41 T_dbtdatum
42         OutputValue($arg, $var)
43 T_PTROBJ
44         sv_setref_pv($arg, dbtype, (void*)$var);