mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.13] gh-129805: Fix bytes
annotation in Tools/jit
(GH-129806) (#130216)
(cherry picked from commit 422f8e9e02
)
This commit is contained in:
parent
831695b04c
commit
4d941d3fd1
1 changed files with 13 additions and 4 deletions
|
@ -102,7 +102,7 @@ class _Target(typing.Generic[_S, _R]):
|
|||
raise NotImplementedError(type(self))
|
||||
|
||||
def _handle_relocation(
|
||||
self, base: int, relocation: _R, raw: bytes
|
||||
self, base: int, relocation: _R, raw: bytes | bytearray
|
||||
) -> _stencils.Hole:
|
||||
raise NotImplementedError(type(self))
|
||||
|
||||
|
@ -275,7 +275,10 @@ class _COFF(
|
|||
return _stencils.symbol_to_value(name)
|
||||
|
||||
def _handle_relocation(
|
||||
self, base: int, relocation: _schema.COFFRelocation, raw: bytes
|
||||
self,
|
||||
base: int,
|
||||
relocation: _schema.COFFRelocation,
|
||||
raw: bytes | bytearray,
|
||||
) -> _stencils.Hole:
|
||||
match relocation:
|
||||
case {
|
||||
|
@ -366,7 +369,10 @@ class _ELF(
|
|||
}, section_type
|
||||
|
||||
def _handle_relocation(
|
||||
self, base: int, relocation: _schema.ELFRelocation, raw: bytes
|
||||
self,
|
||||
base: int,
|
||||
relocation: _schema.ELFRelocation,
|
||||
raw: bytes | bytearray,
|
||||
) -> _stencils.Hole:
|
||||
symbol: str | None
|
||||
match relocation:
|
||||
|
@ -442,7 +448,10 @@ class _MachO(
|
|||
stencil.holes.append(hole)
|
||||
|
||||
def _handle_relocation(
|
||||
self, base: int, relocation: _schema.MachORelocation, raw: bytes
|
||||
self,
|
||||
base: int,
|
||||
relocation: _schema.MachORelocation,
|
||||
raw: bytes | bytearray,
|
||||
) -> _stencils.Hole:
|
||||
symbol: str | None
|
||||
match relocation:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue