;;;; This file is part of CLSQL.
;;;;
;;;; CLSQL users are granted the rights to distribute and use this software
;;;; This file is part of CLSQL.
;;;;
;;;; CLSQL users are granted the rights to distribute and use this software
-
-(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))
(defmacro def-raw-oci-routine
((c-oci-symbol lisp-oci-fn) c-return &rest c-parms)
(let ((ll (mapcar (lambda (x) (declare (ignore x)) (gensym)) c-parms)))
`(let ((%lisp-oci-fn (uffi:def-function (,c-oci-symbol ,(intern (concatenate 'string "%" (symbol-name lisp-oci-fn))))
(defmacro def-raw-oci-routine
((c-oci-symbol lisp-oci-fn) c-return &rest c-parms)
(let ((ll (mapcar (lambda (x) (declare (ignore x)) (gensym)) c-parms)))
`(let ((%lisp-oci-fn (uffi:def-function (,c-oci-symbol ,(intern (concatenate 'string "%" (symbol-name lisp-oci-fn))))
- (mode ub4) ; ub4
- (ctxp :pointer-void) ; dvoid *
- (malocfp :pointer-void) ; dvoid *(*)
- (ralocfp :pointer-void) ; dvoid *(*)
- (mfreefp (* :pointer-void))) ; void *(*)
+ (mode ub4) ; ub4
+ (ctxp :pointer-void) ; dvoid *
+ (malocfp :pointer-void) ; dvoid *(*)
+ (ralocfp :pointer-void) ; dvoid *(*)
+ (mfreefp (* :pointer-void))) ; void *(*)
- (parenth :pointer-void) ; const dvoid *
- (hndlpp (* :pointer-void)) ; dvoid **
- (type ub4) ; ub4
- (xtramem_sz size_t) ; size_t
- (usrmempp (* :pointer-void))) ; dvoid **
+ (parenth :pointer-void) ; const dvoid *
+ (hndlpp (* :pointer-void)) ; dvoid **
+ (type ub4) ; ub4
+ (xtramem_sz size_t) ; size_t
+ (usrmempp (* :pointer-void))) ; dvoid **
(def-oci-routine ("OCIServerAttach" oci-server-attach)
:int
(srvhp :pointer-void) ; oci-server
(errhp :pointer-void) ; oci-error
(def-oci-routine ("OCIServerAttach" oci-server-attach)
:int
(srvhp :pointer-void) ; oci-server
(errhp :pointer-void) ; oci-error
- (envhp :pointer-void) ; env
- (errhp :pointer-void) ; err
- (svchpp (* :pointer-void)) ; svc
- (username (* :unsigned-char)) ; username
- (uname-len ub4) ;
- (passwd (* :unsigned-char)) ; passwd
- (password-len ub4) ;
- (dsn (* :unsigned-char)) ; datasource
- (dsn-len ub4)) ;
+ (envhp :pointer-void) ; env
+ (errhp :pointer-void) ; err
+ (svchpp (* :pointer-void)) ; svc
+ (username (* :unsigned-char)) ; username
+ (uname-len ub4) ;
+ (passwd (* :unsigned-char)) ; passwd
+ (password-len ub4) ;
+ (dsn (* :unsigned-char)) ; datasource
+ (dsn-len ub4)) ;
- ((mode ub4) ; ub4
- (ctxp :pointer-void) ; dvoid *
- (malocfp :pointer-void) ; dvoid *(*)
- (ralocfp :pointer-void) ; dvoid *(*)
+ ((mode ub4) ; ub4
+ (ctxp :pointer-void) ; dvoid *
+ (malocfp :pointer-void) ; dvoid *(*)
+ (ralocfp :pointer-void) ; dvoid *(*)
-(uffi:def-function "OCIHandleAlloc"
- ((parenth :pointer-void) ; const dvoid *
- (hndlpp (* :pointer-void)) ; dvoid **
- (type ub4) ; ub4
- (xtramem_sz size_t) ; size_t
+(uffi:def-function "OCIHandleAlloc"
+ ((parenth :pointer-void) ; const dvoid *
+ (hndlpp (* :pointer-void)) ; dvoid **
+ (type ub4) ; ub4
+ (xtramem_sz size_t) ; size_t
- '(:error ; error report handle (OCIError)
- :service-context ; service context handle (OCISvcCtx)
- :statement ; statement (application request) handle (OCIStmt)
- :describe ; select list description handle (OCIDescribe)
- :server ; server context handle (OCIServer)
- :session ; user session handle (OCISession)
- :transaction ; transaction context handle (OCITrans)
- :complex-object ; complex object retrieval handle (OCIComplexObject)
- :security)) ; security handle (OCISecurity)
+ '(:error ; error report handle (OCIError)
+ :service-context ; service context handle (OCISvcCtx)
+ :statement ; statement (application request) handle (OCIStmt)
+ :describe ; select list description handle (OCIDescribe)
+ :server ; server context handle (OCIServer)
+ :session ; user session handle (OCISession)
+ :transaction ; transaction context handle (OCITrans)
+ :complex-object ; complex object retrieval handle (OCIComplexObject)
+ :security)) ; security handle (OCISecurity)
(defun oci-init (&key (mode +oci-default+))
(let ((x (OCIInitialize mode +null-void-pointer+ +null-void-pointer+
(defun oci-init (&key (mode +oci-default+))
(let ((x (OCIInitialize mode +null-void-pointer+ +null-void-pointer+
- (let ((env (uffi:allocate-foreign-object :pointer-void)))
- (setq *oci-initialized* mode)
- (let ((x (OCIEnvInit env +oci-default+ 0 +null-void-pointer+)))
- (format t ";; OEI: returned ~d~%" x)
- (setq *oci-env* env))))))
+ (let ((env (uffi:allocate-foreign-object :pointer-void)))
+ (setq *oci-initialized* mode)
+ (let ((x (OCIEnvInit env +oci-default+ 0 +null-void-pointer+)))
+ (format t ";; OEI: returned ~d~%" x)
+ (setq *oci-env* env))))))