summaryrefslogtreecommitdiff
path: root/src/sp_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp_list.c')
-rw-r--r--src/sp_list.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sp_list.c b/src/sp_list.c
index 92e628d..ab752f7 100644
--- a/src/sp_list.c
+++ b/src/sp_list.c
@@ -75,3 +75,9 @@ sp_list_node *sp_list_prepend(sp_list_node *list, void *data) {
75 new->data = data; 75 new->data = data;
76 return new; 76 return new;
77} 77}
78
79size_t sp_list_len(sp_list_node *p) {
80 size_t num = 0;
81 for (; p; p = p->next) { num++; }
82 return num;
83}