X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=db-postgresql-socket%2Fpostgresql-socket-api.lisp;h=94d33f1d4c093b3ddf50cdfa3f12f1620f0a8489;hb=16cede958e7f229e2502ab6309591e344bee54f5;hp=bacaa98932caee2366ef99f845c8f866df9eb2c8;hpb=e1b4e76f227e5896f1548789ca81112866feebb4;p=clsql.git diff --git a/db-postgresql-socket/postgresql-socket-api.lisp b/db-postgresql-socket/postgresql-socket-api.lisp index bacaa98..94d33f1 100644 --- a/db-postgresql-socket/postgresql-socket-api.lisp +++ b/db-postgresql-socket/postgresql-socket-api.lisp @@ -219,9 +219,9 @@ socket interface" (optimize (speed 3) (safety 0))) #-sb-unicode (let ((result (make-string length))) - (dotimes (i (length string) result) + (dotimes (i length result) (declare (fixnum i)) - (setf (char string i) (code-char (read-byte stream))))) + (setf (char result i) (code-char (read-byte stream))))) #+sb-unicode (let ((bytes (make-array length :element-type '(unsigned-byte 8)))) (declare (type (simple-array (unsigned-byte 8) (*)) bytes)) @@ -334,10 +334,14 @@ socket interface" (etypecase host (pathname ;; Directory to unix-domain socket - (sb-bsd-sockets:socket-connect - (namestring - (make-pathname :name ".s.PGSQL" :type (princ-to-string port) - :defaults host)))) + (let ((sock (make-instance 'sb-bsd-sockets:local-socket + :type :stream))) + (sb-bsd-sockets:socket-connect + sock + (namestring + (make-pathname :name ".s.PGSQL" :type (princ-to-string port) + :defaults host))) + sock)) (string (let ((sock (make-instance 'sb-bsd-sockets:inet-socket :type :stream