This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
The first big import towards 5.8.1, @18078. Please do NOT
[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         DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
19         DBT_clear($var) ;
20         if (SvOK($arg)){
21             if (db->type != DB_RECNO) {
22                 $var.data = SvPV($arg, PL_na);
23                 $var.size = (int)PL_na;
24             }
25             else {
26                 Value =  GetRecnoKey(aTHX_ db, SvIV($arg)) ; 
27                 $var.data = & Value; 
28                 $var.size = (int)sizeof(recno_t);
29             }
30         }
31 T_dbtdatum
32         DBM_ckFilter($arg, filter_store_value, \"filter_store_value\");
33         DBT_clear($var) ;
34         if (SvOK($arg)) {
35             $var.data = SvPV($arg, PL_na);
36             $var.size = (int)PL_na;
37         }
38
39 OUTPUT
40
41 T_dbtkeydatum
42         OutputKey($arg, $var)
43 T_dbtdatum
44         OutputValue($arg, $var)
45 T_PTROBJ
46         sv_setref_pv($arg, dbtype, (void*)$var);