Skip to content

Commit

Permalink
Fix python blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
cal-pratt committed Jan 27, 2025
1 parent ec493b1 commit c4803df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/indexed_bzip2/BZ2Reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ class BZ2Reader final :
#ifdef WITH_PYTHON_SUPPORT
explicit
BZ2Reader( const std::string& filePath ) :
BZ2Reader( std::make_unique<StandardFileReader>( filePath ) )
BZ2Reader( std::make_unique<rapidgzip::StandardFileReader>( filePath ) )
{}

explicit
BZ2Reader( int fileDescriptor ) :
BZ2Reader( std::make_unique<StandardFileReader>( fileDescriptor ) )
BZ2Reader( std::make_unique<rapidgzip::StandardFileReader>( fileDescriptor ) )
{}

explicit
BZ2Reader( PyObject* pythonObject ) :
BZ2Reader( std::make_unique<PythonFileReader>( pythonObject ) )
BZ2Reader( std::make_unique<rapidgzip::PythonFileReader>( pythonObject ) )
{}
#endif

Expand Down Expand Up @@ -262,7 +262,7 @@ class BZ2Reader final :
nBytesDecoded += decodeStream( writeFunctor, nBytesToRead - nBytesDecoded );

#ifdef WITH_PYTHON_SUPPORT
checkPythonSignalHandlers();
rapidgzip::checkPythonSignalHandlers();
#endif
}
m_currentPosition += nBytesDecoded;
Expand Down
4 changes: 2 additions & 2 deletions src/indexed_bzip2/ParallelBZ2Reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ class ParallelBZ2Reader final :
std::shared_ptr<BlockFetcher::BlockData> blockData;

#ifdef WITH_PYTHON_SUPPORT
checkPythonSignalHandlers();
const ScopedGILUnlock unlockedGIL;
rapidgzip::checkPythonSignalHandlers();
const rapidgzip::ScopedGILUnlock unlockedGIL;
#endif

auto blockInfo = m_blockMap->findDataOffset( m_currentPosition );
Expand Down

0 comments on commit c4803df

Please sign in to comment.