Skip to content
This repository
Browse code

io_threads parameter now defaults to 1.

  • Loading branch information...
commit bbaa86a552fefd3c86b9b86117d914212a1fb1e0 1 parent 5f8ae64
Robert Gabriel Jakabosky authored

Showing 2 changed files with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 src/pre_generated-zmq.nobj.c
  2. +1 0  zmq.nobj.lua
4 src/pre_generated-zmq.nobj.c
@@ -3115,7 +3115,7 @@ static const char *zmq_ffi_lua_code[] = { "local ffi=require\"ffi\"\n"
3115 3115 "\n"
3116 3116 "-- method: init\n"
3117 3117 "function _M.init(io_threads1)\n"
3118   -" \n"
  3118 +" io_threads1 = io_threads1 or 1\n"
3119 3119 " local rc_zmq_init_flags1 = OBJ_UDATA_FLAG_OWN\n"
3120 3120 " local rc_zmq_init1\n"
3121 3121 " rc_zmq_init1 = C.zmq_init(io_threads1)\n"
@@ -5643,7 +5643,7 @@ static int zmq__version__func(lua_State *L) {
5643 5643
5644 5644 /* method: init */
5645 5645 static int zmq__init__func(lua_State *L) {
5646   - int io_threads1 = luaL_checkinteger(L,1);
  5646 + int io_threads1 = luaL_optinteger(L,1,1);
5647 5647 int rc_zmq_init_flags1 = OBJ_UDATA_FLAG_OWN;
5648 5648 ZMQ_Ctx * rc_zmq_init1;
5649 5649 rc_zmq_init1 = zmq_init(io_threads1);
1  zmq.nobj.lua
@@ -199,6 +199,7 @@ c_function "version" {
199 199 ]],
200 200 },
201 201 c_function "init" {
  202 + var_in{ "int", "io_threads?", default = "1" },
202 203 c_call "!ZMQ_Ctx *" "zmq_init" { "int", "io_threads" },
203 204 },
204 205 c_function "init_ctx" {

0 comments on commit bbaa86a

Please sign in to comment.
Something went wrong with that request. Please try again.