diff --git a/src/OpenColorIO/OCIOZArchive.cpp b/src/OpenColorIO/OCIOZArchive.cpp index 85fc7bb7..5b77685f 100644 --- a/src/OpenColorIO/OCIOZArchive.cpp +++ b/src/OpenColorIO/OCIOZArchive.cpp @@ -225,7 +225,7 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c std::string configStr = ss.str(); // Write zip to memory stream. - mz_stream_mem_create(&write_mem_stream); + write_mem_stream = mz_stream_mem_create(); mz_stream_mem_set_grow_size(write_mem_stream, 128 * 1024); mz_stream_open(write_mem_stream, NULL, MZ_OPEN_MODE_CREATE); @@ -237,7 +237,7 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c options.compress_level = ArchiveCompressionLevels::BEST; // Create the writer handle. - mz_zip_writer_create(&archiver); + archiver = mz_zip_writer_create(); // Archive options. // Compression method @@ -332,7 +332,7 @@ void ExtractOCIOZArchive(const char * archivePath, const char * destination) std::string outputDestination = pystring::os::path::normpath(destination); // Create zip reader. - mz_zip_reader_create(&extracter); + extracter = mz_zip_reader_create(); MinizipNgHandlerGuard extracterGuard(extracter, false, false); @@ -450,7 +450,7 @@ std::vector getFileStringFromArchiveFile(const std::string & filepath, std::vector buffer; // Create the reader object. - mz_zip_reader_create(&reader); + reader = mz_zip_reader_create(); MinizipNgHandlerGuard extracterGuard(reader, false, true); @@ -510,7 +510,7 @@ void getEntriesMappingFromArchiveFile(const std::string & archivePath, void *reader = NULL; // Create the reader object. - mz_zip_reader_create(&reader); + reader = mz_zip_reader_create(); MinizipNgHandlerGuard extracterGuard(reader, false, false); @@ -630,4 +630,4 @@ void CIOPOciozArchive::buildEntries() getEntriesMappingFromArchiveFile(m_archiveAbsPath, m_entries); } -} // namespace OCIO_NAMESPACE \ No newline at end of file +} // namespace OCIO_NAMESPACE diff --git a/src/apps/ocioarchive/main.cpp b/src/apps/ocioarchive/main.cpp index 190cadee..93c622dc 100644 --- a/src/apps/ocioarchive/main.cpp +++ b/src/apps/ocioarchive/main.cpp @@ -235,7 +235,7 @@ int main(int argc, const char **argv) } std::string path = args[0]; - mz_zip_reader_create(&reader); + reader = mz_zip_reader_create(); struct tm tmu_date; err = mz_zip_reader_open_file(reader, path.c_str());