r9409: fix :cstring compilation on cmucl/sbcl
[clsql.git] / db-oracle / oracle-sql.lisp
index 0a704d25ba77d689892fe44838c33da40604f2f4..87aede6af98f24cc42108f3dd93cca1214496082 100644 (file)
@@ -638,7 +638,7 @@ the length of that format.")
                             (deref-vp errhp))
               (let ((colsize-including-null (1+ (uffi:deref-pointer colsize :unsigned-long))))
                 (setf buffer (acquire-foreign-resource
-                              :char (* +n-buf-rows+ colsize-including-null)))
+                              :unsigned-char (* +n-buf-rows+ colsize-including-null)))
                 (setf sizeof colsize-including-null))))
            (let ((retcodes (acquire-foreign-resource :short +n-buf-rows+))
                  (indicators (acquire-foreign-resource :short +n-buf-rows+))
@@ -740,10 +740,11 @@ the length of that format.")
                          +oci-htype-error+ 0 +null-void-pointer-pointer+)
         (oci-handle-alloc (deref-vp envhp) srvhp
                          +oci-htype-server+ 0 +null-void-pointer-pointer+)
-       (oci-server-attach (deref-vp srvhp)
-                          (deref-vp errhp)
-                          (uffi:make-null-pointer :unsigned-char)
-                          0 +oci-default+)
+       (uffi:with-cstring (dblink nil)
+         (oci-server-attach (deref-vp srvhp)
+                            (deref-vp errhp)
+                            dblink
+                            0 +oci-default+))
         (oci-handle-alloc (deref-vp envhp) svchp
                          +oci-htype-svcctx+ 0 +null-void-pointer-pointer+)
         (oci-attr-set (deref-vp svchp)