From: Kevin Rosenberg Date: Fri, 16 Apr 2010 06:13:42 +0000 (-0600) Subject: Patches from Walter C. Pelissero on clsql mail list X-Git-Tag: v5.0.6~1 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=6c83b1d3ad63edfc36a5bb5aee451d1eacc0d555 Patches from Walter C. Pelissero on clsql mail list - db-postgresql.lisp, sql/fddl.lisp: Fix typos - sql/metaclasses.lisp: Work around type-check-function being set during defclass expansion in SBCL - uffi/clsql-uffi.lisp: In call to uffi:convert-from-foreign-string, Set null-terminated-p to T when length not specified. --- diff --git a/ChangeLog b/ChangeLog index d5a3ae7..3e1e9c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-04-16 Kevin Rosenberg + * Version 5.0.6 + * db-postgresql.lisp, sql/fddl.lisp: Fix typos [Thanks to + Walter C. Pelissero] + * sql/metaclasses.lisp: Work around type-check-function being set + during defclass expansion in SBCL [Thanks to Walter C. Pelissero] + * uffi/clsql-uffi.lisp: In call to uffi:convert-from-foreign-string, + Set null-terminated-p to T when length not specified. + [Thanks to Walter C. Pelissero] + 2010-03-21 Kevin Rosenberg * Version 5.0.5 * sql/fdml.lisp: Fix DO-QUERY to actually return the last value of diff --git a/db-postgresql/postgresql-sql.lisp b/db-postgresql/postgresql-sql.lisp index 462c447..51d5d0f 100644 --- a/db-postgresql/postgresql-sql.lisp +++ b/db-postgresql/postgresql-sql.lisp @@ -210,7 +210,7 @@ :database database :expression sql-expression :message (tidy-error-message (PQerrorMessage conn-ptr) - (encoding databse)))) + (encoding database)))) (unwind-protect (case (PQresultStatus result) (#.pgsql-exec-status-type#command-ok diff --git a/sql/fddl.lisp b/sql/fddl.lisp index 50fe159..19dfea9 100644 --- a/sql/fddl.lisp +++ b/sql/fddl.lisp @@ -431,7 +431,7 @@ sequences are examined." (defun set-sequence-position (name position &key (database *default-database*)) "Explicitly set the the position of the sequence called NAME in -DATABASE, which defaults to *DEFAULT-DATABSE*, to POSITION which +DATABASE, which defaults to *DEFAULT-DATABASE*, to POSITION which is returned." (database-set-sequence-position (database-identifier name database) position database)) diff --git a/sql/metaclasses.lisp b/sql/metaclasses.lisp index 530c674..331e35a 100644 --- a/sql/metaclasses.lisp +++ b/sql/metaclasses.lisp @@ -526,6 +526,11 @@ implementations." (setf (specified-type esd) (delistify-dsd (specified-type dsd))) + ;; The type-check-function is computed at defclass expansion, + ;; which is too early for the CLSQL type conversion to take + ;; place. This gets rid of it. It's ugly but it's better + ;; than nothing -wcp10/4/10. + #+sbcl (setf (slot-value esd 'sb-pcl::%type-check-function) nil) ) ;; all other slots diff --git a/uffi/clsql-uffi.lisp b/uffi/clsql-uffi.lisp index 7a4dbbb..11038d5 100644 --- a/uffi/clsql-uffi.lisp +++ b/uffi/clsql-uffi.lisp @@ -139,6 +139,6 @@ (error "Can't return blob since length is not specified."))) (t (uffi:convert-from-foreign-string char-ptr - :null-terminated-p nil + :null-terminated-p (not length) :length length :encoding encoding))))))