[Rpm-maint] [rpm-software-management/rpm] Auto-print returned values from Lua macros (PR #1837)
Michael Schroeder
notifications at github.com
Mon Nov 22 13:39:09 UTC 2021
@mlschroe commented on this pull request.
> rpmlog(RPMLOG_ERR, _("lua script failed: %s\n"),
lua_tostring(L, -1));
lua_pop(L, 1);
goto exit;
}
+
+ int nret = lua_gettop(L) - otop;
+ if (nret > 0 && lua->printbuf) {
+ lua_getglobal(L, "print");
+ lua_insert(L, -(nret + 1));
+ if (lua_pcall(L, nret, 0, 0) != 0) {
+ rpmlog(RPMLOG_ERR, _("result print failed: %s\n"),
+ lua_tostring(L, -1));
+ lua_pop(L, 1);
`goto exit;` ?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1837#pullrequestreview-812544552
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20211122/c47fb6b7/attachment-0001.html>
More information about the Rpm-maint
mailing list