File: typemap

package info (click to toggle)
db4.3 4.3.29-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 34,368 kB
  • ctags: 26,050
  • sloc: ansic: 111,720; tcl: 39,474; java: 29,503; perl: 11,771; sh: 11,295; cpp: 8,584; makefile: 1,769; awk: 1,312; cs: 457; xml: 114; php: 22; asm: 14
file content (49 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# typemap for Perl 5 interface to Berkeley 
#
# written by Paul Marquess <Paul.Marquess@btinternet.com>
# last modified 20th June 2004
# version 1.809
#
#################################### DB SECTION
#
# 

u_int			T_U_INT
DB_File			T_PTROBJ
DBT			T_dbtdatum
DBTKEY			T_dbtkeydatum

INPUT
T_dbtkeydatum
	DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
	DBT_clear($var) ;
	SvGETMAGIC($arg) ;
        if (db->type == DB_RECNO) {
	    if (SvOK($arg))
	        Value = GetRecnoKey(aTHX_ db, SvIV($arg)) ; 
            else
	        Value = 1 ;
	    $var.data = & Value; 
	    $var.size = (int)sizeof(recno_t);
        }
        else if (SvOK($arg)) {
	    $var.data = SvPVbyte($arg, PL_na);
	    $var.size = (int)PL_na;
	}
T_dbtdatum
	DBM_ckFilter($arg, filter_store_value, \"filter_store_value\");
	DBT_clear($var) ;
	SvGETMAGIC($arg) ;
	if (SvOK($arg)) {
	    $var.data = SvPVbyte($arg, PL_na);
	    $var.size = (int)PL_na;
	}

OUTPUT

T_dbtkeydatum
	OutputKey($arg, $var)
T_dbtdatum
	OutputValue($arg, $var)
T_PTROBJ
        sv_setref_pv($arg, dbtype, (void*)$var);