X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-c-call.lisp;h=09d925801322f842a05503d271af585fa4ea9acf;hb=95591ed483dbb8c0846c129953acac1554f28809;hp=a3ff56a0536bba144e72e4ba3b5a7573cca6fb57;hpb=54b330585ed41edeb93a289f0e59aec67fa9ded9;p=sbcl.git diff --git a/src/code/target-c-call.lisp b/src/code/target-c-call.lisp index a3ff56a..09d9258 100644 --- a/src/code/target-c-call.lisp +++ b/src/code/target-c-call.lisp @@ -72,17 +72,13 @@ (declare (type simple-string string)) (locally (declare (optimize (speed 3) (safety 0))) - (let ((func (sb!impl::get-external-format-function external-format 10))) - (unless func - (error "Undefined external-format ~A.~%" external-format)) - (funcall (symbol-function func) string)))) + (let ((external-format (sb!impl::get-external-format-or-lose external-format))) + (funcall (sb!impl::ef-write-c-string-fun external-format) string)))) (defun c-string-to-string (sap external-format element-type) (declare (type system-area-pointer sap)) (locally (declare (optimize (speed 3) (safety 0))) - (let ((func (sb!impl::get-external-format-function external-format 9))) - (unless func - (error "Undefined external-format ~A.~%" external-format)) - (funcall (symbol-function func) sap element-type)))) + (let ((external-format (sb!impl::get-external-format-or-lose external-format))) + (funcall (sb!impl::ef-read-c-string-fun external-format) sap element-type))))