Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

io_threads parameter now defaults to 1.

  • Loading branch information...
commit bbaa86a552fefd3c86b9b86117d914212a1fb1e0 1 parent 5f8ae64
@Neopallium authored
Showing with 3 additions and 2 deletions.
  1. +2 −2 src/pre_generated-zmq.nobj.c
  2. +1 −0  zmq.nobj.lua
View
4 src/pre_generated-zmq.nobj.c
@@ -3115,7 +3115,7 @@ static const char *zmq_ffi_lua_code[] = { "local ffi=require\"ffi\"\n"
"\n"
"-- method: init\n"
"function _M.init(io_threads1)\n"
-" \n"
+" io_threads1 = io_threads1 or 1\n"
" local rc_zmq_init_flags1 = OBJ_UDATA_FLAG_OWN\n"
" local rc_zmq_init1\n"
" rc_zmq_init1 = C.zmq_init(io_threads1)\n"
@@ -5643,7 +5643,7 @@ static int zmq__version__func(lua_State *L) {
/* method: init */
static int zmq__init__func(lua_State *L) {
- int io_threads1 = luaL_checkinteger(L,1);
+ int io_threads1 = luaL_optinteger(L,1,1);
int rc_zmq_init_flags1 = OBJ_UDATA_FLAG_OWN;
ZMQ_Ctx * rc_zmq_init1;
rc_zmq_init1 = zmq_init(io_threads1);
View
1  zmq.nobj.lua
@@ -199,6 +199,7 @@ c_function "version" {
]],
},
c_function "init" {
+ var_in{ "int", "io_threads?", default = "1" },
c_call "!ZMQ_Ctx *" "zmq_init" { "int", "io_threads" },
},
c_function "init_ctx" {
Please sign in to comment.
Something went wrong with that request. Please try again.