aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-12-28 17:43:49 +0100
committerJay Berkenbilt <ejb@ql.org>2012-12-31 16:32:31 +0100
commit8f5de08c2ae5d2c01488887f3141b6fe3eb67779 (patch)
tree05f12757fa11521b0cadae831bb8d56d43ab4b01 /include
parent0873e4230047553c366dff11444d56fe9977b61f (diff)
downloadqpdf-8f5de08c2ae5d2c01488887f3141b6fe3eb67779.tar.zst
Comment about non-const Pipeline data
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/Pipeline.hh8
1 files changed, 7 insertions, 1 deletions
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