blob: 52a0a27b6dee34702336fa4af28b5ed25f87915b (
plain) (
tree)
|
|
;; No package, this is for eisl
(c-include "<ndbm.h>")
(defclass <dbm> () (db :accessor db))
(defgeneric clearerr (self))
(defmethod clearerr ((self <dbm>))
(flet ((clearerr-h (db)
(c-lang "dbm_clearerr(DB);")))
(clearerr-h (db self))))
(defgeneric close (self))
(defgeneric delete (self key))
(defgeneric open (self openflags))
(defmethod open ((self <dbm>) file openflags)
(flet ((open-h (file openflags)
(c-lang "res = dbm_open(FILE, OPENFLAGS, MODE);")))
(setf (db self) (open-h file openflags))))
(defgeneric create (self openflags modes))
(defmethod create ((self <dbm>) file openflags modes)
(flet ((open-h (file openflags modes)
(c-lang "res = dbm_open(FILE, OPENFLAGS, MODE);")))
(setf (db self) (open-h file openflags modes))))
|