Skip to content

Commit

Permalink
Revert "fixes bug"
Browse files Browse the repository at this point in the history
This reverts commit f6d1951.
  • Loading branch information
actboy168 committed Apr 3, 2024
1 parent f6d1951 commit 98b03ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions binding/lua_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ namespace bee::lua_socket {
fd = net::retired_fd;
return 1;
}
static int mt_tostring(lua_State* L, net::fd_t fd) {
static int mt_tostring(lua_State* L, net::fd_t& fd) {
if (fd == net::retired_fd) {
lua_pushstring(L, "socket (closed)");
return 1;
Expand Down Expand Up @@ -343,7 +343,7 @@ namespace bee::lua_socket {
luaL_setfuncs(L, lib, 0);
lua_setfield(L, -2, "__index");
luaL_Reg mt[] = {
{ "__tostring", call_socket<mt_tostring> },
{ "__tostring", call_socketref<mt_tostring> },
{ "__close", mt_close },
{ "__gc", mt_gc },
{ NULL, NULL },
Expand Down Expand Up @@ -372,7 +372,7 @@ namespace bee::lua_socket {
luaL_setfuncs(L, lib, 0);
lua_setfield(L, -2, "__index");
luaL_Reg mt[] = {
{ "__tostring", call_socket_no_ownership<mt_tostring> },
{ "__tostring", call_socketref_no_ownership<mt_tostring> },
{ NULL, NULL },
};
luaL_setfuncs(L, mt, 0);
Expand Down

0 comments on commit 98b03ab

Please sign in to comment.