Change in libosmocore[master]: api doc: clarify OSMO_NAME_C_IMPL() required FUNC_BUF signature

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Tue May 26 20:26:53 UTC 2020


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18489 )


Change subject: api doc: clarify OSMO_NAME_C_IMPL() required FUNC_BUF signature
......................................................................

api doc: clarify OSMO_NAME_C_IMPL() required FUNC_BUF signature

Change-Id: Ibe722d38d28e5590a35e856dd15c2538e6ee0a3e
---
M include/osmocom/core/utils.h
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/18489/1

diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index 40f4446..e637786 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -297,7 +297,9 @@
  * \param[in] INITIAL_BUFSIZE  Which size to first talloc from ctx -- a larger size makes a reallocation less likely, a
  * 	smaller size allocates less unused bytes, zero allocates once but still runs the string composition twice.
  * \param[in] ON_ERROR  String constant to copy on error rc returned by FUNC_BUF, or NULL to return NULL.
- * \param[in] FUNC_BUF  Name of a function with signature foo_buf(char *buf, size_t buflen, ...).
+ * \param[in] FUNC_BUF  Name of a function with signature int foo_buf(char *buf, size_t buflen, ...).
+ *                      The function must return the strlen() that it would write to a sufficiently large buffer or
+ *                      negative on error, like snprintf().
  * \param[in] FUNC_BUF_ARGS  Additional arguments to pass to FUNC_BUF after the buf and buflen.
  */
 #define OSMO_NAME_C_IMPL(CTX, INITIAL_BUFSIZE, ON_ERROR, FUNC_BUF, FUNC_BUF_ARGS...) \

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18489
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibe722d38d28e5590a35e856dd15c2538e6ee0a3e
Gerrit-Change-Number: 18489
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200526/e4b6dc40/attachment.htm>


More information about the gerrit-log mailing list