def topology(func, *args):
 argtypes = [GEOM_PTR]
 if args:
  argtypes += args
 func.argtypes = argtypes
 func.restype = GEOM_PTR
 func.errcheck = check_geom
 return func

def topology ( func , * args ) : argtypes = [ GEOM_PTR ] if args : argtypes += args func . argtypes = argtypes func . restype = GEOM_PTR func . errcheck = check_geom return func
for geos unary topology functions .