From 9044a24097565c1a8eb542ae0eabb2539b3cc62b Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 4 Feb 2022 10:10:19 -0500 Subject: PointerHolder: deprecate getPointer() and getRefcount() Use get() and use_count() instead. Add #define NO_POINTERHOLDER_DEPRECATION to remove deprecation markers for these only. This commit also removes all deprecated PointerHolder API calls from qpdf's code except in PointerHolder's test suite, which must continue to test the deprecated APIs. --- libqpdf/Pl_Flate.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libqpdf/Pl_Flate.cc') diff --git a/libqpdf/Pl_Flate.cc b/libqpdf/Pl_Flate.cc index ee07b6f1..d5b53a0d 100644 --- a/libqpdf/Pl_Flate.cc +++ b/libqpdf/Pl_Flate.cc @@ -37,7 +37,7 @@ Pl_Flate::Members::Members(size_t out_bufsize, zstream.opaque = 0; zstream.next_in = 0; zstream.avail_in = 0; - zstream.next_out = this->outbuf.getPointer(); + zstream.next_out = this->outbuf.get(); zstream.avail_out = QIntC::to_uint(out_bufsize); } @@ -89,7 +89,7 @@ Pl_Flate::warn(char const* msg, int code) void Pl_Flate::write(unsigned char* data, size_t len) { - if (this->m->outbuf.getPointer() == 0) + if (this->m->outbuf.get() == 0) { throw std::logic_error( this->identifier + @@ -208,8 +208,8 @@ Pl_Flate::handleData(unsigned char* data, size_t len, int flush) QIntC::to_ulong(this->m->out_bufsize - zstream.avail_out); if (ready > 0) { - this->getNext()->write(this->m->outbuf.getPointer(), ready); - zstream.next_out = this->m->outbuf.getPointer(); + this->getNext()->write(this->m->outbuf.get(), ready); + zstream.next_out = this->m->outbuf.get(); zstream.avail_out = QIntC::to_uint(this->m->out_bufsize); } } @@ -227,7 +227,7 @@ Pl_Flate::finish() { try { - if (this->m->outbuf.getPointer()) + if (this->m->outbuf.get()) { if (this->m->initialized) { -- cgit v1.2.3-54-g00ecf