Commit | Line | Data |
1f70e1ea |
1 | # typemap for Perl 5 interface to Berkeley |
a0d0e21e |
2 | # |
6ca2e664 |
3 | # written by Paul Marquess <Paul.Marquess@btinternet.com> |
3245f058 |
4 | # last modified 10th December 2000 |
5 | # version 1.74 |
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\"); |
039d031f |
19 | DBT_clear($var) ; |
88108326 |
20 | if (db->type != DB_RECNO) { |
6b88bc9c |
21 | $var.data = SvPV($arg, PL_na); |
22 | $var.size = (int)PL_na; |
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); |
28 | } |
29 | T_dbtdatum |
9fe6733a |
30 | ckFilter($arg, filter_store_value, \"filter_store_value\"); |
039d031f |
31 | DBT_clear($var) ; |
cbc5248d |
32 | if (SvOK($arg)) { |
33 | $var.data = SvPV($arg, PL_na); |
34 | $var.size = (int)PL_na; |
35 | } |
a0d0e21e |
36 | |
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); |