From 8f5de08c2ae5d2c01488887f3141b6fe3eb67779 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 28 Dec 2012 11:43:49 -0500 Subject: Comment about non-const Pipeline data --- include/qpdf/Pipeline.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/qpdf/Pipeline.hh b/include/qpdf/Pipeline.hh index 2de17ad2..41b7a290 100644 --- a/include/qpdf/Pipeline.hh +++ b/include/qpdf/Pipeline.hh @@ -44,7 +44,13 @@ class Pipeline // Subclasses should implement write and finish to do their jobs // and then, if they are not end-of-line pipelines, call - // getNext()->write or getNext()->finish. + // getNext()->write or getNext()->finish. It would be really nice + // if write could take unsigned char const*, but this would make + // it much more difficult to write pipelines around legacy + // interfaces whose calls don't want pointers to const data. As a + // rule, pipelines should generally not be modifying the data + // passed to them. They should, instead, create new data to pass + // downstream. QPDF_DLL virtual void write(unsigned char* data, size_t len) = 0; QPDF_DLL -- cgit v1.2.3-54-g00ecf