varlink: comment that "more" flag IDL comment is API

External tools that use the systemd varlink ecosystem require
to know if a specific varlink method supports/requires the
"more" flag from the IDL. This is tracked upstream in
https://github.com/varlink/varlink.github.io/issues/26

As an intermediate step systemd adds the (very nice) comments
```
 # [Requires 'more' flag]
or
 # [Supports 'more' flag]
```
to the various methods.

This commit extends the comment around the code that adds the
comment to clarify that this should be considered API and that
the comment should not be changed as external tools (like e.g.
the varlink-http-bridge) rely on it.
This commit is contained in:
Michael Vogt
2026-03-25 12:27:50 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 66feeea8e1
commit 9f691ad3c0
+4 -1
View File
@@ -387,7 +387,10 @@ static int varlink_idl_format_symbol(
/* Sooner or later we want to export this in a proper IDL language construct, see
* https://github.com/varlink/varlink.github.io/issues/26 – but for now export this as a
* comment. */
* comment.
*
* Until this is resolved upsteam, consider this comment part of the API (i.e. don't change
* only extend). It is used by tools like varlink-http-bridge. */
if ((symbol->symbol_flags & (SD_VARLINK_REQUIRES_MORE|SD_VARLINK_SUPPORTS_MORE)) != 0) {
fputs(colors[COLOR_COMMENT], f);
if (FLAGS_SET(symbol->symbol_flags, SD_VARLINK_REQUIRES_MORE))