X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-oracle%2Foracle-api.lisp;h=19b3f6e37f98d7861b3bfa9d9d9bcdc6d5323297;hp=377c3f3a9c943cee23bdfdaa9a56a1399e92615d;hb=ab37892bfa71e0d66021cc73f28cd189be30c81c;hpb=e105d1c4963b50edb966b2a3049bbe02ecdfabff diff --git a/db-oracle/oracle-api.lisp b/db-oracle/oracle-api.lisp index 377c3f3..19b3f6e 100644 --- a/db-oracle/oracle-api.lisp +++ b/db-oracle/oracle-api.lisp @@ -37,9 +37,10 @@ (uffi:def-foreign-type oci-svc-ctx :pointer-void) (uffi:def-foreign-type oci-stmt :pointer-void) - -(defvar +null-void-pointer+ (uffi:make-null-pointer :void)) -(defvar +null-void-pointer-pointer+ (uffi:make-null-pointer :pointer-void)) +(uffi:def-pointer-var +null-void-pointer+ + (uffi:make-null-pointer :void)) +(uffi:def-pointer-var +null-void-pointer-pointer+ + (uffi:make-null-pointer :pointer-void)) ;;; Check an OCI return code for erroricity and signal a reasonably ;;; informative condition if so. @@ -65,7 +66,7 @@ (if (= result #.+oci-success+) +oci-success+ (handle-oci-result result database nulls-ok))))))) - + (defmacro def-raw-oci-routine ((c-oci-symbol lisp-oci-fn) c-return &rest c-parms) @@ -74,6 +75,7 @@ ,c-parms :returning ,c-return))) (defun ,lisp-oci-fn (,@ll &key database nulls-ok) + (declare (ignore database nulls-ok)) (funcall %lisp-oci-fn ,@ll))))) @@ -92,7 +94,7 @@ (mode ub4) ; ub4 (xtramem-sz size_t) ; size_t (usermempp (* :pointer-void))) ; dvoid ** - + #-oci7 (def-oci-routine ("OCIEnvCreate" oci-env-create) :int @@ -209,10 +211,10 @@ (position ub4) (valuep :pointer-void) (value_sz sb4) - (dty ub2) + (dty ub2) (indp (* sb2)) - (rlenp (* ub2)) - (rcodep (* ub2)) + (rlenp (* ub2)) + (rcodep (* ub2)) (mode ub4)) (def-oci-routine ("OCIStmtFetch" oci-stmt-fetch) @@ -273,7 +275,7 @@ :returning :int) -(uffi:def-function "OCIHandleAlloc" +(uffi:def-function "OCIHandleAlloc" ((parenth :pointer-void) ; const dvoid * (hndlpp (* :pointer-void)) ; dvoid ** (type ub4) ; ub4