Skip to content

Commit

Permalink
Update NULL repr to match ctypes LP naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ionite34 committed Feb 8, 2023
1 parent 6412e87 commit c1050cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/einspect/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class _Null_LP_PyObject(POINTER(PyObject)):

def __repr__(self) -> str:
"""Returns the string representation of the pointer."""
return f"<NULL ptr[PyObject] at {addressof(self):#04x}>"
return f"<Null LP_PyObject at {addressof(self):#04x}>"

def __eq__(self, other) -> bool:
"""Returns equal to other null pointers."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_null_lp_repr() -> None:
obj = _Null_LP_PyObject()
assert repr(obj).startswith("<NULL ptr[PyObject] at")
assert repr(obj).startswith("<Null LP_PyObject at")


def test_null_lp_eq() -> None:
Expand Down

0 comments on commit c1050cc

Please sign in to comment.