Show More
@@ -292,7 +292,9 b' if HAS_CTYPES:' | |||||
292 | """raises the exception, performs cleanup if needed""" |
|
292 | """raises the exception, performs cleanup if needed""" | |
293 | if not inspect.isclass(exctype): |
|
293 | if not inspect.isclass(exctype): | |
294 | raise TypeError("Only types can be raised (not instances)") |
|
294 | raise TypeError("Only types can be raised (not instances)") | |
295 | res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, |
|
295 | # Explicit cast to c_long is necessary for 64-bit support: | |
|
296 | # See https://bugs.launchpad.net/ipython/+bug/237073 | |||
|
297 | res = ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), | |||
296 | ctypes.py_object(exctype)) |
|
298 | ctypes.py_object(exctype)) | |
297 | if res == 0: |
|
299 | if res == 0: | |
298 | raise ValueError("invalid thread id") |
|
300 | raise ValueError("invalid thread id") |
General Comments 0
You need to be logged in to leave comments.
Login now