[Rpm-maint] [rpm-software-management/rpm] Export rpmGlob() to Lua (PR #2526)

Michal Domonkos notifications at github.com
Tue May 30 07:59:16 UTC 2023


@dmnks commented on this pull request.



> @@ -883,6 +883,30 @@ static int rpm_unsplitargs(lua_State *L)
     return 1;
 }
 
+static int rpm_glob(lua_State *L)
+{
+    const char *pat = luaL_checkstring(L, 1);
+    rpmglobFlags flags = RPMGLOB_NONE;
+    int argc = 0;
+    ARGV_t argv = NULL;
+
+    if (luaL_optstring(L, 2, "c"))
+	flags |= RPMGLOB_NOCHECK;

At first when seeing this I thought it should probably be reversed, this logic, so that "c" stands for CHECK, but then I realized that we want that to be the default...

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

Message ID: <rpm-software-management/rpm/pull/2526/review/1450338278 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230530/34f0c7de/attachment.html>


More information about the Rpm-maint mailing list