Forráskód Böngészése

libsrdb1: macro to return unsigned it from db value

Daniel-Constantin Mierla 13 éve
szülő
commit
a75afdd699
1 módosított fájl, 7 hozzáadás és 0 törlés
  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)
 #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.
  * Use this macro if you need to access the long long value in the db_val_t structure.
  */
  */