Code

data: Return the number of bytes that would have been returned.
[sysdb.git] / src / include / core / data.h
index c037fb00e2a1f8f91ea09d057b7a5064be2f91ca..e529fb9ceec24749aca3efdf8841bbc2dd073e23 100644 (file)
@@ -55,7 +55,8 @@ enum {
 };
 
 #define SDB_TYPE_TO_STRING(t) \
-       (((t) == SDB_TYPE_INTEGER) ? "INTEGER" \
+       (((t) == SDB_TYPE_NULL) ? "NULL" \
+               : ((t) == SDB_TYPE_INTEGER) ? "INTEGER" \
                : ((t) == SDB_TYPE_DECIMAL) ? "DECIMAL" \
                : ((t) == SDB_TYPE_STRING) ? "STRING" \
                : ((t) == SDB_TYPE_DATETIME) ? "DATETIME" \
@@ -289,9 +290,8 @@ enum {
  *  - the number of characters written to the buffer (excluding the terminated
  *    null byte) or the number of characters which would have been written in
  *    case the output was truncated
- *  - a negative value else
  */
-int
+size_t
 sdb_data_format(const sdb_data_t *datum, char *buf, size_t buflen, int quoted);
 
 /*