def parse(input):
    out = ffi.new("_cffi_opcode_t[]", 100)
    info = ffi.new("struct _cffi_parse_info_s *")
    info.ctx = ctx
    info.output = out
    info.output_size = len(out)
    for j in range(len(out)):
        out[j] = ffi.cast("void *", -424242)
    res = lib.parse_c_type(info, input.encode('ascii'))
    if res < 0:
        raise ParseError(ffi.string(info.error_message).decode('ascii'),
                         info.error_location)
    assert 0 <= res < len(out)
    result = []
    for j in range(len(out)):
        if out[j] == ffi.cast("void *", -424242):
            assert res < j
            break
        i = int(ffi.cast("intptr_t", out[j]))
        if j == res:
            result.append('->')
        result.append(i)
    return result
dataset/ETHPy150Open johncsnyder/SwiftKitten/cffi/testing/cffi1/test_parse_c_type.py/parse/original