@@ -54,7 +54,7 @@ namespace hex::plugin::decompress {
54
54
ContentRegistry::PatternLanguage::addFunction (nsHexDec, " zlib_decompress" , FunctionParameterCount::exactly (3 ), [](Evaluator *evaluator, auto params) -> std::optional<Token::Literal> {
55
55
#if IMHEX_FEATURE_ENABLED(ZLIB)
56
56
auto compressedData = getCompressedData (evaluator, params[0 ]);
57
- auto §ion = evaluator->getRuntime (). getSection (u64 (params[1 ].toUnsigned ()));
57
+ auto §ion = evaluator->getSection (u64 (params[1 ].toUnsigned ()));
58
58
auto windowSize = u64 (params[2 ].toUnsigned ());
59
59
60
60
z_stream stream = { };
@@ -105,7 +105,7 @@ namespace hex::plugin::decompress {
105
105
ContentRegistry::PatternLanguage::addFunction (nsHexDec, " bzip_decompress" , FunctionParameterCount::exactly (2 ), [](Evaluator *evaluator, auto params) -> std::optional<Token::Literal> {
106
106
#if IMHEX_FEATURE_ENABLED(BZIP2)
107
107
auto compressedData = getCompressedData (evaluator, params[0 ]);
108
- auto §ion = evaluator->getRuntime (). getSection (u64 (params[1 ].toUnsigned ()));
108
+ auto §ion = evaluator->getSection (u64 (params[1 ].toUnsigned ()));
109
109
110
110
bz_stream stream = { };
111
111
if (BZ2_bzDecompressInit (&stream, 0 , 1 ) != Z_OK) {
@@ -156,7 +156,7 @@ namespace hex::plugin::decompress {
156
156
ContentRegistry::PatternLanguage::addFunction (nsHexDec, " lzma_decompress" , FunctionParameterCount::exactly (2 ), [](Evaluator *evaluator, auto params) -> std::optional<Token::Literal> {
157
157
#if IMHEX_FEATURE_ENABLED(LIBLZMA)
158
158
auto compressedData = getCompressedData (evaluator, params[0 ]);
159
- auto §ion = evaluator->getRuntime (). getSection (u64 (params[1 ].toUnsigned ()));
159
+ auto §ion = evaluator->getSection (u64 (params[1 ].toUnsigned ()));
160
160
161
161
lzma_stream stream = LZMA_STREAM_INIT;
162
162
constexpr static i64 MemoryLimit = 0x40000000 ; // 1GiB
@@ -216,7 +216,7 @@ namespace hex::plugin::decompress {
216
216
ContentRegistry::PatternLanguage::addFunction (nsHexDec, " zstd_decompress" , FunctionParameterCount::exactly (2 ), [](Evaluator *evaluator, auto params) -> std::optional<Token::Literal> {
217
217
#if IMHEX_FEATURE_ENABLED(ZSTD)
218
218
auto compressedData = getCompressedData (evaluator, params[0 ]);
219
- auto §ion = evaluator->getRuntime (). getSection (i64 (params[1 ].toUnsigned ()));
219
+ auto §ion = evaluator->getSection (i64 (params[1 ].toUnsigned ()));
220
220
221
221
ZSTD_DCtx* dctx = ZSTD_createDCtx ();
222
222
if (dctx == nullptr ) {
@@ -286,7 +286,7 @@ namespace hex::plugin::decompress {
286
286
ContentRegistry::PatternLanguage::addFunction (nsHexDec, " lz4_decompress" , FunctionParameterCount::exactly (3 ), [](Evaluator *evaluator, auto params) -> std::optional<Token::Literal> {
287
287
#if IMHEX_FEATURE_ENABLED(LZ4)
288
288
auto compressedData = getCompressedData (evaluator, params[0 ]);
289
- auto §ion = evaluator->getRuntime (). getSection (u64 (params[1 ].toUnsigned ()));
289
+ auto §ion = evaluator->getSection (u64 (params[1 ].toUnsigned ()));
290
290
bool frame = params[2 ].toBoolean ();
291
291
292
292
if (frame) {
0 commit comments