[Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

Panu Matilainen notifications at github.com
Mon Oct 12 14:06:07 UTC 2020


> What I objected here is exposing false instead of nil when something is unset.

But there's no such thing in the PR linked to this item at all! That's what's so frustrating to me here and why I've been urging you to look at what was actually implemented for this ticket: https://github.com/rpm-software-management/rpm/commit/67abf72ef57e58251271f5b218f867357d78a4e0

"opts" table always exists so you don't need to test *that* against nil each and every time, and beyond that you get nil's for undefined options, and strings for defined (empty vs non-empty depending on whether it takes an argument or not). The other part is "arg" table (also always existing) where you get leftover arguments as a native Lua sequence, accessible with arg[n] and count with #arg. 

Other improvements in this area are in the works and some already done, but that's beyond the scope here.


-- 
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/issues/1092#issuecomment-707141799
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20201012/a5dac9d8/attachment.html>


More information about the Rpm-maint mailing list