mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-11 15:30:36 -07:00
cmpc: get rid of an undocumented and unused code path for FFI:CLINES
We've supported syntax for clines that allowed inlining Lisp objects when they were prepended with @, for example (ffi:clines "#include @my-variable"); that said I have not seen a single use of this syntax and it compilcated the logic (the read object needed to land in the data segment during the second pass).
This commit is contained in:
parent
5a8f6780b8
commit
f195f7d574
1 changed files with 7 additions and 19 deletions
|
|
@ -33,25 +33,13 @@
|
|||
'(progn))
|
||||
|
||||
(defun output-clines (output-stream)
|
||||
(flet ((parse-one-string (s output-stream)
|
||||
(with-input-from-string (stream s)
|
||||
(loop for c = (read-char stream nil nil)
|
||||
while c
|
||||
do (if (eq c #\@)
|
||||
(let ((object (handler-case (read stream)
|
||||
(serious-condition (c)
|
||||
(cmperr "Unable to parse FFI:CLINES string~& ~S"
|
||||
s)))))
|
||||
(let ((*compiler-output1* output-stream))
|
||||
(wt (add-object object :permanent t))))
|
||||
(write-char c output-stream))))))
|
||||
(loop for s in *clines-string-list*
|
||||
do (terpri output-stream)
|
||||
do (if (find #\@ s)
|
||||
(parse-one-string s output-stream)
|
||||
(write-string s output-stream)))
|
||||
(terpri output-stream)
|
||||
(setf *clines-string-list* nil)))
|
||||
(loop for s in *clines-string-list*
|
||||
do (terpri output-stream)
|
||||
do (if (find #\@ s)
|
||||
(cmperr "The character #\\@ is not allowed in ~s." 'FFI:CLINES)
|
||||
(write-string s output-stream)))
|
||||
(terpri output-stream)
|
||||
(setf *clines-string-list* nil))
|
||||
|
||||
;; ----------------------------------------------------------------------
|
||||
;; C/C++ INLINE CODE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue