diff options
| author | Alex Pickering <alex@cogarr.net> | 2021-09-12 16:58:26 -0500 |
|---|---|---|
| committer | Alex Pickering <alex@cogarr.net> | 2021-09-12 16:58:26 -0500 |
| commit | 346304da786a652f25f73ee80957ec6fd16716c8 (patch) | |
| tree | 682717483aa24b6119d82856d48038345f44f7aa /src/lua-nng.c | |
| parent | 835cda73fe2cf1d8c99d7599e9bfb92cd70444e9 (diff) | |
| download | lua-nng-346304da786a652f25f73ee80957ec6fd16716c8.tar.gz lua-nng-346304da786a652f25f73ee80957ec6fd16716c8.tar.bz2 lua-nng-346304da786a652f25f73ee80957ec6fd16716c8.zip | |
Line endings to unix
Convert all line endings to unix line endings.
Diffstat (limited to 'src/lua-nng.c')
| -rw-r--r-- | src/lua-nng.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lua-nng.c b/src/lua-nng.c index 649a022..230c6fb 100644 --- a/src/lua-nng.c +++ b/src/lua-nng.c @@ -27,11 +27,17 @@ #include <string.h> #include "lua-nng-aio.h" +#include "lua-nng-common.h" + +/*#ifndef luaL_setmetatable*/ + /*#define luaL_setmetatable lua_setmetatable*/ +/*#endif*/ + + /*** The lua binding of Nanomessage Next Generation @namespace nng */ -@namespace nng #define OPEN(name)\ int lnng_ ## name ## _open(lua_State *L){\ nng_socket *s = (nng_socket*)lua_newuserdata(L,sizeof(nng_socket));\ @@ -462,7 +468,7 @@ int lnng_socket_get(lua_State *L){ lua_pop(L,2); //If none of the above options matched, get the value from the metatable - int type = luaL_getmetatable(L,"nng.socket_m");////{socket_m} + luaL_getmetatable(L,"nng.socket_m");////{socket_m} /*luaL_newlib(L,nng_socket_m);*/ lua_getfield(L,-1,"__index"); lua_getfield(L,-1,flag);//{socket_m},{socket},any @@ -534,7 +540,7 @@ int lnng_dialer_get(lua_State *L){ SOCKET_OPTION_GET(L, dialer, flag, NNG_OPT_URL, char*, nng_dialer_get_string, lua_pushstring); //read-only for dialers, listeners, and pipes //If none of the above options matched, get the value from the metatable - int type = luaL_getmetatable(L,"nng.dialer_m");////{socket_m} + luaL_getmetatable(L,"nng.dialer_m");////{socket_m} /*luaL_newlib(L,nng_socket_m);*/ lua_getfield(L,-1,"__index"); lua_getfield(L,-1,flag);//{socket_m},{socket},any |
