X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fhost-c-call.lisp;h=b0b143b428c407156d75a7a56f83727269a95bc5;hb=f6a2be77637d025bfded9430f02863c28f74f77a;hp=f86f24c5ae70aefb3499c84c886633f80d32e323;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/host-c-call.lisp b/src/code/host-c-call.lisp index f86f24c..b0b143b 100644 --- a/src/code/host-c-call.lisp +++ b/src/code/host-c-call.lisp @@ -9,33 +9,34 @@ (in-package "SB!C-CALL") -(sb!int:file-comment - "$Header$") +(/show0 "host-c-call.lisp 12") -(def-alien-type-class (c-string :include pointer :include-args (to))) +(define-alien-type-class (c-string :include pointer :include-args (to))) -(def-alien-type-translator c-string () +(define-alien-type-translator c-string () (make-alien-c-string-type :to (parse-alien-type 'char (sb!kernel::make-null-lexenv)))) -(def-alien-type-method (c-string :unparse) (type) +(define-alien-type-method (c-string :unparse) (type) (declare (ignore type)) 'c-string) -(def-alien-type-method (c-string :lisp-rep) (type) +(define-alien-type-method (c-string :lisp-rep) (type) (declare (ignore type)) '(or simple-base-string null (alien (* char)))) -(def-alien-type-method (c-string :naturalize-gen) (type alien) +(define-alien-type-method (c-string :naturalize-gen) (type alien) (declare (ignore type)) `(if (zerop (sap-int ,alien)) nil (%naturalize-c-string ,alien))) -(def-alien-type-method (c-string :deport-gen) (type value) +(define-alien-type-method (c-string :deport-gen) (type value) (declare (ignore type)) `(etypecase ,value (null (int-sap 0)) ((alien (* char)) (alien-sap ,value)) (simple-base-string (vector-sap ,value)))) + +(/show0 "host-c-call.lisp end of file")