From: Kevin M. Rosenberg Date: Tue, 15 Nov 2005 04:06:23 +0000 (+0000) Subject: r10837: Automated commit for Debian build of clsql upstream-version-3.4.4 X-Git-Tag: v3.8.6~99 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=0b4cd1d96605598f9c7ff1adfe104474c3385e44 r10837: Automated commit for Debian build of clsql upstream-version-3.4.4 --- diff --git a/db-oracle/oracle-sql.lisp b/db-oracle/oracle-sql.lisp index 6a6aa3f..cbcfda8 100644 --- a/db-oracle/oracle-sql.lisp +++ b/db-oracle/oracle-sql.lisp @@ -154,8 +154,8 @@ the length of that format.") (cond (database (with-slots (errhp) database - (uffi:with-foreign-objects ((errcode 'sb4) - (errbuf '(:array :unsigned-char #.+errbuf-len+))) + (let ((errcode (uffi:allocate-foreign-object 'sb4)) + (errbuf (uffi:allocate-foreign-string #.+errbuf-len+))) ;; ensure errbuf empty string (setf (uffi:deref-array errbuf '(:array :unsigned-char) 0) (uffi:ensure-char-storable (code-char 0))) @@ -169,6 +169,8 @@ the length of that format.") +errbuf-len+ +oci-htype-error+)) (let ((subcode (uffi:deref-pointer errcode 'sb4)) (errstr (uffi:convert-from-foreign-string errbuf))) + (uffi:free-foreign-object errcode) + (uffi:free-foreign-object errbuf) (unless (and nulls-ok (= subcode +null-value-returned+)) (error 'sql-database-error :database database