index 54a2ed2d0d703bec5e227dfaafa53ad136753781..01d323b122d6ca25babc161ade270f4b05c60ced 100644 (file)
--- a/src/include/core/data.h
+++ b/src/include/core/data.h
#define SDB_CORE_DATA_H 1
#include "core/time.h"
-#include "utils/strbuf.h"
#include <inttypes.h>
#include <stddef.h>
/*
* sdb_data_format:
- * Append the specified datum to the specified string buffer using a default
- * format.
+ * Output the specified datum to the specified string using a default format.
+ * If the buffer size is less than the return value of sdb_data_strlen, the
+ * datum may be truncated. The buffer will always be nul-terminated after
+ * calling this function.
*
* Returns:
* - 0 on success
* - a negative value else
*/
int
-sdb_data_format(sdb_data_t *datum, sdb_strbuf_t *buf);
+sdb_data_format(sdb_data_t *datum, char *buf, size_t buflen);
#ifdef __cplusplus
} /* extern "C" */