2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-05 21:07:50 +00:00

Merge pull request #1202 from m-holger/wip

Update README-maintainer with wip / modernize qpdf
This commit is contained in:
m-holger 2024-06-18 19:36:45 +01:00 committed by GitHub
commit 95ef3552da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 33 additions and 0 deletions

View File

@ -285,6 +285,16 @@ Building docs from pull requests is also enabled.
* Avoid attaching too much metadata to objects and object handles * Avoid attaching too much metadata to objects and object handles
since those have to get copied around a lot. since those have to get copied around a lot.
* Prefer std::string_view to std::string const& and char const*.
* Where functions rely on strings being null-terminated, std::string_view may not be appropriate.
* For return values, consider whether returning a string_view is safe or whether it is more appropriate
to return a std::string or std::string const&, especially in the public API.
* NEVER replace a std::string const& return value with std::string_view in the public API.
## ZLIB COMPATIBILITY ## ZLIB COMPATIBILITY
The qpdf test suite is designed to be independent of the output of any The qpdf test suite is designed to be independent of the output of any

23
TODO.md
View File

@ -2,6 +2,7 @@ Contents
======== ========
- [Always](#always) - [Always](#always)
- [In Progress](#in-progress)
- [Next](#next) - [Next](#next)
- [Possible future JSON enhancements](#possible-future-json-enhancements) - [Possible future JSON enhancements](#possible-future-json-enhancements)
- [QPDFJob](#qpdfjob) - [QPDFJob](#qpdfjob)
@ -26,6 +27,28 @@ Always
* When close to release, make sure external-libs is building and follow instructions in * When close to release, make sure external-libs is building and follow instructions in
../external-libs/README ../external-libs/README
In Progress
===========
Modernize qpdf
--------------
Update code to make use of the facilities provided by C++17. In particular, replace early qpdf C-style code
with modern equivalent. Key updates are:
* use the standard library where appropriate
* replace C-strings with std::string or std::string_view
* replace raw pointer with smart pointers or standard library containers
* replace std::string const& with std::string_view where appropriate
* replace std::shared_ptr with std::unique_ptr or references to the underlying object where appropriate
Next steps are:
* review function signatures in the public API
* replace code that uses QUtil::make_shared_cstr etc
Except for the above, prefer to make modernization changes as part of other updates.
Next Next
==== ====