From 5f4675bb24dcffa616d6ae3bd38e532510522615 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 10 Apr 2022 13:29:10 -0400 Subject: Mark non-ABI symbols in exported class with QPDF_DLL_PRIVATE --- include/qpdf/ClosedFileInputSource.hh | 2 ++ include/qpdf/InputSource.hh | 2 +- include/qpdf/Pl_DCT.hh | 2 ++ include/qpdf/Pl_Flate.hh | 7 ++++++- include/qpdf/Pl_RunLength.hh | 3 +++ include/qpdf/QPDFExc.hh | 1 + include/qpdf/QPDFObject.hh | 2 +- include/qpdf/QPDFObjectHandle.hh | 1 + include/qpdf/QPDFSystemError.hh | 1 + include/qpdf/RandomDataProvider.hh | 5 ++--- 10 files changed, 20 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/qpdf/ClosedFileInputSource.hh b/include/qpdf/ClosedFileInputSource.hh index e5142bc1..e82c4410 100644 --- a/include/qpdf/ClosedFileInputSource.hh +++ b/include/qpdf/ClosedFileInputSource.hh @@ -68,7 +68,9 @@ class QPDF_DLL_CLASS ClosedFileInputSource: public InputSource ClosedFileInputSource(ClosedFileInputSource const&) = delete; ClosedFileInputSource& operator=(ClosedFileInputSource const&) = delete; + QPDF_DLL_PRIVATE void before(); + QPDF_DLL_PRIVATE void after(); class QPDF_DLL_PRIVATE Members diff --git a/include/qpdf/InputSource.hh b/include/qpdf/InputSource.hh index 8d46895d..94dec500 100644 --- a/include/qpdf/InputSource.hh +++ b/include/qpdf/InputSource.hh @@ -104,7 +104,7 @@ class QPDF_DLL_CLASS InputSource qpdf_offset_t last_offset; private: - class Members + class QPDF_DLL_PRIVATE Members { friend class InputSource; diff --git a/include/qpdf/Pl_DCT.hh b/include/qpdf/Pl_DCT.hh index 0339afb7..0bbf302b 100644 --- a/include/qpdf/Pl_DCT.hh +++ b/include/qpdf/Pl_DCT.hh @@ -70,7 +70,9 @@ class QPDF_DLL_CLASS Pl_DCT: public Pipeline virtual void finish(); private: + QPDF_DLL_PRIVATE void compress(void* cinfo, Buffer*); + QPDF_DLL_PRIVATE void decompress(void* cinfo, Buffer*); enum action_e { a_compress, a_decompress }; diff --git a/include/qpdf/Pl_Flate.hh b/include/qpdf/Pl_Flate.hh index 503c2db8..5cfe17f4 100644 --- a/include/qpdf/Pl_Flate.hh +++ b/include/qpdf/Pl_Flate.hh @@ -30,7 +30,6 @@ class QPDF_DLL_CLASS Pl_Flate: public Pipeline { public: static unsigned int const def_bufsize = 65536; - static int compression_level; enum action_e { a_inflate, a_deflate }; @@ -61,10 +60,16 @@ class QPDF_DLL_CLASS Pl_Flate: public Pipeline void setWarnCallback(std::function callback); private: + QPDF_DLL_PRIVATE void handleData(unsigned char* data, size_t len, int flush); + QPDF_DLL_PRIVATE void checkError(char const* prefix, int error_code); + QPDF_DLL_PRIVATE void warn(char const*, int error_code); + QPDF_DLL_PRIVATE + static int compression_level; + class QPDF_DLL_PRIVATE Members { friend class Pl_Flate; diff --git a/include/qpdf/Pl_RunLength.hh b/include/qpdf/Pl_RunLength.hh index 5becd198..ce2b0e90 100644 --- a/include/qpdf/Pl_RunLength.hh +++ b/include/qpdf/Pl_RunLength.hh @@ -40,8 +40,11 @@ class QPDF_DLL_CLASS Pl_RunLength: public Pipeline virtual void finish(); private: + QPDF_DLL_PRIVATE void encode(unsigned char* data, size_t len); + QPDF_DLL_PRIVATE void decode(unsigned char* data, size_t len); + QPDF_DLL_PRIVATE void flush_encode(); enum state_e { st_top, st_copying, st_run }; diff --git a/include/qpdf/QPDFExc.hh b/include/qpdf/QPDFExc.hh index 1d88bcf9..d9d7312b 100644 --- a/include/qpdf/QPDFExc.hh +++ b/include/qpdf/QPDFExc.hh @@ -66,6 +66,7 @@ class QPDF_DLL_CLASS QPDFExc: public std::runtime_error std::string const& getMessageDetail() const; private: + QPDF_DLL_PRIVATE static std::string createWhat( std::string const& filename, std::string const& object, diff --git a/include/qpdf/QPDFObject.hh b/include/qpdf/QPDFObject.hh index 9487e8f5..897a61dd 100644 --- a/include/qpdf/QPDFObject.hh +++ b/include/qpdf/QPDFObject.hh @@ -32,7 +32,7 @@ class QPDF; class QPDFObjectHandle; -class QPDF_DLL_CLASS QPDFObject +class QPDFObject { public: QPDFObject(); diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 7437d494..b8b95f47 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -204,6 +204,7 @@ class QPDFObjectHandle void writeToken(QPDFTokenizer::Token const&); private: + QPDF_DLL_PRIVATE void setPipeline(Pipeline*); Pipeline* pipeline; diff --git a/include/qpdf/QPDFSystemError.hh b/include/qpdf/QPDFSystemError.hh index b8595e09..f6c62224 100644 --- a/include/qpdf/QPDFSystemError.hh +++ b/include/qpdf/QPDFSystemError.hh @@ -47,6 +47,7 @@ class QPDF_DLL_CLASS QPDFSystemError: public std::runtime_error int getErrno() const; private: + QPDF_DLL_PRIVATE static std::string createWhat(std::string const& description, int system_errno); diff --git a/include/qpdf/RandomDataProvider.hh b/include/qpdf/RandomDataProvider.hh index ffedfb2b..6b316ee1 100644 --- a/include/qpdf/RandomDataProvider.hh +++ b/include/qpdf/RandomDataProvider.hh @@ -34,9 +34,8 @@ class QPDF_DLL_CLASS RandomDataProvider virtual void provideRandomData(unsigned char* data, size_t len) = 0; protected: - RandomDataProvider() - { - } + QPDF_DLL_PRIVATE + RandomDataProvider() = default; private: RandomDataProvider(RandomDataProvider const&) = delete; -- cgit v1.2.3-54-g00ecf