diff options
-rw-r--r-- | src/libstat/tokenizers/osb.c | 4 | ||||
-rw-r--r-- | src/libutil/regexp.c | 6 | ||||
-rw-r--r-- | src/libutil/rrd.c | 10 | ||||
-rw-r--r-- | src/libutil/shingles.c | 16 | ||||
-rw-r--r-- | src/libutil/upstream.c | 20 | ||||
-rw-r--r-- | src/libutil/util.c | 18 | ||||
-rw-r--r-- | src/lua/lua_redis.c | 36 | ||||
-rw-r--r-- | src/lua/lua_regexp.c | 10 | ||||
-rw-r--r-- | src/lua/lua_tcp.c | 26 |
9 files changed, 74 insertions, 72 deletions
diff --git a/src/libstat/tokenizers/osb.c b/src/libstat/tokenizers/osb.c index 54668e758..f6f46c580 100644 --- a/src/libstat/tokenizers/osb.c +++ b/src/libstat/tokenizers/osb.c @@ -85,10 +85,10 @@ rspamd_tokenizer_osb_config_from_ucl (rspamd_mempool_t * pool, if (pool != NULL) { - cf = rspamd_mempool_alloc (pool, sizeof (*cf)); + cf = rspamd_mempool_alloc0 (pool, sizeof (*cf)); } else { - cf = g_slice_alloc (sizeof (*cf)); + cf = g_malloc0 (sizeof (*cf)); } /* Use default config */ diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index 1d04b83f9..8174a30fc 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -156,7 +156,7 @@ rspamd_regexp_dtor (rspamd_regexp_t *re) g_free (re->pattern); } - g_slice_free1 (sizeof (*re), re); + g_free (re); } } @@ -464,7 +464,7 @@ fin: } /* Now allocate the target structure */ - res = g_slice_alloc0 (sizeof (*res)); + res = g_malloc0 (sizeof (*res)); REF_INIT_RETAIN (res, rspamd_regexp_dtor); res->flags = rspamd_flags; res->pattern = real_pattern; @@ -946,7 +946,7 @@ rspamd_regexp_cache_new (void) { struct rspamd_regexp_cache *ncache; - ncache = g_slice_alloc (sizeof (*ncache)); + ncache = g_malloc0 (sizeof (*ncache)); ncache->tbl = g_hash_table_new_full (rspamd_regexp_hash, rspamd_regexp_equal, NULL, (GDestroyNotify)rspamd_regexp_unref); diff --git a/src/libutil/rrd.c b/src/libutil/rrd.c index 026d0673f..3e67bb2a3 100644 --- a/src/libutil/rrd.c +++ b/src/libutil/rrd.c @@ -406,7 +406,7 @@ rspamd_rrd_open_common (const gchar *filename, gboolean completed, GError **err) return NULL; } - file = g_slice_alloc0 (sizeof (struct rspamd_rrd_file)); + file = g_malloc0 (sizeof (struct rspamd_rrd_file)); if (file == NULL) { g_set_error (err, rrd_error_quark (), ENOMEM, "not enough memory"); @@ -438,7 +438,7 @@ rspamd_rrd_open_common (const gchar *filename, gboolean completed, GError **err) close (fd); g_set_error (err, rrd_error_quark (), ENOMEM, "mmap failed: %s", strerror (errno)); - g_slice_free1 (sizeof (struct rspamd_rrd_file), file); + g_free (file); return NULL; } @@ -754,7 +754,7 @@ rspamd_rrd_finalize (struct rspamd_rrd_file *file, GError **err) close (fd); g_set_error (err, rrd_error_quark (), ENOMEM, "mmap failed: %s", strerror (errno)); - g_slice_free1 (sizeof (struct rspamd_rrd_file), file); + g_free (file); return FALSE; } @@ -1265,7 +1265,7 @@ rspamd_rrd_close (struct rspamd_rrd_file * file) g_free (file->filename); g_free (file->id); - g_slice_free1 (sizeof (struct rspamd_rrd_file), file); + g_free (file); return 0; } @@ -1489,7 +1489,7 @@ rspamd_rrd_query (struct rspamd_rrd_file *file, return NULL; } - res = g_slice_alloc0 (sizeof (*res)); + res = g_malloc0 (sizeof (*res)); res->ds_count = file->stat_head->ds_cnt; res->last_update = (gdouble)file->live_head->last_up + ((gdouble)file->live_head->last_up_usec / 1e6f); diff --git a/src/libutil/shingles.c b/src/libutil/shingles.c index 3e0c14b3a..240facc4a 100644 --- a/src/libutil/shingles.c +++ b/src/libutil/shingles.c @@ -139,13 +139,13 @@ rspamd_shingles_from_text (GArray *input, row = rspamd_fstring_sized_new (256); /* Init hashes pipes and keys */ - hashes = g_slice_alloc (sizeof (*hashes) * RSPAMD_SHINGLE_SIZE); + hashes = g_malloc (sizeof (*hashes) * RSPAMD_SHINGLE_SIZE); hlen = input->len > SHINGLES_WINDOW ? (input->len - SHINGLES_WINDOW + 1) : 1; keys = rspamd_shingles_get_keys_cached (key); for (i = 0; i < RSPAMD_SHINGLE_SIZE; i ++) { - hashes[i] = g_slice_alloc (hlen * sizeof (guint64)); + hashes[i] = g_malloc (hlen * sizeof (guint64)); } /* Now parse input words into a vector of hashes using rolling window */ @@ -222,10 +222,10 @@ rspamd_shingles_from_text (GArray *input, for (i = 0; i < RSPAMD_SHINGLE_SIZE; i ++) { res->hashes[i] = filter (hashes[i], hlen, i, key, filterd); - g_slice_free1 (hlen * sizeof (guint64), hashes[i]); + g_free (hashes[i]); } - g_slice_free1 (sizeof (*hashes) * RSPAMD_SHINGLE_SIZE, hashes); + g_free (hashes); rspamd_fstring_free (row); @@ -258,12 +258,12 @@ rspamd_shingles_from_image (guchar *dct, } /* Init hashes pipes and keys */ - hashes = g_slice_alloc (sizeof (*hashes) * RSPAMD_SHINGLE_SIZE); + hashes = g_malloc (sizeof (*hashes) * RSPAMD_SHINGLE_SIZE); hlen = RSPAMD_DCT_LEN / NBBY + 1; keys = rspamd_shingles_get_keys_cached (key); for (i = 0; i < RSPAMD_SHINGLE_SIZE; i ++) { - hashes[i] = g_slice_alloc (hlen * sizeof (guint64)); + hashes[i] = g_malloc (hlen * sizeof (guint64)); } switch (alg) { @@ -303,10 +303,10 @@ rspamd_shingles_from_image (guchar *dct, for (i = 0; i < RSPAMD_SHINGLE_SIZE; i ++) { shingle->hashes[i] = filter (hashes[i], hlen, i, key, filterd); - g_slice_free1 (hlen * sizeof (guint64), hashes[i]); + g_free (hashes[i]); } - g_slice_free1 (sizeof (*hashes) * RSPAMD_SHINGLE_SIZE, hashes); + g_free (hashes); return shingle; } diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index ac15780ad..2f2772f92 100644 --- a/src/libutil/upstream.c +++ b/src/libutil/upstream.c @@ -146,7 +146,7 @@ rspamd_upstream_ctx_dtor (struct upstream_ctx *ctx) g_queue_free (ctx->upstreams); rspamd_mempool_delete (ctx->pool); - g_slice_free1 (sizeof (*ctx), ctx); + g_free (ctx); } void @@ -160,7 +160,7 @@ rspamd_upstreams_library_init (void) { struct upstream_ctx *ctx; - ctx = g_slice_alloc0 (sizeof (*ctx)); + ctx = g_malloc0 (sizeof (*ctx)); ctx->error_time = default_error_time; ctx->max_errors = default_max_errors; ctx->dns_retransmits = default_dns_retransmits; @@ -227,7 +227,7 @@ rspamd_upstream_addr_elt_dtor (gpointer a) struct upstream_addr_elt *elt = a; rspamd_inet_address_free (elt->addr); - g_slice_free1 (sizeof (*elt), elt); + g_free (elt); } static void @@ -262,7 +262,7 @@ rspamd_upstream_update_addrs (struct upstream *up) /* Copy addrs back */ LL_FOREACH (up->new_addrs, cur) { rspamd_inet_address_set_port (cur->addr, port); - addr_elt = g_slice_alloc (sizeof (*addr_elt)); + addr_elt = g_malloc0 (sizeof (*addr_elt)); addr_elt->addr = cur->addr; addr_elt->errors = 0; g_ptr_array_add (new_addrs, addr_elt); @@ -488,7 +488,7 @@ rspamd_upstreams_create (struct upstream_ctx *ctx) { struct upstream_list *ls; - ls = g_slice_alloc0 (sizeof (*ls)); + ls = g_malloc0 (sizeof (*ls)); ls->hash_seed = SEED_CONSTANT; ls->ups = g_ptr_array_new (); ls->alive = g_ptr_array_new (); @@ -536,7 +536,7 @@ rspamd_upstream_dtor (struct upstream *up) REF_RELEASE (up->ctx); } - g_slice_free1 (sizeof (*up), up); + g_free (up); } rspamd_inet_addr_t* @@ -573,7 +573,7 @@ rspamd_upstreams_add_upstream (struct upstream_list *ups, const gchar *str, rspamd_inet_addr_t *addr; gboolean ret = FALSE; - up = g_slice_alloc0 (sizeof (*up)); + up = g_malloc0 (sizeof (*up)); switch (parse_type) { case RSPAMD_UPSTREAM_PARSE_DEFAULT: @@ -607,7 +607,7 @@ rspamd_upstreams_add_upstream (struct upstream_list *ups, const gchar *str, } if (!ret) { - g_slice_free1 (sizeof (*up), up); + g_free (up); return FALSE; } else { @@ -667,7 +667,7 @@ rspamd_upstream_add_addr (struct upstream *up, rspamd_inet_addr_t *addr) up->addrs.addr = g_ptr_array_new_full (8, rspamd_upstream_addr_elt_dtor); } - elt = g_slice_alloc0 (sizeof (*elt)); + elt = g_malloc0 (sizeof (*elt)); elt->addr = addr; g_ptr_array_add (up->addrs.addr, elt); g_ptr_array_sort (up->addrs.addr, rspamd_upstream_addr_sort_func); @@ -777,7 +777,7 @@ rspamd_upstreams_destroy (struct upstream_list *ups) g_ptr_array_free (ups->ups, TRUE); rspamd_mutex_free (ups->lock); - g_slice_free1 (sizeof (*ups), ups); + g_free (ups); } } diff --git a/src/libutil/util.c b/src/libutil/util.c index 7840dc744..fe092ad3c 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -1481,7 +1481,7 @@ rspamd_mutex_new (void) { rspamd_mutex_t *new; - new = g_slice_alloc (sizeof (rspamd_mutex_t)); + new = g_malloc0 (sizeof (rspamd_mutex_t)); #if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION > 30)) g_mutex_init (&new->mtx); #else @@ -1525,7 +1525,7 @@ rspamd_mutex_free (rspamd_mutex_t *mtx) #if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION > 30)) g_mutex_clear (&mtx->mtx); #endif - g_slice_free1 (sizeof (rspamd_mutex_t), mtx); + g_free (mtx); } struct rspamd_thread_data { @@ -1973,7 +1973,7 @@ rspamd_init_libs (void) struct ottery_config *ottery_cfg; gint ssl_options; - ctx = g_slice_alloc0 (sizeof (*ctx)); + ctx = g_malloc0 (sizeof (*ctx)); ctx->crypto_ctx = rspamd_cryptobox_init (); ottery_cfg = g_malloc0 (ottery_get_sizeof_config ()); ottery_config_init (ottery_cfg); @@ -2071,18 +2071,20 @@ rspamd_open_zstd_dictionary (const char *path) { struct zstd_dictionary *dict; - dict = g_slice_alloc0 (sizeof (*dict)); + dict = g_malloc0 (sizeof (*dict)); dict->dict = rspamd_file_xmap (path, PROT_READ, &dict->size, TRUE); if (dict->dict == NULL) { - g_slice_free1 (sizeof (*dict), dict); + g_free (dict); + return NULL; } dict->id = ZDICT_getDictID (dict->dict, dict->size); if (dict->id == 0) { - g_slice_free1 (sizeof (*dict), dict); + g_free (dict); + return NULL; } @@ -2094,7 +2096,7 @@ rspamd_free_zstd_dictionary (struct zstd_dictionary *dict) { if (dict) { munmap (dict->dict, dict->size); - g_slice_free1 (sizeof (*dict), dict); + g_free (dict); } } @@ -2250,7 +2252,7 @@ rspamd_deinit_libs (struct rspamd_external_libs_ctx *ctx) rspamd_free_zstd_dictionary (ctx->out_dict); ZSTD_freeCStream (ctx->out_zstream); ZSTD_freeDStream (ctx->in_zstream); - g_slice_free1 (sizeof (*ctx), ctx); + g_free (ctx); } } diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c index c21d69f33..9c5c3fde7 100644 --- a/src/lua/lua_redis.c +++ b/src/lua/lua_redis.c @@ -149,11 +149,11 @@ lua_redis_free_args (char **args, gsize *arglens, guint nargs) if (args) { for (i = 0; i < nargs; i ++) { - g_slice_free1 (arglens[i], args[i]); + g_free (args[i]); } - g_slice_free1 (sizeof (gchar *) * nargs, args); - g_slice_free1 (sizeof (gsize) * nargs, arglens); + g_free (args); + g_free (arglens); } } @@ -194,7 +194,7 @@ lua_redis_dtor (struct lua_redis_ctx *ctx) luaL_unref (ud->L, LUA_REGISTRYINDEX, cur->cbref); } - g_slice_free1 (sizeof (*cur), cur); + g_free (cur); } } else { @@ -203,7 +203,7 @@ lua_redis_dtor (struct lua_redis_ctx *ctx) } } - g_slice_free1 (sizeof (*ctx), ctx); + g_free (ctx); } static gint @@ -478,10 +478,10 @@ lua_redis_parse_args (lua_State *L, gint idx, const gchar *cmd, lua_pop (L, 1); } - args = g_slice_alloc ((top + 1) * sizeof (gchar *)); - arglens = g_slice_alloc ((top + 1) * sizeof (gsize)); + args = g_malloc ((top + 1) * sizeof (gchar *)); + arglens = g_malloc ((top + 1) * sizeof (gsize)); arglens[0] = strlen (cmd); - args[0] = g_slice_alloc (arglens[0]); + args[0] = g_malloc (arglens[0]); memcpy (args[0], cmd, arglens[0]); top = 1; lua_pushnil (L); @@ -493,7 +493,7 @@ lua_redis_parse_args (lua_State *L, gint idx, const gchar *cmd, const gchar *s; s = lua_tolstring (L, -1, &arglens[top]); - args[top] = g_slice_alloc (arglens[top]); + args[top] = g_malloc (arglens[top]); memcpy (args[top], s, arglens[top]); top ++; } @@ -504,7 +504,7 @@ lua_redis_parse_args (lua_State *L, gint idx, const gchar *cmd, if (t && t->start) { arglens[top] = t->len; - args[top] = g_slice_alloc (arglens[top]); + args[top] = g_malloc (arglens[top]); memcpy (args[top], t->start, arglens[top]); top ++; } @@ -524,7 +524,7 @@ lua_redis_parse_args (lua_State *L, gint idx, const gchar *cmd, } arglens[top] = r; - args[top] = g_slice_alloc (arglens[top]); + args[top] = g_malloc (arglens[top]); memcpy (args[top], numbuf, arglens[top]); top ++; } @@ -537,10 +537,10 @@ lua_redis_parse_args (lua_State *L, gint idx, const gchar *cmd, else { /* Use merely cmd */ - args = g_slice_alloc (sizeof (gchar *)); - arglens = g_slice_alloc (sizeof (gsize)); + args = g_malloc (sizeof (gchar *)); + arglens = g_malloc (sizeof (gsize)); arglens[0] = strlen (cmd); - args[0] = g_slice_alloc (arglens[0]); + args[0] = g_malloc (arglens[0]); memcpy (args[0], cmd, arglens[0]); top = 1; } @@ -677,7 +677,7 @@ rspamd_lua_redis_prepare_connection (lua_State *L, gint *pcbref) if (ret && addr != NULL) { - ctx = g_slice_alloc0 (sizeof (struct lua_redis_ctx)); + ctx = g_malloc0 (sizeof (struct lua_redis_ctx)); REF_INIT_RETAIN (ctx, lua_redis_dtor); ctx->flags |= flags | LUA_REDIS_ASYNC; ud = &ctx->d.async; @@ -764,7 +764,7 @@ lua_redis_make_request (lua_State *L) if (ctx) { ud = &ctx->d.async; - sp_ud = g_slice_alloc0 (sizeof (*sp_ud)); + sp_ud = g_malloc0 (sizeof (*sp_ud)); sp_ud->cbref = cbref; sp_ud->c = ud; sp_ud->ctx = ctx; @@ -1083,7 +1083,7 @@ lua_redis_connect_sync (lua_State *L) if (ret) { double_to_tv (timeout, &tv); - ctx = g_slice_alloc0 (sizeof (struct lua_redis_ctx)); + ctx = g_malloc0 (sizeof (struct lua_redis_ctx)); REF_INIT_RETAIN (ctx, lua_redis_dtor); ctx->flags = flags; ctx->d.sync = redisConnectWithTimeout ( @@ -1169,7 +1169,7 @@ lua_redis_add_cmd (lua_State *L) return luaL_error (L, "invalid arguments"); } - sp_ud = g_slice_alloc0 (sizeof (*sp_ud)); + sp_ud = g_malloc0 (sizeof (*sp_ud)); sp_ud->cbref = cbref; sp_ud->c = &ctx->d.async; sp_ud->ctx = ctx; diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c index a35ec96b5..1853e4a4d 100644 --- a/src/lua/lua_regexp.c +++ b/src/lua/lua_regexp.c @@ -141,7 +141,7 @@ lua_regexp_create (lua_State *L) g_error_free (err); } else { - new = g_slice_alloc0 (sizeof (struct rspamd_lua_regexp)); + new = g_malloc0 (sizeof (struct rspamd_lua_regexp)); new->re = re; new->re_pattern = g_strdup (string); new->module = rspamd_lua_get_module_name (L); @@ -176,7 +176,7 @@ lua_regexp_get_cached (lua_State *L) re = rspamd_regexp_cache_query (NULL, string, flags_str); if (re) { - new = g_slice_alloc0 (sizeof (struct rspamd_lua_regexp)); + new = g_malloc0 (sizeof (struct rspamd_lua_regexp)); new->re = rspamd_regexp_ref (re); new->re_pattern = g_strdup (string); new->module = rspamd_lua_get_module_name (L); @@ -222,7 +222,7 @@ lua_regexp_create_cached (lua_State *L) re = rspamd_regexp_cache_query (NULL, string, flags_str); if (re) { - new = g_slice_alloc0 (sizeof (struct rspamd_lua_regexp)); + new = g_malloc0 (sizeof (struct rspamd_lua_regexp)); new->re = rspamd_regexp_ref (re); new->re_pattern = g_strdup (string); new->module = rspamd_lua_get_module_name (L); @@ -241,7 +241,7 @@ lua_regexp_create_cached (lua_State *L) g_error_free (err); } else { - new = g_slice_alloc0 (sizeof (struct rspamd_lua_regexp)); + new = g_malloc0 (sizeof (struct rspamd_lua_regexp)); new->re = rspamd_regexp_ref (re); new->re_pattern = g_strdup (string); new->module = rspamd_lua_get_module_name (L); @@ -714,7 +714,7 @@ lua_regexp_gc (lua_State *L) g_free (to_del->re_pattern); g_free (to_del->module); - g_slice_free1 (sizeof (*to_del), to_del); + g_free (to_del); } return 0; diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c index 6e47e98a0..cd2dcc6e1 100644 --- a/src/lua/lua_tcp.c +++ b/src/lua/lua_tcp.c @@ -263,7 +263,7 @@ lua_tcp_shift_handler (struct lua_tcp_cbdata *cbd) } } - g_slice_free1 (sizeof (*hdl), hdl); + g_free (hdl); return TRUE; } @@ -294,11 +294,11 @@ lua_tcp_fin (gpointer arg) LL_FOREACH_SAFE (cbd->dtors, dtor, dttmp) { dtor->dtor (dtor->data); - g_slice_free1 (sizeof (*dtor), dtor); + g_free (dtor); } g_byte_array_unref (cbd->in); - g_slice_free1 (sizeof (struct lua_tcp_cbdata), cbd); + g_free (cbd); } static struct lua_tcp_cbdata * @@ -860,7 +860,7 @@ lua_tcp_arg_toiovec (lua_State *L, gint pos, struct lua_tcp_cbdata *cbd, if (t->flags & RSPAMD_TEXT_FLAG_OWN) { /* Steal ownership */ t->flags = 0; - dtor = g_slice_alloc0 (sizeof (*dtor)); + dtor = g_malloc0 (sizeof (*dtor)); dtor->dtor = g_free; dtor->data = (void *)t->start; LL_PREPEND (cbd->dtors, dtor); @@ -874,7 +874,7 @@ lua_tcp_arg_toiovec (lua_State *L, gint pos, struct lua_tcp_cbdata *cbd, else if (lua_type (L, pos) == LUA_TSTRING) { str = luaL_checklstring (L, pos, &len); vec->iov_base = g_malloc (len); - dtor = g_slice_alloc0 (sizeof (*dtor)); + dtor = g_malloc0 (sizeof (*dtor)); dtor->dtor = g_free; dtor->data = vec->iov_base; LL_PREPEND (cbd->dtors, dtor); @@ -961,7 +961,7 @@ lua_tcp_request (lua_State *L) } cbref = luaL_ref (L, LUA_REGISTRYINDEX); - cbd = g_slice_alloc0 (sizeof (*cbd)); + cbd = g_malloc0 (sizeof (*cbd)); lua_pushstring (L, "task"); lua_gettable (L, -2); @@ -1081,7 +1081,7 @@ lua_tcp_request (lua_State *L) msg_err ("tcp request has bad data argument"); lua_pushboolean (L, FALSE); g_free (iov); - g_slice_free1 (sizeof (*cbd), cbd); + g_free (cbd); return 1; } @@ -1106,7 +1106,7 @@ lua_tcp_request (lua_State *L) msg_err ("tcp request has bad data argument at pos %d", niov); lua_pushboolean (L, FALSE); g_free (iov); - g_slice_free1 (sizeof (*cbd), cbd); + g_free (cbd); return 1; } @@ -1135,7 +1135,7 @@ lua_tcp_request (lua_State *L) if (total_out > 0) { struct lua_tcp_handler *wh; - wh = g_slice_alloc0 (sizeof (*wh)); + wh = g_malloc0 (sizeof (*wh)); wh->type = LUA_WANT_WRITE; wh->h.w.iov = iov; wh->h.w.iovlen = niov; @@ -1180,7 +1180,7 @@ lua_tcp_request (lua_State *L) if (do_read) { struct lua_tcp_handler *rh; - rh = g_slice_alloc0 (sizeof (*rh)); + rh = g_malloc0 (sizeof (*rh)); rh->type = LUA_WANT_READ; rh->h.r.cbref = cbref; rh->h.r.stop_pattern = stop_pattern; @@ -1291,7 +1291,7 @@ lua_tcp_add_read (lua_State *L) } } - rh = g_slice_alloc0 (sizeof (*rh)); + rh = g_malloc0 (sizeof (*rh)); rh->type = LUA_WANT_READ; rh->h.r.cbref = cbref; rh->h.r.stop_pattern = stop_pattern; @@ -1356,7 +1356,7 @@ lua_tcp_add_write (lua_State *L) msg_err ("tcp request has bad data argument at pos %d", niov); lua_pushboolean (L, FALSE); g_free (iov); - g_slice_free1 (sizeof (*cbd), cbd); + g_free (cbd); return 1; } @@ -1370,7 +1370,7 @@ lua_tcp_add_write (lua_State *L) lua_pop (L, 1); } - wh = g_slice_alloc0 (sizeof (*wh)); + wh = g_malloc0 (sizeof (*wh)); wh->type = LUA_WANT_WRITE; wh->h.w.iov = iov; wh->h.w.iovlen = niov; |