APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1533853468 -3600
# Thu Aug 09 23:24:28 2018 +0100
# Node ID 881402f49f9cc477816cc360a8cbee04b631f4b9
# Parent ca67eadca486f7dc0cac9b9bb91e3095228d0913
Correct the behaviour of XSET_STRING_ASCII_BEGIN(), large strings
src/ChangeLog addition:
2018-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
* lisp.h (XSET_STRING_ASCII_BEGIN):
Whoops, this behaved incorrectly with large strings, thank you the
debug build. Non-debug builds had a performance issue, not a
correctness issue.
diff -r ca67eadca486 -r 881402f49f9c src/ChangeLog
--- a/src/ChangeLog Tue Jul 17 08:11:41 2018 +0100
+++ b/src/ChangeLog Thu Aug 09 23:24:28 2018 +0100
@@ -1,3 +1,10 @@
+2018-08-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * lisp.h (XSET_STRING_ASCII_BEGIN):
+ Whoops, this behaved incorrectly with large strings, thank you the
+ debug build. Non-debug builds had a performance issue, not a
+ correctness issue.
+
2018-07-11 Aidan Kehoe <kehoea(a)parhasard.net>
* data.c:
diff -r ca67eadca486 -r 881402f49f9c src/lisp.h
--- a/src/lisp.h Tue Jul 17 08:11:41 2018 +0100
+++ b/src/lisp.h Thu Aug 09 23:24:28 2018 +0100
@@ -2823,7 +2823,7 @@
/* WARNING: If you modify an existing string, you must call
bump_string_modiff() afterwards. */
#define XSET_STRING_ASCII_BEGIN(s, val) \
- ((void) (XSTRING (s)->u.v.ascii_begin = (val) & MAX_STRING_ASCII_BEGIN))
+ ((void) (XSTRING (s)->u.v.ascii_begin = min (val, MAX_STRING_ASCII_BEGIN)))
#define XSTRING_FORMAT(s) FORMAT_DEFAULT
#define XSTRING_MODIFFP(s) (XSTRING (s)->u.v.modiffp + 0)
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
Show replies by date