def setUp(self):
        """Bind to the c_helper library and provide the ctypes wrapper.
        """
        list_t = ctypes.c_void_p
        iter_t = ctypes.c_void_p

        def wrap(name, restype, argtypes=()):
            proto = ctypes.CFUNCTYPE(restype, *argtypes)
            return proto(_helperlib.c_helpers[name])

        # numba_test_list()
        self.numba_test_list = wrap(
            'test_list',
            ctypes.c_int,
        )

        # numba_list_new(NB_List *l, Py_ssize_t item_size, Py_ssize_t allocated)
        self.numba_list_new = wrap(
            'list_new',
            ctypes.c_int,
            [ctypes.POINTER(list_t), ctypes.c_ssize_t, ctypes.c_ssize_t],
        )
        # numba_list_free(NB_List *l)
        self.numba_list_free = wrap(
            'list_free',
            None,
            [list_t],
        )
        # numba_list_length(NB_List *l)
        self.numba_list_length = wrap(
            'list_length',
            ctypes.c_int,
            [list_t],
        )
        # numba_list_allocated(NB_List *l)
        self.numba_list_allocated = wrap(
            'list_allocated',
            ctypes.c_int,
            [list_t],
        )
        # numba_list_is_mutable(NB_List *lp)
        self.numba_list_is_mutable = wrap(
            'list_is_mutable',
            ctypes.c_int,
            [list_t],
        )
        # numba_list_set_is_mutable(NB_List *lp, int is_mutable)
        self.numba_list_set_is_mutable = wrap(
            'list_set_is_mutable',
            None,
            [list_t, ctypes.c_int],
        )
        # numba_list_setitem(NB_List *l, Py_ssize_t i, const char *item)
        self.numba_list_setitem = wrap(
            'list_setitem',
            ctypes.c_int,
            [list_t, ctypes.c_ssize_t, ctypes.c_char_p],
        )
        # numba_list_append(NB_List *l, const char *item)
        self.numba_list_append = wrap(
            'list_append',
            ctypes.c_int,
            [list_t, ctypes.c_char_p],
        )
        # numba_list_getitem(NB_List *l,  Py_ssize_t i, char *out)
        self.numba_list_getitem = wrap(
            'list_getitem',
            ctypes.c_int,
            [list_t, ctypes.c_ssize_t, ctypes.c_char_p],
        )
        # numba_list_delitem(NB_List *l,  Py_ssize_t i)
        self.numba_list_delitem = wrap(
            'list_delitem',
            ctypes.c_int,
            [list_t, ctypes.c_ssize_t],
        )
        # numba_list_delete_slice(NB_List *l,
        #                         Py_ssize_t start,
        #                         Py_ssize_t stop,
        #                         Py_ssize_t step)
        self.numba_list_delete_slice = wrap(
            'list_delete_slice',
            ctypes.c_int,
            [list_t, ctypes.c_ssize_t, ctypes.c_ssize_t, ctypes.c_ssize_t],
        )
        # numba_list_iter_sizeof()
        self.numba_list_iter_sizeof = wrap(
            'list_iter_sizeof',
            ctypes.c_size_t,
        )
        # numba_list_iter(NB_ListIter *it, NB_List *l)
        self.numba_list_iter = wrap(
            'list_iter',
            None,
            [
                iter_t,
                list_t,
            ],
        )
        # numba_list_iter_next(NB_ListIter *it, const char **item_ptr)
        self.numba_list_iter_next = wrap(
            'list_iter_next',
            ctypes.c_int,
            [
                iter_t,                             # it
                ctypes.POINTER(ctypes.c_void_p),    # item_ptr
            ],
        )
Bind to the c_helper library and provide the ctypes wrapper.
        
numba/tests/test_listimpl.py