summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-09-17 16:17:03 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-09-17 16:17:03 +0000
commit32f2a5723657c25d78b274e99486e0f224d38bc5 (patch)
tree2fa61a21b1eeabb7288f3c2f5b9f87521d7152d8
parent20a3efe5e83f9efe350b3106cbfc260d8d5d80a8 (diff)
downloadlibparserutils-32f2a5723657c25d78b274e99486e0f224d38bc5.tar.gz
libparserutils-32f2a5723657c25d78b274e99486e0f224d38bc5.tar.bz2
Only randomise the inputstream if RANDOMISE_INPUTSTREAM is defined.
This will prevent exhorbitant memory leakage when running make test in client code. svn path=/trunk/libparserutils/; revision=5365
-rw-r--r--include/parserutils/input/inputstream.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/parserutils/input/inputstream.h b/include/parserutils/input/inputstream.h
index 3784f08..3bf51aa 100644
--- a/include/parserutils/input/inputstream.h
+++ b/include/parserutils/input/inputstream.h
@@ -93,8 +93,10 @@ static inline uintptr_t parserutils_inputstream_peek(
fprintf(stdout, "Peek: len: %zu cur: %u off: %zu\n",
stream->utf8->length, stream->cursor, offset);
#endif
+#ifdef RANDOMISE_INPUTSTREAM
parserutils_buffer_randomise(stream->utf8);
#endif
+#endif
#define IS_ASCII(x) (((x) & 0x80) == 0)