diff options
Diffstat (limited to 'src/include/nodes/pg_list.h')
-rw-r--r-- | src/include/nodes/pg_list.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h index 38b94aaa012..4d11eb741d9 100644 --- a/src/include/nodes/pg_list.h +++ b/src/include/nodes/pg_list.h @@ -77,7 +77,7 @@ struct ListCell #ifdef USE_INLINE static inline ListCell * -list_head(List *l) +list_head(const List *l) { return l ? l->head : NULL; } @@ -89,15 +89,15 @@ list_tail(List *l) } static inline int -list_length(List *l) +list_length(const List *l) { return l ? l->length : 0; } #else -extern ListCell *list_head(List *l); +extern ListCell *list_head(const List *l); extern ListCell *list_tail(List *l); -extern int list_length(List *l); +extern int list_length(const List *l); #endif /* USE_INLINE */ /* @@ -206,14 +206,14 @@ extern List *lcons_oid(Oid datum, List *list); extern List *list_concat(List *list1, List *list2); extern List *list_truncate(List *list, int new_size); -extern void *list_nth(List *list, int n); -extern int list_nth_int(List *list, int n); -extern Oid list_nth_oid(List *list, int n); +extern void *list_nth(const List *list, int n); +extern int list_nth_int(const List *list, int n); +extern Oid list_nth_oid(const List *list, int n); -extern bool list_member(List *list, void *datum); -extern bool list_member_ptr(List *list, void *datum); -extern bool list_member_int(List *list, int datum); -extern bool list_member_oid(List *list, Oid datum); +extern bool list_member(const List *list, const void *datum); +extern bool list_member_ptr(const List *list, const void *datum); +extern bool list_member_int(const List *list, int datum); +extern bool list_member_oid(const List *list, Oid datum); extern List *list_delete(List *list, void *datum); extern List *list_delete_ptr(List *list, void *datum); @@ -222,19 +222,19 @@ extern List *list_delete_oid(List *list, Oid datum); extern List *list_delete_first(List *list); extern List *list_delete_cell(List *list, ListCell *cell, ListCell *prev); -extern List *list_union(List *list1, List *list2); -extern List *list_union_ptr(List *list1, List *list2); -extern List *list_union_int(List *list1, List *list2); -extern List *list_union_oid(List *list1, List *list2); +extern List *list_union(const List *list1, const List *list2); +extern List *list_union_ptr(const List *list1, const List *list2); +extern List *list_union_int(const List *list1, const List *list2); +extern List *list_union_oid(const List *list1, const List *list2); -extern List *list_intersection(List *list1, List *list2); +extern List *list_intersection(const List *list1, const List *list2); /* currently, there's no need for list_intersection_int etc */ -extern List *list_difference(List *list1, List *list2); -extern List *list_difference_ptr(List *list1, List *list2); -extern List *list_difference_int(List *list1, List *list2); -extern List *list_difference_oid(List *list1, List *list2); +extern List *list_difference(const List *list1, const List *list2); +extern List *list_difference_ptr(const List *list1, const List *list2); +extern List *list_difference_int(const List *list1, const List *list2); +extern List *list_difference_oid(const List *list1, const List *list2); extern List *list_append_unique(List *list, void *datum); extern List *list_append_unique_ptr(List *list, void *datum); @@ -249,8 +249,8 @@ extern List *list_concat_unique_oid(List *list1, List *list2); extern void list_free(List *list); extern void list_free_deep(List *list); -extern List *list_copy(List *list); -extern List *list_copy_tail(List *list, int nskip); +extern List *list_copy(const List *list); +extern List *list_copy_tail(const List *list, int nskip); /* * To ease migration to the new list API, a set of compatibility |