Browse Source

Add macros for common list counting without traversing the list.

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

4
common/panel-private.h

@ -37,4 +37,8 @@
/* xfconf property base (printf format) */
#define PANEL_PLUGIN_PROPERTY_BASE "/plugins/plugin-%d"
/* quick GList and GSList counting without traversing */
#define LIST_HAS_ONE_ENTRY(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