Permalink
Browse files

List_pop() docs

  • Loading branch information...
1 parent a308ba7 commit c8279af03617b1b48ae063a0810ba86cec2f5b5e @tj tj committed Aug 23, 2010
Showing with 7 additions and 1 deletion.
  1. +6 −0 Readme.md
  2. +1 −1 src/list.c
View
6 Readme.md
@@ -27,6 +27,12 @@
List_push(list, ListNode_new("value"));
list->tail->val; // "value"
+## ListNode \* List_pop(List \*self)
+
+ Return / detach node from the end of the list, or __NULL__.
+
+ ListNode *last = List_pop(names);
+
## ListNode \*List_unshift(List \*self, ListNode *node)
Prepend _node_ to _self_, returning _node_.
View
2 src/list.c
@@ -64,7 +64,7 @@ List_push(List *self, ListNode *node) {
}
/*
- * Return the last node in the list, or NULL.
+ * Return / detach the last node in the list, or NULL.
*/
ListNode *

0 comments on commit c8279af

Please sign in to comment.