def check_string(result, func, cargs): if result: s = string_at(result) free(result) else: s = '' return s.decode()
def check_string(result, func, cargs): if result: s = string_at(result) free(result) else: s = '' return s.decode(GEOIP_DEFAULT_ENCODING)
from ctypes import POINTER, Structure, c_char_p, c_float, c_int, string_at