Comparison

util-src/ringbuffer.c @ 7888:74187ee6ed55

util.ringbuffer: Remove address of buffer itself from __tostring since is now in the same struct
author Kim Alvefur <zash@zash.se>
date Sun, 12 Feb 2017 15:51:32 +0100
parent 7835:a809dcfd0c5b
child 7889:b8d694646597
comparison
equal deleted inserted replaced
7886:679746cdf3cc 7888:74187ee6ed55
137 return 1; 137 return 1;
138 } 138 }
139 139
140 int rb_tostring(lua_State* L) { 140 int rb_tostring(lua_State* L) {
141 ringbuffer* b = luaL_checkudata(L, 1, "ringbuffer_mt"); 141 ringbuffer* b = luaL_checkudata(L, 1, "ringbuffer_mt");
142 lua_pushfstring(L, "ringbuffer: %p->%p %d/%d", b, b->buffer, b->blen, b->alen); 142 lua_pushfstring(L, "ringbuffer: %p %d/%d", b, b->blen, b->alen);
143 return 1; 143 return 1;
144 } 144 }
145 145
146 int rb_length(lua_State* L) { 146 int rb_length(lua_State* L) {
147 ringbuffer* b = luaL_checkudata(L, 1, "ringbuffer_mt"); 147 ringbuffer* b = luaL_checkudata(L, 1, "ringbuffer_mt");