Also avoid mallocs for the output buffer

This commit is contained in:
Kovid Goyal
2021-09-19 15:28:22 +05:30
parent d5d52ec8b9
commit 85be3e4ed1
3 changed files with 26 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
from typing import Callable, Optional, Tuple
from typing import Callable, Tuple
IO_BUFFER_SIZE: int
@@ -35,5 +35,5 @@ def begin_patch(callback: Callable[[memoryview, int], int]) -> JobCapsule:
pass
def iter_job(job_capsule: JobCapsule, input_data: bytes, eof: Optional[bool] = None, expecting_output: bool = True) -> Tuple[bytes, bool, int]:
def iter_job(job_capsule: JobCapsule, input_data: bytes, output_buf: bytearray) -> Tuple[bool, int, int]:
pass