def int_from_geom(func, zero=False):
 func.argtypes = [GEOM_PTR]
 func.restype = c_int
 if zero:
  func.errcheck = check_zero
 else:
  func.errcheck = check_minus_one
 return func

def int_from_geom ( func , zero = False ) : func . argtypes = [ GEOM_PTR ] func . restype = c_int if zero : func . errcheck = check_zero else : func . errcheck = check_minus_one return func
argument is a geometry .