diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2023-08-01 23:52:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-01 23:52:56 -0500 |
| commit | ec8ae8f093d34a7236774ddf914b6edb205fe526 (patch) | |
| tree | 135b60e06122d220cfd2c93f44c8201ae02e918e /tests/lib/test_frrlua.c | |
| parent | 5da58d355a094100ddedb861aa5555be8a4ea1bf (diff) | |
| parent | 27dbf81a7375ccb352a35261c6c9ee3aa3fcb98f (diff) | |
Merge pull request #14125 from opensourcerouting/fix/drop_unused_lua_stuff
lib: Do not use time_t as a special Lua encoder/decoder
Diffstat (limited to 'tests/lib/test_frrlua.c')
| -rw-r--r-- | tests/lib/test_frrlua.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/test_frrlua.c b/tests/lib/test_frrlua.c index 4f492db5bf..701e171c84 100644 --- a/tests/lib/test_frrlua.c +++ b/tests/lib/test_frrlua.c @@ -22,10 +22,11 @@ static void test_encode_decode(void) assert(lua_gettop(L) == 0); time_t time_a = 100; - time_t time_b = time_a; + time_t time_b; - lua_pushtimet(L, &time_a); - lua_decode_timet(L, -1, &time_a); + lua_pushinteger(L, time_a); + time_b = lua_tointeger(L, -1); + lua_pop(L, 1); assert(time_a == time_b); assert(lua_gettop(L) == 0); |
