maybe run with cffi on PUC Lua? Untested
This commit is contained in:
parent
9f2da61b88
commit
64312e57fa
|
@ -1,8 +1,5 @@
|
|||
--This file is generated by running the
|
||||
--gencodes.lua
|
||||
--script. If you want to alter this file, it is best
|
||||
--to make the changes in that script and run it again.
|
||||
local ffi = require "ffi"
|
||||
-- works with luajit ffi or https://github.com/q66/cffi-lua
|
||||
local ffi = require "diet-sqlite.ffi"
|
||||
|
||||
return {
|
||||
SQLITE_TRANSIENT = ffi.cast('void(*)(void*)', -1);
|
||||
|
|
5
diet-sqlite/ffi.lua
Normal file
5
diet-sqlite/ffi.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
-- works with luajit ffi or https://github.com/q66/cffi-lua
|
||||
local ok, ffi = pcall(require, "ffi")
|
||||
if not ok then ffi = require "cffi" end
|
||||
|
||||
return ffi
|
|
@ -2,7 +2,7 @@
|
|||
; It is meant to be an _extremely_ thin wrapper around the SQLite API.
|
||||
|
||||
(local sqlffi (require :diet-sqlite.sqlite3_ffi))
|
||||
(local ffi (require :ffi))
|
||||
(local ffi (require :diet-sqlite.ffi))
|
||||
(local util (require :lib.util))
|
||||
(local {: SQLITE_OK : SQLITE_INTEGER : SQLITE_FLOAT : SQLITE_NULL : SQLITE_BLOB : SQLITE_TEXT : SQLITE_TRANSIENT} (require :diet-sqlite.codes))
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
**
|
||||
--]]
|
||||
|
||||
|
||||
local ffi = require "ffi"
|
||||
local ffi = require "diet-sqlite.ffi"
|
||||
|
||||
--[[
|
||||
Created from this version:
|
||||
|
|
Loading…
Reference in a new issue