diff options
author | Larry Wall <larry@netlabs.com> | 1993-11-10 00:00:00 +0000 |
---|---|---|
committer | Larry Wall <larry@netlabs.com> | 1993-11-10 00:00:00 +0000 |
commit | 463ee0b2acbd047c27e8b5393cdd8398881824c5 (patch) | |
tree | ae17d9179fc861ae5fc5a86da9139631530cb6fe /ext/dbm/GDBM_File.xs | |
parent | 93a17b20b6d176db3f04f51a63b0a781e5ffd11c (diff) | |
download | perl-463ee0b2acbd047c27e8b5393cdd8398881824c5.tar.gz |
perl 5.0 alpha 4
[editor's note: the sparc executables have not been included, and
emacs backup files have been removed. This was reconstructed from a
tarball found on the September 1994 InfoMagic CD; the date of this is
approximate]
Diffstat (limited to 'ext/dbm/GDBM_File.xs')
-rw-r--r-- | ext/dbm/GDBM_File.xs | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/ext/dbm/GDBM_File.xs b/ext/dbm/GDBM_File.xs new file mode 100644 index 0000000000..2c619cbe42 --- /dev/null +++ b/ext/dbm/GDBM_File.xs @@ -0,0 +1,76 @@ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" +#include <gdbm.h> + +#include <fcntl.h> + +typedef GDBM_FILE GDBM_File; + +#define gdbm_new(dbtype, name, block_size, read_write, mode, fatal_func) \ + gdbm_open(name, block_size, read_write, mode, fatal_func) + +typedef datum gdatum; + +typedef void (*FATALFUNC)(); + +MODULE = GDBM_File PACKAGE = GDBM_File PREFIX = gdbm_ + +GDBM_File +gdbm_new(dbtype, name, block_size, read_write, mode, fatal_func = (FATALFUNC)croak) + char * dbtype + char * name + int block_size + int read_write + int mode + FATALFUNC fatal_func + +GDBM_File +gdbm_open(name, block_size, read_write, mode, fatal_func = (FATALFUNC)croak) + char * name + int block_size + int read_write + int mode + FATALFUNC fatal_func + +void +gdbm_close(db) + GDBM_File db + CLEANUP: + +void +gdbm_DESTROY(db) + GDBM_File db + CODE: + gdbm_close(db); + +gdatum +gdbm_fetch(db, key) + GDBM_File db + datum key + +int +gdbm_store(db, key, value, flags = GDBM_REPLACE) + GDBM_File db + datum key + datum value + int flags + +int +gdbm_delete(db, key) + GDBM_File db + datum key + +gdatum +gdbm_firstkey(db) + GDBM_File db + +gdatum +gdbm_nextkey(db, key) + GDBM_File db + datum key + +int +gdbm_reorganize(db) + GDBM_File db + |