Welcome to the CHICKEN Scheme pasting service

bindings? added by rovar on Sun Mar 18 22:28:13 2012


  (define (leveldb-open)
    (let ((leveldb* ((foreign-lambda
                       (c-pointer (struct "leveldb_t"));; The return type of the C function we're binding:
                       leveldb_open ;; The name of the C function we're binding:
                       (c-pointer (struct "leveldb_options_t")) ;; param 1
                       c-string                                 ;; param 2
                       (c-pointer (c-string)) ;; <--- this one
                       ))))
      (if leveldb*
        (set-finalizer! (make-leveldb leveldb*) leveldb-close)
        (error "The call to leveldb_open failed :("))))





for this C code: 

leveldb_t* leveldb_open(
    const leveldb_options_t* options,
    const char* name,
    char** errptr);

errptr must be null 

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the procedure that returns the car of a cdr?
Visually impaired? Let me spell it for you (wav file) download WAV