/* * Add a new cell to the specified list (which must be non-NIL); * it will be placed after the list cell 'prev' (which must be * non-NULL and a member of 'list'). The data placed in the new cell * is 'datum'. The newly-constructed cell is returned. */ ListCell * lappend_cell(List *list, ListCell *prev, void *datum) { ListCell *new_cell; Assert(IsPointerList(list)); new_cell = add_new_cell(list, prev); lfirst(new_cell) = datum; return new_cell; }
ListCell * lappend_cell_oid(List *list, ListCell *prev, Oid datum) { ListCell *new_cell; Assert(IsOidList(list)); new_cell = add_new_cell(list, prev); lfirst_oid(new_cell) = datum; check_list_invariants(list); return new_cell; }
ListCell * lappend_cell_int(List *list, ListCell *prev, int datum) { ListCell *new_cell; Assert(IsIntegerList(list)); new_cell = add_new_cell(list, prev); lfirst_int(new_cell) = datum; check_list_invariants(list); return new_cell; }