projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9252: Implement new SQL-QUERY-OBJECT class and change behavior of [select 'class]
[clsql.git]
/
db-sqlite
/
sqlite-api-uffi.lisp
diff --git
a/db-sqlite/sqlite-api-uffi.lisp
b/db-sqlite/sqlite-api-uffi.lisp
index 73a12eb107e81c2d8e6b05084dab61134d38fb17..39f064a59d791916b487f947e5f246c2fbf0f993 100644
(file)
--- a/
db-sqlite/sqlite-api-uffi.lisp
+++ b/
db-sqlite/sqlite-api-uffi.lisp
@@
-10,6
+10,7
@@
;;;; $Id$
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2003 by Aurelio Bignoli
;;;; $Id$
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2003 by Aurelio Bignoli
+;;;; and Copyright (c) 2003-2004 by Kevin Rosenberg
;;;;
;;;; CLSQL users are granted the rights to distribute and use this software
;;;; as governed by the terms of the Lisp Lesser GNU Public License
;;;;
;;;; CLSQL users are granted the rights to distribute and use this software
;;;; as governed by the terms of the Lisp Lesser GNU Public License
@@
-93,10
+94,10
@@
;;;;
;;;; Foreign types definitions.
;;;;
;;;;
;;;; Foreign types definitions.
;;;;
-(def-foreign-type errmsg (* :char))
+(def-foreign-type errmsg (* :
unsigned-
char))
(def-foreign-type sqlite-db :pointer-void)
(def-foreign-type sqlite-vm :pointer-void)
(def-foreign-type sqlite-db :pointer-void)
(def-foreign-type sqlite-vm :pointer-void)
-(def-foreign-type string-pointer (* (* :char)))
+(def-foreign-type string-pointer (* (* :
unsigned-
char)))
(def-foreign-type sqlite-row-pointer (* string-pointer))
(defvar +null-errmsg-pointer+ (make-null-pointer 'errmsg))
(def-foreign-type sqlite-row-pointer (* string-pointer))
(defvar +null-errmsg-pointer+ (make-null-pointer 'errmsg))
@@
-152,7
+153,7
@@
("sqlite_compile" %compile)
((db sqlite-db)
(sql :cstring)
("sqlite_compile" %compile)
((db sqlite-db)
(sql :cstring)
- (sql-tail (* (* :char)))
+ (sql-tail (* (* :
unsigned-
char)))
(vm (* sqlite-vm))
(error-message (* errmsg)))
:returning :int)
(vm (* sqlite-vm))
(error-message (* errmsg)))
:returning :int)
@@
-162,8
+163,8
@@
("sqlite_step" %step)
((vm sqlite-vm)
(cols-n (* :int))
("sqlite_step" %step)
((vm sqlite-vm)
(cols-n (* :int))
- (cols (* (* (* :char))))
- (col-names (* (* (* :char)))))
+ (cols (* (* (* :
unsigned-
char))))
+ (col-names (* (* (* :
unsigned-
char)))))
:returning :int)
(declaim (inline %finalize))
:returning :int)
(declaim (inline %finalize))
@@
-188,7
+189,7
@@
("sqlite_get_table" %get-table)
((db sqlite-db)
(sql :cstring)
("sqlite_get_table" %get-table)
((db sqlite-db)
(sql :cstring)
- (result (* (* (* :char))))
+ (result (* (* (* :
unsigned-
char))))
(rows-n (* :int))
(cols-n (* :int))
(error-message (* errmsg)))
(rows-n (* :int))
(cols-n (* :int))
(error-message (* errmsg)))
@@
-229,7
+230,7
@@
(defun sqlite-compile (db sql)
(with-cstring (sql-native sql)
(let ((vm (allocate-foreign-object 'sqlite-vm)))
(defun sqlite-compile (db sql)
(with-cstring (sql-native sql)
(let ((vm (allocate-foreign-object 'sqlite-vm)))
- (with-foreign-object (sql-tail '(* :char))
+ (with-foreign-object (sql-tail '(* :
unsigned-
char))
(let ((result (%compile db sql-native sql-tail vm +null-errmsg-pointer+)))
(if (= result SQLITE-OK)
vm
(let ((result (%compile db sql-native sql-tail vm +null-errmsg-pointer+)))
(if (= result SQLITE-OK)
vm
@@
-240,8
+241,8
@@
(defun sqlite-step (vm)
(declare (type sqlite-vm-pointer vm))
(with-foreign-object (cols-n :int)
(defun sqlite-step (vm)
(declare (type sqlite-vm-pointer vm))
(with-foreign-object (cols-n :int)
- (let ((cols (allocate-foreign-object '(* (* :char))))
- (col-names (allocate-foreign-object '(* (* :char)))))
+ (let ((cols (allocate-foreign-object '(* (* :
unsigned-
char))))
+ (col-names (allocate-foreign-object '(* (* :
unsigned-
char)))))
(declare (type sqlite-row-pointer-type cols col-names))
(let ((result (%step (deref-pointer vm 'sqlite-vm)
cols-n cols col-names)))
(declare (type sqlite-row-pointer-type cols col-names))
(let ((result (%step (deref-pointer vm 'sqlite-vm)
cols-n cols col-names)))
@@
-270,7
+271,7
@@
(defun sqlite-get-table (db sql)
(declare (type sqlite-db-type db))
(with-cstring (sql-native sql)
(defun sqlite-get-table (db sql)
(declare (type sqlite-db-type db))
(with-cstring (sql-native sql)
- (let ((rows (allocate-foreign-object '(* (* :char)))))
+ (let ((rows (allocate-foreign-object '(* (* :
unsigned-
char)))))
(declare (type sqlite-row-pointer-type rows))
(with-foreign-object (rows-n :int)
(with-foreign-object (cols-n :int)
(declare (type sqlite-row-pointer-type rows))
(with-foreign-object (rows-n :int)
(with-foreign-object (cols-n :int)
@@
-308,7
+309,7
@@
(defun sqlite-aref (a n)
(declare (type sqlite-row-pointer-type a))
(convert-from-foreign-string
(defun sqlite-aref (a n)
(declare (type sqlite-row-pointer-type a))
(convert-from-foreign-string
- (deref-array (deref-pointer a 'sqlite-row-pointer) '(:array (* :char)) n)))
+ (deref-array (deref-pointer a 'sqlite-row-pointer) '(:array (* :
unsigned-
char)) n)))
(declaim (inline sqlite-free-row))
(defun sqlite-free-row (row)
(declaim (inline sqlite-free-row))
(defun sqlite-free-row (row)