projects
/
uffi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
39b1189
)
r11020: port for LW5
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Mon, 14 Aug 2006 04:09:20 +0000
(
04:09
+0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Mon, 14 Aug 2006 04:09:20 +0000
(
04:09
+0000)
src/objects.lisp
patch
|
blob
|
history
diff --git
a/src/objects.lisp
b/src/objects.lisp
index 0e327f0269d4d457da27b457de85fc3657caa5b5..1c4983cdd166ca0cb0c3193d31c904beb2c90f1c 100644
(file)
--- a/
src/objects.lisp
+++ b/
src/objects.lisp
@@
-139,8
+139,9
@@
an array of TYPE with size SIZE. The TYPE parameter is evaluated."
`(if (integerp ,obj) ,obj (char-code ,obj)))
(defmacro ensure-char-storable (obj)
`(if (integerp ,obj) ,obj (char-code ,obj)))
(defmacro ensure-char-storable (obj)
- #+(or lispworks digitool) obj
- #+(or allegro cmu sbcl scl openmcl) `(char-code ,obj))
+ #+(or digitool (and lispworks (not lispworks5))) obj
+ #+(or allegro cmu lispworks5 openmcl sbcl scl)
+ `(char-code ,obj))
(defmacro pointer-address (obj)
#+(or cmu scl)
(defmacro pointer-address (obj)
#+(or cmu scl)
@@
-248,12
+249,20
@@
an array of TYPE with size SIZE. The TYPE parameter is evaluated."
#+(or macosx darwinppc-target) (concatenate 'string "_" name)
#-(or macosx darwinppc-target) name)
#+(or macosx darwinppc-target) (concatenate 'string "_" name)
#-(or macosx darwinppc-target) name)
+;; unchanged from main primitives.lisp
+(defun make-lisp-name (name)
+ (let ((converted (substitute #\- #\_ name)))
+ (intern
+ #+uffi-case-sensitive converted
+ #+(and (not uffi-lowercase-reader) (not uffi-case-sensitive)) (string-upcase converted)
+ #+(and uffi-lowercase-reader (not uffi-case-sensitive)) (string-downcase converted))))
+
(defmacro def-foreign-var (names type module)
#-lispworks (declare (ignore module))
(let ((foreign-name (if (atom names) names (first names)))
(lisp-name (if (atom names) (make-lisp-name names) (second names)))
#-allegro
(defmacro def-foreign-var (names type module)
#-lispworks (declare (ignore module))
(let ((foreign-name (if (atom names) names (first names)))
(lisp-name (if (atom names) (make-lisp-name names) (second names)))
#-allegro
- (var-type (convert-
from-
uffi-type type :type)))
+ (var-type (convert-uffi-type type :type)))
#+(or cmu scl)
`(alien:def-alien-variable (,foreign-name ,lisp-name) ,var-type)
#+sbcl
#+(or cmu scl)
`(alien:def-alien-variable (,foreign-name ,lisp-name) ,var-type)
#+sbcl