X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-c-call.lisp;h=7a83d1021a80879036a93fc2ee5765291ff7c383;hb=c553e4be6da2d18f0827f190589c88e837b8b8a6;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..7a83d10 100644 --- a/src/code/target-c-call.lisp +++ b/src/code/target-c-call.lisp @@ -72,17 +72,12 @@ (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))))