summaryrefslogtreecommitdiffstats
path: root/linkedlist.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-02 10:10:11 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-02 10:10:11 +0000
commit9ad676bab098d754b57265fc335a7f045e192d96 (patch)
tree3667c5b1442f1d9fda3498b500d6d21e46e201d8 /linkedlist.h
parentdcec3c8c4e7bfb9c0cb904047d57188f6b377575 (diff)
downloadrsyslog-9ad676bab098d754b57265fc335a7f045e192d96.tar.gz
rsyslog-9ad676bab098d754b57265fc335a7f045e192d96.tar.xz
rsyslog-9ad676bab098d754b57265fc335a7f045e192d96.zip
enhanced linkedList class, new method to get count, new method to execute a
user-supplied function on all members
Diffstat (limited to 'linkedlist.h')
-rw-r--r--linkedlist.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/linkedlist.h b/linkedlist.h
index da38e352..ac67a01b 100644
--- a/linkedlist.h
+++ b/linkedlist.h
@@ -58,5 +58,12 @@ rsRetVal llGetNextElt(linkedList_t *pThis, linkedListCookie_t *ppElt, void **ppU
rsRetVal llAppend(linkedList_t *pThis, void *pKey, void *pData);
rsRetVal llFind(linkedList_t *pThis, void *pKey, void **ppData);
rsRetVal llGetKey(llElt_t *pThis, void **ppData);
+rsRetVal llGetNumElts(linkedList_t *pThis, int *piCnt);
+rsRetVal llExecFunc(linkedList_t *pThis, rsRetVal (*pFunc)(void*, void*), void* pParam);
+/* use the macro below to define a function that will be executed by
+ * llExecFunc()
+ */
+#define DEFFUNC_llExecFunc(funcName)\
+ static rsRetVal funcName(void __attribute__((unused)) *pData, void __attribute__((unused)) *pParam)
#endif /* #ifndef LINKEDLIST_H_INCLUDED */