We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d00878b commit b2bbdc5Copy full SHA for b2bbdc5
Lib/_pyrepl/_minimal_curses.py
@@ -34,7 +34,7 @@ def _find_clib() -> str:
34
clib.setupterm.restype = ctypes.c_int
35
36
clib.tigetstr.argtypes = [ctypes.c_char_p]
37
-clib.tigetstr.restype = ctypes.POINTER(ctypes.c_char)
+clib.tigetstr.restype = ctypes.c_ssize_t
38
39
clib.tparm.argtypes = [ctypes.c_char_p] + 9 * [ctypes.c_int] # type: ignore[operator]
40
clib.tparm.restype = ctypes.c_char_p
@@ -56,7 +56,7 @@ def tigetstr(cap):
56
if not isinstance(cap, bytes):
57
cap = cap.encode("ascii")
58
result = clib.tigetstr(cap)
59
- if ctypes.cast(result, ctypes.c_void_p).value == ERR:
+ if result == ERR:
60
return None
61
return ctypes.cast(result, ctypes.c_char_p).value
62
0 commit comments