From c37f372990d9edddd859e9b999eb38151ce33cf8 Mon Sep 17 00:00:00 2001 From: Detlev Zundel Date: Mon, 4 Apr 2011 18:09:06 +0200 Subject: [PATCH 4/4] Fix sqlite-bind. - sqlite-transient needs to be a pointer - fix typo for string case --- sqlite3.scm | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sqlite3.scm b/sqlite3.scm index 9e48ff5..97550b4 100644 --- a/sqlite3.scm +++ b/sqlite3.scm @@ -290,7 +290,8 @@ int (dynamic-func "sqlite3_bind_null" libsqlite3) (list '* int))) - (sqlite-transient (make-bytevector (sizeof '*) #xff))) + (sqlite-transient (bytevector->pointer + (make-bytevector (sizeof '*) #xff)))) (lambda (stmt key val) (assert-live-stmt! stmt) (let ((idx (key->index stmt key)) @@ -300,7 +301,7 @@ (bind-blob p idx (bytevector->pointer val) (bytevector-length val) sqlite-transient)) ((string? val) - (let ((bv ((string->utf8 val)))) + (let ((bv (string->utf8 val))) (bind-text p idx (bytevector->pointer bv) (bytevector-length bv) sqlite-transient))) ((and (integer? val) (exact? val)) -- 1.7.4.1