예제 #1
0
파일: zsocket.c 프로젝트: ajtulloch/lzmq
void luazmq_socket_initlib (lua_State *L, int nup){
#ifdef LUAZMQ_DEBUG
  int top = lua_gettop(L);
#endif

  luazmq_createmeta(L, LUAZMQ_SOCKET, luazmq_skt_methods, nup);
  lua_pop(L, 1);

#ifdef LUAZMQ_DEBUG
  assert(top == (lua_gettop(L) + nup));
#endif

  luazmq_register_consts(L, skt_types);
  luazmq_register_consts(L, skt_options);
  luazmq_register_consts(L, skt_flags);
  luazmq_register_consts(L, skt_security_mechanism);
}
예제 #2
0
파일: zerror.c 프로젝트: Testground/lua-zmq
void luazmq_error_initlib(lua_State *L, int nup){
#ifdef LUAZMQ_DEBUG
  int top = lua_gettop(L);
#endif

  luazmq_createmeta(L, LUAZMQ_ERROR, luazmq_err_methods, nup);
  lua_pop(L, 1);

#ifdef LUAZMQ_DEBUG
  assert(top == (lua_gettop(L) + nup));
#endif

  luazmq_register_consts(L, zmq_err_codes);

  lua_newtable(L);
  luazmq_register_consts(L, zmq_err_codes);
  luazmq_register_consts_invers(L,zmq_err_codes);
  lua_setfield(L,-2, "errors");
}
예제 #3
0
파일: zmsg.c 프로젝트: jrossi/lzmq
void luazmq_message_initlib(lua_State *L, int nup){
#ifdef LUAZMQ_DEBUG
  int top = lua_gettop(L);
#endif

  luazmq_createmeta(L, LUAZMQ_MESSAGE, luazmq_msg_methods, nup);
  lua_pop(L, 1);

#ifdef LUAZMQ_DEBUG
  assert(top == (lua_gettop(L) + nup));
#endif

  luazmq_register_consts(L, msg_options);
}