Commit 71a4e66d99306f3708b6fbeb845f9c784c9ea990

Authored by m-holger
1 parent 9106a5e3

Update README-maintainer with wip / modernize qpdf

README-maintainer.md
@@ -285,6 +285,16 @@ Building docs from pull requests is also enabled. @@ -285,6 +285,16 @@ Building docs from pull requests is also enabled.
285 * Avoid attaching too much metadata to objects and object handles 285 * Avoid attaching too much metadata to objects and object handles
286 since those have to get copied around a lot. 286 since those have to get copied around a lot.
287 287
  288 +* Prefer std::string_view to std::string const& and char const*.
  289 +
  290 + * Where functions rely on strings being null-terminated, std::string_view may not be appropriate.
  291 +
  292 + * For return values, consider whether returning a string_view is safe or whether it is more appropriate
  293 + to return a std::string or std::string const&, especially in the public API.
  294 +
  295 + * NEVER replace a std::string const& return value with std::string_view in the public API.
  296 +
  297 +
288 ## ZLIB COMPATIBILITY 298 ## ZLIB COMPATIBILITY
289 299
290 The qpdf test suite is designed to be independent of the output of any 300 The qpdf test suite is designed to be independent of the output of any
@@ -2,6 +2,7 @@ Contents @@ -2,6 +2,7 @@ Contents
2 ======== 2 ========
3 3
4 - [Always](#always) 4 - [Always](#always)
  5 +- [In Progress](#in-progress)
5 - [Next](#next) 6 - [Next](#next)
6 - [Possible future JSON enhancements](#possible-future-json-enhancements) 7 - [Possible future JSON enhancements](#possible-future-json-enhancements)
7 - [QPDFJob](#qpdfjob) 8 - [QPDFJob](#qpdfjob)
@@ -26,6 +27,28 @@ Always @@ -26,6 +27,28 @@ Always
26 * When close to release, make sure external-libs is building and follow instructions in 27 * When close to release, make sure external-libs is building and follow instructions in
27 ../external-libs/README 28 ../external-libs/README
28 29
  30 +In Progress
  31 +===========
  32 +
  33 +Modernize qpdf
  34 +--------------
  35 +
  36 +Update code to make use of the facilities provided by C++17. In particular, replace early qpdf C-style code
  37 +with modern equivalent. Key updates are:
  38 +
  39 +* use the standard library where appropriate
  40 +* replace C-strings with std::string or std::string_view
  41 +* replace raw pointer with smart pointers or standard library containers
  42 +* replace std::string const& with std::string_view where appropriate
  43 +* replace std::shared_ptr with std::unique_ptr or references to the underlying object where appropriate
  44 +
  45 +Next steps are:
  46 +
  47 +* review function signatures in the public API
  48 +* replace code that uses QUtil::make_shared_cstr etc
  49 +
  50 +Except for the above, prefer to make modernization changes as part of other updates.
  51 +
29 Next 52 Next
30 ==== 53 ====
31 54