Commit | Line | Data |
1f70e1ea |
1 | # typemap for Perl 5 interface to Berkeley |
a0d0e21e |
2 | # |
6ca2e664 |
3 | # written by Paul Marquess <Paul.Marquess@btinternet.com> |
c8e4dba7 |
4 | # last modified 6th June 1999 |
5 | # version 1.67 |
a0d0e21e |
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 |
9fe6733a |
18 | ckFilter($arg, filter_store_key, \"filter_store_key\"); |
88108326 |
19 | if (db->type != DB_RECNO) { |
6b88bc9c |
20 | $var.data = SvPV($arg, PL_na); |
21 | $var.size = (int)PL_na; |
1f70e1ea |
22 | DBT_flags($var); |
a0d0e21e |
23 | } |
88108326 |
24 | else { |
b76802f5 |
25 | Value = GetRecnoKey(aTHX_ db, SvIV($arg)) ; |
a0d0e21e |
26 | $var.data = & Value; |
27 | $var.size = (int)sizeof(recno_t); |
1f70e1ea |
28 | DBT_flags($var); |
a0d0e21e |
29 | } |
30 | T_dbtdatum |
9fe6733a |
31 | ckFilter($arg, filter_store_value, \"filter_store_value\"); |
6b88bc9c |
32 | $var.data = SvPV($arg, PL_na); |
33 | $var.size = (int)PL_na; |
1f70e1ea |
34 | DBT_flags($var); |
a0d0e21e |
35 | |
c8e4dba7 |
36 | |
a0d0e21e |
37 | OUTPUT |
38 | |
39 | T_dbtkeydatum |
40 | OutputKey($arg, $var) |
41 | T_dbtdatum |
42 | OutputValue($arg, $var) |
a6ed719b |
43 | T_PTROBJ |
44 | sv_setref_pv($arg, dbtype, (void*)$var); |