diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-08-01 13:08:25 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-08-01 13:08:25 +0200 |
commit | 27dbf81a7375ccb352a35261c6c9ee3aa3fcb98f (patch) | |
tree | 0c377d26302532372422c852c80583191bc63d0e /tests/lib | |
parent | Merge pull request #14042 from FRIDM636/extcomm-list-delete (diff) | |
download | frr-27dbf81a7375ccb352a35261c6c9ee3aa3fcb98f.tar.xz frr-27dbf81a7375ccb352a35261c6c9ee3aa3fcb98f.zip |
lib: Do not use time_t as a special Lua encoder/decoder
This is purely an integer (long long/long), and causes issues for 32-bit systems.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'tests/lib')
-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 4f492db5b..701e171c8 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); |