Coerce symbols found in :includes header arguments to strings

Fix regression from 2020-05-24T16:23:26Z!brandon@guttersohn.org
(commit 44cb98fdb), which broke test ob-C/string-var.

* lisp/ob-C.el (org-babel-C-expand-C): Make sure items in :includes
arguments are strings before performing string operations on them.
This commit is contained in:
Kévin Le Gouguec 2020-05-28 11:09:18 +02:00 committed by Kyle Meyer
parent d73fd145c0
commit 6506ea1e05
1 changed files with 3 additions and 0 deletions

View File

@ -233,6 +233,9 @@ its header arguments."
;; includes
(mapconcat
(lambda (inc)
;; :includes '(<foo> <bar>) gives us a list of
;; symbols; convert those to strings.
(when (symbolp inc) (setq inc (symbol-name inc)))
(if (string-prefix-p "<" inc)
(format "#include %s" inc)
(format "#include \"%s\"" inc)))