This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.0 alpha 5
[perl5.git] / ext / dbm / SDBM_File.xs
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4 #include "ext/dbm/sdbm/sdbm.h"
5
6 typedef DBM* SDBM_File;
7 #define sdbm_new(dbtype,filename,flags,mode) sdbm_open(filename,flags,mode)
8 #define nextkey(db,key) sdbm_nextkey(db)
9
10 MODULE = SDBM_File      PACKAGE = SDBM_File     PREFIX = sdbm_
11
12 SDBM_File
13 sdbm_new(dbtype, filename, flags, mode)
14         char *          dbtype
15         char *          filename
16         int             flags
17         int             mode
18
19 void
20 sdbm_DESTROY(db)
21         SDBM_File       db
22         CODE:
23         sdbm_close(db);
24
25 datum
26 sdbm_fetch(db, key)
27         SDBM_File       db
28         datum           key
29
30 int
31 sdbm_store(db, key, value, flags = DBM_REPLACE)
32         SDBM_File       db
33         datum           key
34         datum           value
35         int             flags
36
37 int
38 sdbm_delete(db, key)
39         SDBM_File       db
40         datum           key
41
42 datum
43 sdbm_firstkey(db)
44         SDBM_File       db
45
46 datum
47 nextkey(db, key)
48         SDBM_File       db
49         datum           key
50
51 int
52 sdbm_error(db)
53         SDBM_File       db
54
55 int
56 sdbm_clearerr(db)
57         SDBM_File       db
58