Browse Source

Add macro to test if a list is empty or contains one item.

upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
d76ebcf7c3
  1. 1
      common/panel-private.h

1
common/panel-private.h

@ -39,6 +39,7 @@
/* quick GList and GSList counting without traversing */
#define LIST_HAS_ONE_ENTRY(l) ((l) != NULL && (l)->next == NULL)
#define LIST_HAS_ONE_OR_NO_ENTRIES(l) ((l) == NULL || (l)->next == NULL)
#define LIST_HAS_TWO_OR_MORE_ENTRIES(l) ((l) != NULL && (l)->next != NULL)
#endif /* !__PANEL_PRIVATE_H__ */
Loading…
Cancel
Save