Skip to content

Commit

Permalink
Update _Null_LP_PyObject to use types.Pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
ionite34 committed Feb 8, 2023
1 parent dc4ab58 commit 6412e87
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/einspect/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from einspect import types
from einspect.structs.py_object import PyObject
from einspect.types import PyCFuncPtrType
from einspect.types import Pointer, PyCFuncPtrType


class _Null_LP_PyObject(POINTER(PyObject)):
Expand All @@ -18,8 +18,7 @@ def __repr__(self) -> str:

def __eq__(self, other) -> bool:
"""Returns equal to other null pointers."""
# noinspection PyUnresolvedReferences
if isinstance(other, ctypes._Pointer):
if isinstance(other, Pointer):
return not other

if isinstance(type(other), PyCFuncPtrType):
Expand Down

0 comments on commit 6412e87

Please sign in to comment.