def use_c_pointer(x):
 threadstate = savethread()
 x += 1
 restorethread(threadstate)
 return x

def use_c_pointer ( x ) : threadstate = savethread ( ) x += 1 restorethread ( threadstate ) return x
running in python will cause a segfault .