mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-27 15:16:05 +00:00
deploy: c9076c6550efbdf8ee5ec54da5384d1b7cd90ce7
This commit is contained in:
parent
c5176938c0
commit
435f09ce4b
@ -2,7 +2,7 @@
|
||||
|
||||
# libtool - Provide generalized library-building support services.
|
||||
# Generated automatically by config.status (libbacktrace) version-unused
|
||||
# Libtool was configured on host fv-az212-476:
|
||||
# Libtool was configured on host fv-az397-204:
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
#
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||
|
37
vendor/nim-sqlite3-abi/sqlite3_abi.nim
vendored
37
vendor/nim-sqlite3-abi/sqlite3_abi.nim
vendored
@ -4,27 +4,20 @@
|
||||
import sqlite3_gen
|
||||
export sqlite3_gen
|
||||
|
||||
proc sqlite3_bind_blob*(pstmt: ptr sqlite3_stmt, param: cint, value: pointer, n: cint, dispose: proc (v: pointer) {.cdecl.}): cint {.importc, cdecl.}
|
||||
|
||||
proc sqlite3_create_function*(
|
||||
db: ptr sqlite3,
|
||||
functionName: cstring,
|
||||
nArgs: cint,
|
||||
eTextRep: cint,
|
||||
pApp: pointer,
|
||||
xFunc: proc(ctx: ptr sqlite3_context, n: cint, v: ptr ptr sqlite3_value) {.cdecl.},
|
||||
xStep: proc(ctx: ptr sqlite3_context, n: cint, v: ptr ptr sqlite3_value) {.cdecl.},
|
||||
xFinal: proc(ctx: ptr sqlite3_context) {.cdecl.}
|
||||
): cint {.importc, cdecl.}
|
||||
|
||||
proc sqlite3_result_blob*(
|
||||
ctx: ptr sqlite3_context,
|
||||
bytes: pointer,
|
||||
n: cint,
|
||||
dispose: proc (v: pointer) {.cdecl.}
|
||||
) {.importc, cdecl.}
|
||||
|
||||
# constant which corresponds to SQLITE_TRANSIENT flag. Instructs sqlite to copy
|
||||
# data pointed by sqlite3_result_blob.bytes pointer. Then sqlite is reponsible
|
||||
# for deallocating this copied memory.
|
||||
# /*
|
||||
# ** CAPI3REF: Constants Defining Special Destructor Behavior
|
||||
# **
|
||||
# ** These are special values for the destructor that is passed in as the
|
||||
# ** final argument to routines like [sqlite3_result_blob()]. ^If the destructor
|
||||
# ** argument is SQLITE_STATIC, it means that the content pointer is constant
|
||||
# ** and will never change. It does not need to be destroyed. ^The
|
||||
# ** SQLITE_TRANSIENT value means that the content will likely change in
|
||||
# ** the near future and that SQLite should make its own private copy of
|
||||
# ** the content before returning.
|
||||
# **
|
||||
# ** The typedef is necessary to work around problems in certain
|
||||
# ** C++ compilers.
|
||||
# */
|
||||
const SQLITE_STATIC* = cast[sqlite3_destructor_type](0)
|
||||
const SQLITE_TRANSIENT* = cast[sqlite3_destructor_type](-1)
|
||||
|
16486
vendor/nim-sqlite3-abi/sqlite3_gen.nim
vendored
16486
vendor/nim-sqlite3-abi/sqlite3_gen.nim
vendored
File diff suppressed because it is too large
Load Diff
10
vendor/nim-sqlite3-abi/update.sh
vendored
10
vendor/nim-sqlite3-abi/update.sh
vendored
@ -13,16 +13,12 @@ ZIP="sqlite-amalgamation-$VER_INT.zip"
|
||||
|
||||
unzip -jo $ZIP "sqlite-amalgamation-$VER_INT/sqlite3.c" "sqlite-amalgamation-$VER_INT/sqlite3.h"
|
||||
|
||||
[[ -v HAS_NIMTEROP ]] || nimble install -y nimterop@0.4.4
|
||||
[[ -v HAS_NIMTEROP ]] || nimble install -y nimterop@0.6.13
|
||||
|
||||
nim c --verbosity:0 --hints:off wrap.nim > sqlite3_gen.nim
|
||||
nim c --verbosity:0 --hints:off wrap.nim
|
||||
./wrap
|
||||
|
||||
# TODO upstream is working on removing these
|
||||
|
||||
sed -i \
|
||||
-e 's|^import nimterop/types||' \
|
||||
-e 's|, header: headersqlite3||' \
|
||||
-e 's|impsqlite3, incompleteStruct|incompleteStruct|' \
|
||||
-e "s|cdecl|cdecl, raises: [Defect]|g" \
|
||||
-e "s|$PWD/||" \
|
||||
sqlite3_gen.nim
|
||||
|
14
vendor/nim-sqlite3-abi/wrap.nim
vendored
14
vendor/nim-sqlite3-abi/wrap.nim
vendored
@ -1,8 +1,6 @@
|
||||
import nimterop/cimport
|
||||
|
||||
static:
|
||||
cDebug()
|
||||
|
||||
# uses va_list which is undefined
|
||||
cSkipSymbol(@[
|
||||
# uses va_list which is undefined
|
||||
@ -14,8 +12,15 @@ static:
|
||||
"sqlite_uint64",
|
||||
"sqlite3_int64",
|
||||
"sqlite3_uint64",
|
||||
# Code reording problems
|
||||
"SQLITE_STATIC",
|
||||
# cchar problem
|
||||
"sqlite3_version"
|
||||
])
|
||||
|
||||
cOverride:
|
||||
type sqlite3_index_info* {.importc, bycopy, incompleteStruct.} = object
|
||||
|
||||
cPlugin:
|
||||
import strutils
|
||||
|
||||
@ -25,10 +30,11 @@ cPlugin:
|
||||
of "sqlite_int64", "sqlite3_int64": sym.name = "int64"
|
||||
of "sqlite_uint64", "sqlite3_uint64": sym.name = "uint64"
|
||||
|
||||
cImport("sqlite3.h")
|
||||
|
||||
cCompile("sqlite3.c")
|
||||
|
||||
cImport("sqlite3.h", flags="-H", nimfile="sqlite3_gen.nim")
|
||||
|
||||
|
||||
{.passL: "-lpthread".}
|
||||
|
||||
echo sqlite3_libversion()
|
||||
|
Loading…
x
Reference in New Issue
Block a user