aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils.h
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-07-02 08:09:07 +0000
committerMartin Willi <martin@strongswan.org>2008-07-02 08:09:07 +0000
commitfca4d3ee03fa7e020ace6512e5488c50fc56ef4a (patch)
treeabf566660044f50c789ccc89bbe60cd3a05ce47f /src/libstrongswan/utils.h
parent2f2b99282aceaa8e001c536d4d231d27da49bea8 (diff)
downloadstrongswan-fca4d3ee03fa7e020ace6512e5488c50fc56ef4a.tar.bz2
strongswan-fca4d3ee03fa7e020ace6512e5488c50fc56ef4a.tar.xz
implementation of a simple "token enumerator"
Diffstat (limited to 'src/libstrongswan/utils.h')
-rw-r--r--src/libstrongswan/utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstrongswan/utils.h b/src/libstrongswan/utils.h
index 8b1a8aaba..2669be61a 100644
--- a/src/libstrongswan/utils.h
+++ b/src/libstrongswan/utils.h
@@ -90,6 +90,11 @@
#define malloc_thing(thing) ((thing*)malloc(sizeof(thing)))
/**
+ * Get the number of elements in an array
+ */
+#define countof(array) (sizeof(array)/sizeof(array[0]))
+
+/**
* Assign a function as a class method
*/
#define ASSIGN(method, function) (method = (typeof(method))function)