Hi all,
When testing on Windows with mingw (but without msys), I got an error from
the C compiler that we've already fixed! Namely, the compiler was emitting
calls to C_trace like C_trace(".\user-pass.scm:123"), which caused compiler
errors because it tries to interpret \u as a unicode literal.This is because (string-translate "x" "x" "yy") doesn't replace "x" by "yy", but by "y", since it does a char-by-char replacement. It should use string-translate*, which we already fixed in master, but sneakily that's part of the commit that introduces the statistical profiler, not a separate commit - maybe that's the real issue here. I had a hard time figuring out what exactly went wrong, but I think the commit message explains it. Cheers, Peter
From 3a455fa74f1f101f9207859b7cfc54f9fde3a630 Mon Sep 17 00:00:00 2001 From: Peter Bex <[email protected]> Date: Sat, 6 May 2017 14:49:42 +0200 Subject: [PATCH] Fix "backslashify" (again) to correctly double any backslashes. This was fixed in master as part of 37f94e90aeb1f. When cherry-picking this to chicken-5, this apparently got lost because the procedure was moved from the file in which it originally was in commit 50ee93d8db6586e2cda387ed9f86cf62ddb3f8fe, while the cherry-pick happened later. --- c-backend.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-backend.scm b/c-backend.scm index 146086d..1c0f8f2 100644 --- a/c-backend.scm +++ b/c-backend.scm @@ -66,7 +66,7 @@ (intersperse lst #\space) ) ) ;; Hacky procedures to make certain names more suitable for use in C. -(define (backslashify s) (string-translate (->string s) "\\" "\\\\")) +(define (backslashify s) (string-translate* (->string s) '(("\\" . "\\\\")))) (define (uncommentify s) (string-translate* (->string s) '(("*/" . "*_/")))) (define (c-identifier s) (string->c-identifier (->string s))) -- 2.1.4
signature.asc
Description: Digital signature
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
