You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by "PengZheng (via GitHub)" <gi...@apache.org> on 2023/03/01 07:29:48 UTC

[GitHub] [celix] PengZheng commented on a diff in pull request #476: Feature/refactor bundle cache

PengZheng commented on code in PR #476:
URL: https://github.com/apache/celix/pull/476#discussion_r1121268286


##########
libs/utils/include/celix_utils.h:
##########
@@ -46,11 +46,42 @@ char* celix_utils_strdup(const char *str);
  */
 unsigned int celix_utils_stringHash(const char* string);
 
+/**
+ * The proposed buffer size to use for celix_utils_writeOrCreateString with a buffer on the stcck.
+ */
+#define CELIX_DEFAULT_STRING_CREATE_BUFFER_SIZE 512
+
+/**`
+ * @brief Format a string to the provided buffer or a newly allocated buffer if the provided buffer is to small.
+ * @param[in,out] buffer The buffer to write the formatted string to.
+ * @param[in] bufferSize The size of the buffer.
+ * @param[in] format The format string.
+ * @param[in] ... The arguments for the format string.
+ * @return The formatted string in the provided buffer or a newly allocated buffer if the provided buffer is to small.

Review Comment:
   On error, NULL is returned, and we should check errno for further information.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org