Lines Matching refs:ctypes
165 # exposed at the Python level. This test relies on ctypes to get at it.
168 import ctypes
171 print "test_PyThreadState_SetAsyncExc can't import ctypes"
174 set_async_exc = ctypes.pythonapi.PyThreadState_SetAsyncExc
179 exception = ctypes.py_object(AsyncExc)
185 result = set_async_exc(ctypes.c_long(tid), exception)
231 result = set_async_exc(ctypes.c_long(-1), exception)
244 result = set_async_exc(ctypes.c_long(t.id), exception)
276 import ctypes
279 print("test_finalize_with_runnning_thread can't import ctypes")
283 import ctypes, sys, time, thread
292 ensure = ctypes.pythonapi.PyGILState_Ensure
293 release = ctypes.pythonapi.PyGILState_Release