summaryrefslogtreecommitdiff
path: root/plist.h
diff options
context:
space:
mode:
Diffstat (limited to 'plist.h')
-rw-r--r--plist.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/plist.h b/plist.h
index 3839e4a..c6f93c1 100644
--- a/plist.h
+++ b/plist.h
@@ -99,6 +99,15 @@ plist_node_init(struct plist_node *pnode, unsigned int priority)
}
/*
+ * Return the priority associated with a node.
+ */
+static inline unsigned int
+plist_node_priority(const struct plist_node *pnode)
+{
+ return pnode->priority;
+}
+
+/*
* Return true if pnode is in no priority lists.
*/
static inline bool
@@ -203,9 +212,10 @@ plist_singular(const struct plist *plist)
/*
* Add a node to a priority list.
+ *
+ * The node must be initialized before calling this function.
*/
-void plist_add(struct plist *plist, struct plist_node *pnode,
- unsigned int priority);
+void plist_add(struct plist *plist, struct plist_node *pnode);
/*
* Remove a node from a priority list.