From 966c0728f5179d87cdbadf13d13550b8d4dd4865 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 13 Aug 2008 13:54:29 +0000 Subject: Only attempt to randomise the utf8 buffer when NDEBUG is not defined. Note that, if lpu is built with NDEBUG defined, then the randomisation is a NOP. Therefore, to use the randomisation, you want to build debug versions of both lpu and whatever's using it. svn path=/trunk/libparserutils/; revision=5085 --- include/parserutils/input/inputstream.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/parserutils/input/inputstream.h b/include/parserutils/input/inputstream.h index 26f3353..7e811b4 100644 --- a/include/parserutils/input/inputstream.h +++ b/include/parserutils/input/inputstream.h @@ -85,7 +85,9 @@ static inline uintptr_t parserutils_inputstream_peek( if (stream == NULL) return PARSERUTILS_INPUTSTREAM_OOD; +#ifndef NDEBUG parserutils_buffer_randomise(stream->utf8); +#endif #define IS_ASCII(x) (((x) & 0x80) == 0) -- cgit v1.2.3