Module: sip-router
Branch: master
Commit: a75afdd69929eabf014ba5958898182ae2478dcb
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a75afdd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Dec 23 09:33:26 2011 +0100
libsrdb1: macro to return unsigned it from db value
---
lib/srdb1/db_val.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/lib/srdb1/db_val.h b/lib/srdb1/db_val.h
index 2e5b166..2ad07be 100644
--- a/lib/srdb1/db_val.h
+++ b/lib/srdb1/db_val.h
@@ -126,6 +126,13 @@ typedef struct {
/**
+ * Use this macro if you need to access the integer value in the db_val_t structure
+ * casted to unsigned int.
+ */
+#define VAL_UINT(dv) ((unsigned int)(dv)->val.int_val)
+
+
+/**
* Use this macro if you need to access the long long value in the db_val_t structure.
*/
#define VAL_BIGINT(dv) ((dv)->val.ll_val)