diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-10-15 08:36:54 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-10-15 08:36:54 +0000 |
commit | 8f79518ff8fe04fd02857a4fcbdc3912ee1dea72 (patch) | |
tree | cc6593bfe50d000fd0daac848210935729b8cf1e | |
parent | 87acf21dd3acf23e035bcbff8223e2863103b1d7 (diff) | |
download | lua-augeas-8f79518ff8fe04fd02857a4fcbdc3912ee1dea72.tar.bz2 lua-augeas-8f79518ff8fe04fd02857a4fcbdc3912ee1dea72.tar.xz |
implement load()
-rw-r--r-- | laugeas.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -149,6 +149,12 @@ static int Paug_save(lua_State *L) return pushresult(L, aug_save(a), a, NULL); } +static int Paug_load(lua_State *L) +{ + augeas *a = Paug_checkarg(L, 1); + return pushresult(L, aug_load(a), a, NULL); +} + static int Paug_print(lua_State *L) { augeas *a; @@ -167,6 +173,7 @@ static const luaL_reg Paug_methods[] = { {"get", Paug_get}, {"set", Paug_set}, {"save", Paug_save}, + {"load", Paug_load}, {"print", Paug_print}, {NULL, NULL} }; |