8000 Unable to emit constant values from sqlite3.h · Issue #9 · borodust/claw · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Unable to emit constant values from sqlite3.h #9
Open
@jxonas

Description

@jxonas

I'm wrapping SQLite and at first glance everything went well except for:

// The typedef is necessary to work around problems in certain  C++ compilers.
typedef void (*sqlite3_destructor_type)(void*);
#define SQLITE_STATIC      ((sqlite3_destructor_type)0)
#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)

They were translated to nil instead of a value:

(defparameter %sqlite::+static+ nil)
(defparameter %sqlite::+transient+ nil)

Is it possible to set this up so the values are computed?

Wrapper definition (from https://github.com/Hickory-DMTools/Hickory-SQLite):

(claw:defwrapper (:hickory-sqlite
                  (:system :hickory-sqlite/wrapper)
                  (:headers "sqlite3.h")
                  (:includes :sqlite-includes)
                  (:targets ((:and :x86-64 :linux) "x86_64-pc-linux-gnu")
                            ((:and :x86-64 :windows) "x86_64-w64-mingw32")
                            ((:and :x86-64 :darwin) "x86_64-apple-darwin-gnu"))
                  (:include-extra-values)
                  (:include-definitions "^SQLITE\\w+" "^sqlite3_\\w+")
                  (:persistent t :depends-on ()))
  :in-package :%sqlite
  :recognize-strings t
  :inline-functions nil
  :symbolicate-names (:in-pipeline
                      (:by-removing-prefixes "SQLITE_" "sqlite3_")))

I'm using SBCL 2.2.2 on a Mac. Tried with CCL 1.12.1 and got the same results.

Thanks for the awesome work, by the way!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0