Re: Adding doubly linked list type which stores the number of items in the list
| От | Aleksander Alekseev |
|---|---|
| Тема | Re: Adding doubly linked list type which stores the number of items in the list |
| Дата | |
| Msg-id | CAJ7c6TMRHfoOMM_qSF6gtP=-hRvm+q9tRDKSO100=eBF4J501Q@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Adding doubly linked list type which stores the number of items in the list (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
| Ответы |
Re: Adding doubly linked list type which stores the number of items in the list
|
| Список | pgsql-hackers |
Hi hackers,
> I will take another look at v3 tomorrow and probably mark it RfC.
I very much like the patch. While on it:
```
+static inline bool
+dclist_is_empty(dclist_head *head)
+{
+ Assert(dlist_is_empty(&head->dlist) == (head->count == 0));
+ return (head->count == 0);
+}
```
Should we consider const'ifying the arguments of the dlist_*/dclist_*
functions that don't change the arguments?
Additionally it doesn't seem that we have any unit tests for dlist /
dclist. Should we consider adding unit tests for them to
src/test/regress?
To clarify, IMO both questions are out of scope of this specific patch
and should be submitted separately.
--
Best regards,
Aleksander Alekseev
В списке pgsql-hackers по дате отправления: