浏览代码

libsrdb1: macro to return unsigned it from db value

Daniel-Constantin Mierla 13 年之前
父节点
当前提交
a75afdd699
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      lib/srdb1/db_val.h

+ 7 - 0
lib/srdb1/db_val.h

@@ -125,6 +125,13 @@ typedef struct {
 #define VAL_INT(dv)    ((dv)->val.int_val)
 
 
+/**
+ * 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.
  */