in apisix/runner/utils/common.py [0:0]
def parse_list_vector(cls: object, ty: int, out_bytes: bool = False) -> list:
res = []
if out_bytes:
res = bytearray()
fn = listVectorParseFuncNames.get(ty)
if not fn:
return res
length = getattr(cls, "%sLength" % fn)()
if not length or length == 0:
return res
for i in range(length):
val = getattr(cls, fn)(i)
res.append(val)
return res