Changeset vendor,8 for vendor/src/odbc/ffi-support.lisp
- Timestamp:
- 08/23/2008 11:23:53 AM (18 years ago)
- revision id:
- svn-v3-trunk1:1c22b0a8-4d0b-0410-a296-af6a2e6f35e3:plain-odbc%2Ftrunk:14
- File:
-
- 1 edited
-
vendor/src/odbc/ffi-support.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
vendor/src/odbc/ffi-support.lisp
r5 r8 4 4 5 5 6 (defun get-string (ptr length) 7 (cffi:foreign-string-to-lisp ptr length nil) 8 ) 6 (defmacro cffi-0.10-or-0.9 (form-0.10 form-0.9) 7 (if (BOUNDP 'cffi::*foreign-string-mappings*) 8 form-0.10 9 form-0.9)) 9 10 10 (defun get-string-nts (ptr) 11 (cffi:foreign-string-to-lisp ptr MOST-POSITIVE-FIXNUM t)) 11 (cffi-0.10-or-0.9 12 (defun get-string (ptr length) 13 (cffi:foreign-string-to-lisp ptr :count length :encoding :iso-8859-1) 14 ) 15 (defun get-string (ptr length) 16 (cffi:foreign-string-to-lisp ptr length nil) 17 ) 18 ) 19 20 (cffi-0.10-or-0.9 21 (defun get-string-nts (ptr) 22 (cffi:foreign-string-to-lisp ptr :max-chars MOST-POSITIVE-FIXNUM :encoding :iso-8859-1)) 23 (defun get-string-nts (ptr) 24 (cffi:foreign-string-to-lisp ptr MOST-POSITIVE-FIXNUM t))) 12 25 13 (defun put-string (ptr vector) 14 (cffi:lisp-string-to-foreign vector ptr (1+ (length vector)))) 26 (cffi-0.10-or-0.9 27 (defun put-string (ptr vector) 28 (cffi:lisp-string-to-foreign vector ptr (1+ (length vector)) :encoding :iso-8859-1)) 29 (defun put-string (ptr vector) 30 (cffi:lisp-string-to-foreign vector ptr (1+ (length vector))))) 15 31 16 32 (defun %null-ptr () 17 33 (cffi:null-pointer)) 34 35 36 (cffi-0.10-or-0.9 37 (defmacro with-foreign-string-alloc ((ptr text) &body body) 38 `(cffi:with-foreign-string (,ptr ,text :encoding :iso-8859-1) 39 ,@body)) 40 41 (defmacro with-foreign-string-alloc ((ptr text) &body body) 42 `(cffi:with-foreign-string (,ptr ,text) 43 ,@body))) 44 18 45 19 46 (defun get-byte-vector (ptr length)
Note: See TracChangeset
for help on using the changeset viewer.
