Mercurial > prosody-hg
comparison util-src/ringbuffer.c @ 12575:1f6f05a98fcd
util-src: Remove Lua 5.1 compat macros
Part of #1600
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 01 Jul 2022 21:21:21 +0200 |
| parents | c3b3ac63f4c3 |
| children | a187600ec7d6 |
comparison
equal
deleted
inserted
replaced
| 12574:18d33668c5fa | 12575:1f6f05a98fcd |
|---|---|
| 312 | 312 |
| 313 return 1; | 313 return 1; |
| 314 } | 314 } |
| 315 | 315 |
| 316 int luaopen_util_ringbuffer(lua_State *L) { | 316 int luaopen_util_ringbuffer(lua_State *L) { |
| 317 #if (LUA_VERSION_NUM > 501) | |
| 318 luaL_checkversion(L); | 317 luaL_checkversion(L); |
| 319 #endif | |
| 320 | 318 |
| 321 if(luaL_newmetatable(L, "ringbuffer_mt")) { | 319 if(luaL_newmetatable(L, "ringbuffer_mt")) { |
| 322 lua_pushcfunction(L, rb_tostring); | 320 lua_pushcfunction(L, rb_tostring); |
| 323 lua_setfield(L, -2, "__tostring"); | 321 lua_setfield(L, -2, "__tostring"); |
| 324 lua_pushcfunction(L, rb_length); | 322 lua_pushcfunction(L, rb_length); |
