File: typemap

package info (click to toggle)
perl 5.8.4-8sarge6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 58,128 kB
  • ctags: 31,422
  • sloc: perl: 224,262; ansic: 155,398; sh: 32,253; pascal: 7,747; lisp: 6,121; makefile: 2,341; cpp: 2,035; yacc: 1,019; java: 23
file content (46 lines) | stat: -rw-r--r-- 998 bytes parent folder | download
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
# typemap for Perl 5 interface to Berkeley 
#
# written by Paul Marquess <Paul.Marquess@btinternet.com>
# last modified 10th December 2000
# version 1.74
#
#################################### 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) ;
	if (SvOK($arg)){
	    if (db->type != DB_RECNO) {
	        $var.data = SvPVbyte($arg, PL_na);
	        $var.size = (int)PL_na;
	    }
	    else {
	        Value =  GetRecnoKey(aTHX_ db, SvIV($arg)) ; 
	        $var.data = & Value; 
	        $var.size = (int)sizeof(recno_t);
	    }
	}
T_dbtdatum
	DBM_ckFilter($arg, filter_store_value, \"filter_store_value\");
	DBT_clear($var) ;
	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);