Skip to content

Commit 99a7d24

Browse files
committed
Remove unnecessary checks for valid port pointer
1 parent 6c06b46 commit 99a7d24

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎jack.py‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,8 +1320,6 @@ def _get_port_ptr(self, port):
13201320
port = port._ptr
13211321
elif isinstance(port, str):
13221322
port = self.get_port_by_name(port)._ptr
1323-
elif not isinstance(port, _ffi.CData):
1324-
raise TypeError("{0!r} is not a JACK port".format(port))
13251323
return port
13261324

13271325
def _wrap_port_ptr(self, ptr):
@@ -1366,9 +1364,6 @@ class Port(object):
13661364
"""
13671365

13681366
def __init__(self, port_ptr):
1369-
if not isinstance(port_ptr, _ffi.CData) or \
1370-
_ffi.typeof(port_ptr) != _ffi.typeof("jack_port_t*"):
1371-
raise TypeError("Invalid port pointer")
13721367
self._ptr = port_ptr
13731368

13741369
def __repr__(self):

0 commit comments

Comments
 (0)