@@ -747,8 +747,8 @@ _zstd.ZstdCompressor.set_pledged_input_size
747747Set the uncompressed content size to be written into the frame header.
748748
749749This method can be used to ensure the header of the frame about to be written
750- includes the size of the data, unless CompressionParameter.content_size_flag is
751- set to False. If last_mode != FLUSH_FRAME, then a RuntimeError is raised.
750+ includes the size of the data, unless the CompressionParameter.content_size_flag
751+ is set to False. If last_mode != FLUSH_FRAME, then a RuntimeError is raised.
752752
753753It is important to ensure that the pledged data size matches the actual data
754754size. If they do not match the compressed output data may be corrupted and the
@@ -760,8 +760,6 @@ _zstd_ZstdCompressor_set_pledged_input_size_impl(ZstdCompressor *self,
760760 unsigned long long size )
761761/*[clinic end generated code: output=3a09e55cc0e3b4f9 input=563b9a1ddd4facc3]*/
762762{
763- size_t zstd_ret ;
764-
765763 // Error occured while converting argument, should be unreachable
766764 assert (size != ZSTD_CONTENTSIZE_ERROR );
767765
@@ -778,7 +776,7 @@ _zstd_ZstdCompressor_set_pledged_input_size_impl(ZstdCompressor *self,
778776 }
779777
780778 /* Set pledged content size */
781- zstd_ret = ZSTD_CCtx_setPledgedSrcSize (self -> cctx , size );
779+ size_t zstd_ret = ZSTD_CCtx_setPledgedSrcSize (self -> cctx , size );
782780 PyMutex_Unlock (& self -> lock );
783781 if (ZSTD_isError (zstd_ret )) {
784782 _zstd_state * mod_state = PyType_GetModuleState (Py_TYPE (self ));
0 commit comments