This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch eolian/improvements
in repository efl.
View the commit online.
commit e4dbe9526f8e0db229993456135f4fdb1eeaceff
Author: Cedric BAIL <[email protected]>
AuthorDate: Tue Aug 18 21:43:13 2026 -0600
eolian: say "may be NULL" in the generated documentation
A reader of a generated header should not have to open the .eo file to learn that
NULL is a meaningful value. Where a parameter or a return carries @nullable, the
doc comment now says so:
@param[in] name The name to look for. May be @c NULL.
@param[in] fallback Used when nothing matched.
@return What was found. May be @c NULL.
Only the annotated ones get it, which is the point: before @nullable existed the
answer was in prose if it was written down at all, and a reader had no way to tell
"nothing said" from "cannot be NULL".
Co-Authored-By: Claude Opus 5 <[email protected]>
---
src/bin/eolian/docs.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 2f27a107b2..f5ca47da8b 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -660,6 +660,12 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
indent, curl, buf, wbuf);
}
+ /* a reader of the header should not have to consult the .eo to learn
+ * that NULL is a meaningful value here
+ */
+ if (eolian_parameter_is_nullable(par))
+ eina_strbuf_append(buf, " May be @c NULL.");
+
eina_strbuf_append_char(buf, '\n');
if (!eina_iterator_next(itr, (void**)&par))
{
@@ -692,6 +698,9 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
const char *rsum = eolian_documentation_summary_get(rdoc);
_append_section(state, SUMMARY_OR_DEFAULT(rsum), indent,
curl, buf, wbuf);
+ /* same reason as for parameters: say it in the header */
+ if (eolian_function_return_is_nullable(fid, ftype))
+ eina_strbuf_append(buf, " May be @c NULL.");
eina_strbuf_append_char(buf, '\n');
if (since)
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.