import ctypes
lib = ctypes.CDLL('/home/dahlia/c_char_test.so')
lib.a.restype = ctypes.c_char
lib.a.argtypes = ()
assert lib.a() == '\x01'
lib.b.restype = ctypes.c_char
lib.b.argtypes = ctypes.c_char,
assert lib.b('a') == 'b'
