diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-10-15 09:23:57 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-10-15 09:23:57 +0000 |
commit | 297174b1e89f882f7bfd1767484f14fa863ad3a9 (patch) | |
tree | 1319556e33dd6c016ce96ad371aec93fac9fd29a /laugeas.c | |
parent | 5179a4ebc4ef86a7302a3858a701c6dda6f59272 (diff) | |
download | lua-augeas-297174b1e89f882f7bfd1767484f14fa863ad3a9.tar.bz2 lua-augeas-297174b1e89f882f7bfd1767484f14fa863ad3a9.tar.xz |
implement defnode()
Diffstat (limited to 'laugeas.c')
-rw-r--r-- | laugeas.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -115,6 +115,15 @@ static int Paug_defvar(lua_State *L) return pushresult(L, aug_defvar(a, name, expr), a, NULL); } +static int Paug_defnode(lua_State *L) +{ + augeas *a = Paug_checkarg(L, 1); + const char *name = luaL_checkstring(L, 2); + const char *expr = luaL_checkstring(L, 3); + const char *value = luaL_checkstring(L, 4); + return pushresult(L, aug_defnode(a, name, expr, value, NULL), a, NULL); +} + static int Paug_close(lua_State *L) { augeas *a = Paug_checkarg(L, 1); @@ -211,6 +220,7 @@ static int Paug_print(lua_State *L) static const luaL_reg Paug_methods[] = { {"init", Paug_init}, {"defvar", Paug_defvar}, + {"defnode", Paug_defnode}, {"close", Paug_close}, {"get", Paug_get}, {"set", Paug_set}, |