[Rpm-maint] [rpm-software-management/rpm] Add support for defining literal macros via a new modifier syntax (PR #4129)

Panu Matilainen notifications at github.com
Tue Mar 24 09:22:22 UTC 2026


@pmatilai commented on this pull request.



>      } else if (c == '{') {	/* XXX permit silent {...} grouping */
 	if ((se = matchchar(s, c, '}')) == NULL) {
 	    rpmMacroBufErr(mb, 1, _("Macro %%%s has unterminated body\n"), n);
 	    se = s;	/* XXX W2DO? */
 	    goto exit;
 	}
 	s++;	/* XXX skip { */
-	strncpy(b, s, (se - 1 - s));
-	b[se - 1 - s] = '\0';
-	be += strlen(b);
+	body = str.substr(s - se, (se - 1 - s));

Added a test + your suggested fix.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4129#discussion_r2980159447
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4129/review/3997576112 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260324/5f4c8294/attachment.htm>


More information about the Rpm-maint mailing list