common-lisp.net
/
projects/cffi/cffi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
6f74f5e
)
Don't pass user-defined strings to printf().
author
Joshua Elsasser
<joshua@elsasser.org>
Thu, 22 Nov 2012 19:55:56 +0000 (14:55 -0500)
committer
Luís Oliveira
<loliveira@common-lisp.net>
Sun, 6 Jan 2013 20:53:17 +0000 (20:53 +0000)
This allows % to be safely used in lisp symbol names which pass
through the groveler, such as the following:
(cvar ("errno" %errno) :int)
grovel/grovel.lisp
patch
|
blob
|
blame
|
history
diff --git
a/grovel/grovel.lisp
b/grovel/grovel.lisp
index
e582fe9
..
4c2da1a
100644
(file)
--- a/
grovel/grovel.lisp
+++ b/
grovel/grovel.lisp
@@
-89,7
+89,7
@@
int main(int argc, char**argv) {
(defun c-format (out fmt &rest args)
(let ((text (unescape-for-c (format nil "~?" fmt args))))
- (format out "~& fprintf(output, \"~A\");~%" text)))
+ (format out "~& fputs(\"~A\", output);~%" text)))
(defun c-printf (out fmt &rest args)
(flet ((item (item)