Page MenuHomeFreeBSD

D36365.diff
No OneTemporary

D36365.diff

diff --git a/stand/liblua/lutils.c b/stand/liblua/lutils.c
--- a/stand/liblua/lutils.c
+++ b/stand/liblua/lutils.c
@@ -63,6 +63,21 @@
return 1;
}
+static int
+lua_has_command(lua_State *L)
+{
+ const char *cmd;
+
+ if (lua_gettop(L) != 1) {
+ lua_pushnil(L);
+ return 1;
+ }
+ cmd = luaL_checkstring(L, 1);
+ lua_pushinteger(L, interp_has_builtin_cmd(cmd));
+
+ return 1;
+}
+
static int
lua_perform(lua_State *L)
{
@@ -539,9 +554,9 @@
REG_SIMPLE(interpret),
REG_SIMPLE(parse),
REG_SIMPLE(getenv),
+ REG_SIMPLE(has_command),
REG_SIMPLE(perform),
- /* Also registered as the global 'printc' */
- REG_SIMPLE(printc),
+ REG_SIMPLE(printc), /* Also registered as the global 'printc' */
REG_SIMPLE(setenv),
REG_SIMPLE(time),
REG_SIMPLE(unsetenv),

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 25, 4:31 AM (7 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12730941
Default Alt Text
D36365.diff (767 B)

Event Timeline