pconn_ent = lua_newuserdata (L, sizeof (*pconn_ent));
*pconn_ent = conn_ent;
rspamd_lua_setclass (L, "rspamd{csession}", -1);
- lua_pushnumber (L, from);
- lua_pushnumber (L, to);
+ lua_pushinteger (L, from);
+ lua_pushinteger (L, to);
lua_pushboolean (L, reset);
if (lua_pcall (L, 5, 0, 0) != 0) {
v = tok->data;
lua_createtable (L, 3, 0);
/* High word, low word, order */
- lua_pushnumber (L, (guint32)(v >> 32));
+ lua_pushinteger (L, (guint32)(v >> 32));
lua_rawseti (L, -2, 1);
- lua_pushnumber (L, (guint32)(v));
+ lua_pushinteger (L, (guint32)(v));
lua_rawseti (L, -2, 2);
- lua_pushnumber (L, tok->window_idx);
+ lua_pushinteger (L, tok->window_idx);
lua_rawseti (L, -2, 3);
lua_rawseti (L, -2, i + 1);
}
v = tok->data;
lua_createtable (L, 3, 0);
/* High word, low word, order */
- lua_pushnumber (L, (guint32)(v >> 32));
+ lua_pushinteger (L, (guint32)(v >> 32));
lua_rawseti (L, -2, 1);
- lua_pushnumber (L, (guint32)(v));
+ lua_pushinteger (L, (guint32)(v));
lua_rawseti (L, -2, 2);
- lua_pushnumber (L, tok->window_idx);
+ lua_pushinteger (L, tok->window_idx);
lua_rawseti (L, -2, 3);
lua_rawseti (L, -2, i + 1);
}
lua_createtable (ctx->L, n, 0);
for (i = 0; i < n; i ++) {
lua_createtable (ctx->L, 2, 0);
- lua_pushnumber (ctx->L, sm->results[i].id);
+ lua_pushinteger (ctx->L, sm->results[i].id);
lua_rawseti (ctx->L, -2, 1);
lua_pushnumber (ctx->L, sm->results[i].score);
lua_rawseti (ctx->L, -2, 2);
pcfg = lua_newuserdata (ctx->L, sizeof (*pcfg));
*pcfg = ctx->cfg;
rspamd_lua_setclass (ctx->L, "rspamd{config}", -1);
- lua_pushnumber (ctx->L, sm->settings_id);
+ lua_pushinteger (ctx->L, sm->settings_id);
lua_createtable (ctx->L, nextra, 0);
for (i = 0; i < nextra; i ++) {
lua_createtable (ctx->L, 2, 0);
- lua_pushnumber (ctx->L, sm->results[i + n].id);
+ lua_pushinteger (ctx->L, sm->results[i + n].id);
lua_rawseti (ctx->L, -2, 1);
lua_pushnumber (ctx->L, sm->results[i + n].score);
lua_rawseti (ctx->L, -2, 2);
set:
g_strfreev (components);
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
}
}
- lua_pushnumber (L, version_num);
+ lua_pushinteger (L, version_num);
return 1;
}
lua_getglobal (L, "math");
lua_pushstring (L, "randomseed");
lua_gettable (L, -2);
- lua_pushnumber (L, ottery_rand_uint64 ());
+ lua_pushinteger (L, ottery_rand_uint64 ());
lua_pcall (L, 1, 0, 0);
lua_pop (L, 1); /* math table */
struct rspamd_worker *w = lua_check_worker (L, 1);
if (w) {
- lua_pushnumber (L, w->index);
+ lua_pushinteger (L, w->index);
}
else {
return luaL_error (L, "invalid arguments");
struct rspamd_worker *w = lua_check_worker (L, 1);
if (w) {
- lua_pushnumber (L, w->pid);
+ lua_pushinteger (L, w->pid);
}
else {
return luaL_error (L, "invalid arguments");
#define LUA_ENUM(L, name, val) \
lua_pushlstring (L, # name, sizeof(# name) - 1); \
- lua_pushnumber (L, val); \
+ lua_pushinteger (L, val); \
lua_settable (L, -3);
#if LUA_VERSION_NUM > 501 && !defined LUA_COMPAT_MODULE
i = 1;
LL_FOREACH (obj, cur) {
- lua_pushnumber (L, i++);
+ lua_pushinteger (L, i++);
ucl_object_push_lua (L, cur, true);
lua_settable (L, -3);
}
return luaL_error (L, "invalid arguments");
}
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
}
}
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
}
}
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
lua_type (L, top + 1) == LUA_TSTRING);
}
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
lua_type (L, top + 2) == LUA_TSTRING);
}
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
return luaL_error (L, "invalid arguments");
}
- lua_pushnumber (L, res);
+ lua_pushinteger (L, res);
return 1;
}
lua_pushnumber (L, tm);
lua_settable (L, -3);
lua_pushstring (L, "hits");
- lua_pushnumber (L, hits);
+ lua_pushinteger (L, hits);
lua_settable (L, -3);
}
}
lua_createtable (cd->L, 0, 2);
rspamd_lua_table_set (cd->L, "name", elt->content.mx.name);
lua_pushstring (cd->L, "priority");
- lua_pushnumber (cd->L, elt->content.mx.priority);
+ lua_pushinteger (cd->L, elt->content.mx.priority);
lua_settable (cd->L, -3);
lua_rawseti (cd->L, -2, ++i);
rspamd_lua_table_set (cd->L, "ns", elt->content.soa.mname);
rspamd_lua_table_set (cd->L, "contact", elt->content.soa.admin);
lua_pushstring (cd->L, "serial");
- lua_pushnumber (cd->L, elt->content.soa.serial);
+ lua_pushinteger (cd->L, elt->content.soa.serial);
lua_settable (cd->L, -3);
lua_pushstring (cd->L, "refresh");
- lua_pushnumber (cd->L, elt->content.soa.refresh);
+ lua_pushinteger (cd->L, elt->content.soa.refresh);
lua_settable (cd->L, -3);
lua_pushstring (cd->L, "retry");
- lua_pushnumber (cd->L, elt->content.soa.retry);
+ lua_pushinteger (cd->L, elt->content.soa.retry);
lua_settable (cd->L, -3);
lua_pushstring (cd->L, "expiry");
- lua_pushnumber (cd->L, elt->content.soa.expire);
+ lua_pushinteger (cd->L, elt->content.soa.expire);
lua_settable (cd->L, -3);
/* Negative TTL */
lua_pushstring (cd->L, "nx");
- lua_pushnumber (cd->L, elt->content.soa.minimum);
+ lua_pushinteger (cd->L, elt->content.soa.minimum);
lua_settable (cd->L, -3);
lua_rawseti (cd->L, -2, ++i);
}
lua_pushstring (L, "height");
- lua_pushnumber (L, img->height);
+ lua_pushinteger (L, img->height);
lua_settable (L, -3);
lua_pushstring (L, "width");
- lua_pushnumber (L, img->width);
+ lua_pushinteger (L, img->width);
lua_settable (L, -3);
lua_pushstring (L, "embedded");
lua_pushboolean (L, img->flags & RSPAMD_HTML_FLAG_IMAGE_EMBEDDED);
if (bl->font_color.valid) {
lua_pushstring (L, "color");
lua_createtable (L, 4, 0);
- lua_pushnumber (L, bl->font_color.d.comp.r);
+ lua_pushinteger (L, bl->font_color.d.comp.r);
lua_rawseti (L, -2, 1);
- lua_pushnumber (L, bl->font_color.d.comp.g);
+ lua_pushinteger (L, bl->font_color.d.comp.g);
lua_rawseti (L, -2, 2);
- lua_pushnumber (L, bl->font_color.d.comp.b);
+ lua_pushinteger (L, bl->font_color.d.comp.b);
lua_rawseti (L, -2, 3);
- lua_pushnumber (L, bl->font_color.d.comp.alpha);
+ lua_pushinteger (L, bl->font_color.d.comp.alpha);
lua_rawseti (L, -2, 4);
lua_settable (L, -3);
}
if (bl->background_color.valid) {
lua_pushstring (L, "bgcolor");
lua_createtable (L, 4, 0);
- lua_pushnumber (L, bl->background_color.d.comp.r);
+ lua_pushinteger (L, bl->background_color.d.comp.r);
lua_rawseti (L, -2, 1);
- lua_pushnumber (L, bl->background_color.d.comp.g);
+ lua_pushinteger (L, bl->background_color.d.comp.g);
lua_rawseti (L, -2, 2);
- lua_pushnumber (L, bl->background_color.d.comp.b);
+ lua_pushinteger (L, bl->background_color.d.comp.b);
lua_rawseti (L, -2, 3);
- lua_pushnumber (L, bl->background_color.d.comp.alpha);
+ lua_pushinteger (L, bl->background_color.d.comp.alpha);
lua_rawseti (L, -2, 4);
lua_settable (L, -3);
}
lua_settable (L, -3);
lua_pushstring (L, "font_size");
- lua_pushnumber (L, bl->font_size);
+ lua_pushinteger (L, bl->font_size);
lua_settable (L, -3);
}
ptag = lua_newuserdata (ud->L, sizeof (*ptag));
*ptag = tag;
rspamd_lua_setclass (ud->L, "rspamd{html_tag}", -1);
- lua_pushnumber (ud->L, tag->content_length);
+ lua_pushinteger (ud->L, tag->content_length);
if (lua_pcall (ud->L, 2, 1, 0) != 0) {
msg_err ("error in foreach_tag callback: %s", lua_tostring (ud->L, -1));
struct html_tag *tag = lua_check_html_tag (L, 1);
if (tag) {
- lua_pushnumber (L, tag->content_length);
+ lua_pushinteger (L, tag->content_length);
}
else {
return luaL_error (L, "invalid arguments");
/* Error */
lua_pushnil (cbd->L);
/* Reply code */
- lua_pushnumber (cbd->L, msg->code);
+ lua_pushinteger (cbd->L, msg->code);
/* Body */
body = rspamd_http_message_get_body (msg, &body_len);
lua_createtable (L, max, 0);
for (i = 1; i <= max; i++, ptr++) {
- lua_pushnumber (L, *ptr);
+ lua_pushinteger (L, *ptr);
lua_rawseti (L, -2, i);
}
}
struct rspamd_lua_ip *ip = lua_check_ip (L, 1);
if (ip != NULL && ip->addr) {
- lua_pushnumber (L, rspamd_inet_address_get_port (ip->addr));
+ lua_pushinteger (L, rspamd_inet_address_get_port (ip->addr));
}
else {
lua_pushnil (L);
struct rspamd_lua_ip *ip = lua_check_ip (L, 1);
if (ip && ip->addr) {
- lua_pushnumber (L, rspamd_inet_address_get_af (ip->addr) == AF_INET6 ?
+ lua_pushinteger (L, rspamd_inet_address_get_af (ip->addr) == AF_INET6 ?
6 : 4);
}
else {
lua_State *L = (lua_State *)ud;
lua_pushstring (L, key);
- lua_pushnumber (L, hits);
+ lua_pushinteger (L, hits);
lua_settable (L, -3);
return TRUE;
struct rspamd_lua_map *map = lua_check_map (L, 1);
if (map != NULL) {
- lua_pushnumber (L, map->map->nelts);
+ lua_pushinteger (L, map->map->nelts);
}
else {
return luaL_error (L, "invalid arguments");
struct memory_pool_s *mempool = rspamd_lua_check_mempool (L, 1);
if (mempool) {
- lua_pushnumber (L, rspamd_mempool_suggest_size ());
+ lua_pushinteger (L, rspamd_mempool_suggest_size ());
return 0;
}
else {
}
else if (len == sizeof ("int") - 1 &&
g_ascii_strncasecmp (pt, "int", len) == 0) {
- lua_pushnumber (L, *(gint *)pv);
+ lua_pushinteger (L, *(gint *)pv);
pv += sizeof (gint);
}
else if (len == sizeof ("int64") - 1 &&
g_ascii_strncasecmp (pt, "int64", len) == 0) {
- lua_pushnumber (L, *(gint64 *)pv);
+ lua_pushinteger (L, *(gint64 *)pv);
pv += sizeof (gint64);
}
else if (len == sizeof ("bool") - 1 &&
}
if (IS_PART_EMPTY (part) || part->content == NULL) {
- lua_pushnumber (L, 0);
+ lua_pushinteger (L, 0);
}
else {
- lua_pushnumber (L, part->content->len);
+ lua_pushinteger (L, part->content->len);
}
return 1;
return 1;
}
- lua_pushnumber (L, part->raw.len);
+ lua_pushinteger (L, part->raw.len);
return 1;
}
}
}
- lua_pushnumber (L, total);
+ lua_pushinteger (L, total);
return 1;
}
}
if (IS_PART_EMPTY (part)) {
- lua_pushnumber (L, 0);
+ lua_pushinteger (L, 0);
}
else {
- lua_pushnumber (L, part->nlines);
+ lua_pushinteger (L, part->nlines);
}
return 1;
}
if (IS_PART_EMPTY (part) || part->normalized_words == NULL) {
- lua_pushnumber (L, 0);
+ lua_pushinteger (L, 0);
}
else {
- lua_pushnumber (L, part->normalized_words->len);
+ lua_pushinteger (L, part->normalized_words->len);
}
return 1;
lua_createtable (L, 0, 9);
lua_pushstring (L, "lines");
- lua_pushnumber (L, part->nlines);
+ lua_pushinteger (L, part->nlines);
lua_settable (L, -3);
lua_pushstring (L, "empty_lines");
- lua_pushnumber (L, part->empty_lines);
+ lua_pushinteger (L, part->empty_lines);
lua_settable (L, -3);
lua_pushstring (L, "spaces");
- lua_pushnumber (L, part->spaces);
+ lua_pushinteger (L, part->spaces);
lua_settable (L, -3);
lua_pushstring (L, "non_spaces");
- lua_pushnumber (L, part->non_spaces);
+ lua_pushinteger (L, part->non_spaces);
lua_settable (L, -3);
lua_pushstring (L, "double_spaces");
- lua_pushnumber (L, part->double_spaces);
+ lua_pushinteger (L, part->double_spaces);
lua_settable (L, -3);
lua_pushstring (L, "ascii_characters");
- lua_pushnumber (L, part->ascii_chars);
+ lua_pushinteger (L, part->ascii_chars);
lua_settable (L, -3);
lua_pushstring (L, "non_ascii_characters");
- lua_pushnumber (L, part->non_ascii_chars);
+ lua_pushinteger (L, part->non_ascii_chars);
lua_settable (L, -3);
lua_pushstring (L, "capital_letters");
- lua_pushnumber (L, part->capital_letters);
+ lua_pushinteger (L, part->capital_letters);
lua_settable (L, -3);
lua_pushstring (L, "numeric_characters");
- lua_pushnumber (L, part->numeric_characters);
+ lua_pushinteger (L, part->numeric_characters);
lua_settable (L, -3);
}
else {
return 1;
}
- lua_pushnumber (L, part->parsed_data.len);
+ lua_pushinteger (L, part->parsed_data.len);
return 1;
}
switch (r->type) {
case REDIS_REPLY_INTEGER:
- lua_pushnumber (L, r->integer);
+ lua_pushinteger (L, r->integer);
break;
case REDIS_REPLY_NIL:
/* XXX: not the best approach */
struct rspamd_lua_regexp *re = lua_check_regexp (L);
guint lim;
- lim = luaL_checknumber (L, 2);
+ lim = luaL_checkinteger (L, 2);
if (re && re->re && !IS_DESTROYED (re)) {
- lua_pushnumber (L, rspamd_regexp_set_maxhits (re->re, lim));
+ lua_pushinteger (L, rspamd_regexp_set_maxhits (re->re, lim));
}
else {
lua_pushnil (L);
struct rspamd_lua_regexp *re = lua_check_regexp (L);
if (re && re->re && !IS_DESTROYED (re)) {
- lua_pushnumber (L, rspamd_regexp_get_maxhits (re->re));
+ lua_pushinteger (L, rspamd_regexp_get_maxhits (re->re));
}
else {
- lua_pushnumber (L, 1);
+ lua_pushinteger (L, 1);
}
return 1;
}
}
- lua_pushnumber (L, matches);
+ lua_pushinteger (L, matches);
return 1;
}
lua_settable (L, -3);
rspamd_lua_table_set (L, "separator", rh->separator);
lua_pushstring (L, "order");
- lua_pushnumber (L, rh->order);
+ lua_pushinteger (L, rh->order);
lua_settable (L, -3);
break;
case RSPAMD_TASK_HEADER_PUSH_RAW:
}
}
else if (how == RSPAMD_TASK_HEADER_PUSH_COUNT) {
- lua_pushnumber (L, ar->len);
+ lua_pushinteger (L, ar->len);
}
else {
rh = g_ptr_array_index (ar, 0);
lua_settable (L, -3);
lua_pushstring (L, "timestamp");
- lua_pushnumber (L, rh->timestamp);
+ lua_pushinteger (L, rh->timestamp);
lua_settable (L, -3);
rspamd_lua_table_set (L, "by_hostname", rh->by_hostname);
struct rspamd_task *task = lua_check_task (L, 1);
if (task != NULL) {
- lua_pushnumber (L, task->dns_requests);
+ lua_pushinteger (L, task->dns_requests);
}
else {
return luaL_error (L, "invalid arguments");
if (!(s->flags & RSPAMD_SYMBOL_RESULT_IGNORED)) {
id = rspamd_symbols_cache_find_symbol (task->cfg->cache,
s->name);
- lua_pushnumber (L, id);
+ lua_pushinteger (L, id);
lua_rawseti (L, -3, i);
lua_pushnumber (L, s->score);
lua_rawseti (L, -2, i);
if (task != NULL) {
lua_createtable (L, 0, 2);
lua_pushstring (L, "tv_sec");
- lua_pushnumber (L, (lua_Number)task->tv.tv_sec);
+ lua_pushinteger (L, (lua_Integer)task->tv.tv_sec);
lua_settable (L, -3);
lua_pushstring (L, "tv_usec");
- lua_pushnumber (L, (lua_Number)task->tv.tv_usec);
+ lua_pushinteger (L, (lua_Integer)task->tv.tv_usec);
lua_settable (L, -3);
}
else {
struct rspamd_task *task = lua_check_task (L, 1);
if (task != NULL) {
- lua_pushnumber (L, task->msg.len);
+ lua_pushinteger (L, task->msg.len);
}
else {
return luaL_error (L, "invalid arguments");
return luaL_error (L, "invalid arguments");
}
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
}
lua_pushstring (L, "win");
- lua_pushnumber (L, tok->window_idx);
+ lua_pushinteger (L, tok->window_idx);
lua_settable (L, -3);
lua_pushstring (L, "flags");
struct rspamd_image *img = lua_check_image (L);
if (img != NULL) {
- lua_pushnumber (L, img->width);
+ lua_pushinteger (L, img->width);
}
else {
return luaL_error (L, "invalid arguments");
struct rspamd_image *img = lua_check_image (L);
if (img != NULL) {
- lua_pushnumber (L, img->height);
+ lua_pushinteger (L, img->height);
}
else {
return luaL_error (L, "invalid arguments");
struct rspamd_image *img = lua_check_image (L);
if (img != NULL) {
- lua_pushnumber (L, img->data->len);
+ lua_pushinteger (L, img->data->len);
}
else {
return luaL_error (L, "invalid arguments");
lua_settable (L, -3);
lua_pushstring (L, "compressed_size");
- lua_pushnumber (L, f->compressed_size);
+ lua_pushinteger (L, f->compressed_size);
lua_settable (L, -3);
lua_pushstring (L, "uncompressed_size");
- lua_pushnumber (L, f->uncompressed_size);
+ lua_pushinteger (L, f->uncompressed_size);
lua_settable (L, -3);
lua_pushstring (L, "encrypted");
struct rspamd_archive *arch = lua_check_archive (L);
if (arch != NULL) {
- lua_pushnumber (L, arch->size);
+ lua_pushinteger (L, arch->size);
}
else {
return luaL_error (L, "invalid arguments");
return luaL_error (L, "invalid arguments");
}
- lua_pushnumber (L, l);
+ lua_pushinteger (L, l);
return 1;
}
/* Function */
lua_pushvalue (L, 3);
- lua_pushnumber (L, strnum + 1);
- lua_pushnumber (L, textpos);
+ lua_pushinteger (L, strnum + 1);
+ lua_pushinteger (L, textpos);
if (lua_pcall (L, 2, 1, 0) != 0) {
msg_info ("call to trie callback has failed: %s",
struct rspamd_lua_url *url = lua_check_url (L, 1);
if (url != NULL) {
- lua_pushnumber (L, url->url->urllen);
+ lua_pushinteger (L, url->url->urllen);
}
else {
lua_pushnil (L);
struct rspamd_lua_url *url = lua_check_url (L, 1);
if (url != NULL) {
- lua_pushnumber (L, url->url->port);
+ lua_pushinteger (L, url->url->port);
}
else {
lua_pushnil (L);
struct rspamd_lua_url *url = lua_check_url (L, 1);
if (url != NULL && url->url != NULL) {
- lua_pushnumber (L, url->url->count);
+ lua_pushinteger (L, url->url->count);
}
else {
lua_pushnil (L);
if (u->port != 0) {
lua_pushstring (L, "port");
- lua_pushnumber (L, u->port);
+ lua_pushinteger (L, u->port);
lua_settable (L, -3);
}
lua_url = lua_newuserdata (L, sizeof (struct rspamd_lua_url));
rspamd_lua_setclass (L, "rspamd{url}", -1);
lua_url->url = url;
- lua_pushnumber (L, n + 1);
+ lua_pushinteger (L, n + 1);
lua_pushlstring (L, url->string, url->urllen);
lua_settable (L, -3);
}
replace_cost);
}
- lua_pushnumber (L, dist);
+ lua_pushinteger (L, dist);
return 1;
}
+ (len - (end - str)) /* raw part */;
}
- lua_pushnumber (L, len);
+ lua_pushinteger (L, len);
}
else {
return luaL_error (L, "invalid arguments");
return luaL_error (L, "invalid arguments");
}
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
return luaL_error (L, "invalid arguments");
}
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
lua_createtable (L, 0, 3);
lua_pushstring (L, "size");
- lua_pushnumber (L, st.st_size);
+ lua_pushinteger (L, st.st_size);
lua_settable (L, -3);
lua_pushstring (L, "mtime");
- lua_pushnumber (L, st.st_mtime);
+ lua_pushinteger (L, st.st_mtime);
lua_settable (L, -3);
lua_pushstring (L, "type");
return 2;
}
- lua_pushnumber (L, fd);
+ lua_pushinteger (L, fd);
}
else {
return luaL_error (L, "invalid arguments");
#endif
if (lua_isnumber (L, 1)) {
- fd = lua_tonumber (L, 1);
+ fd = lua_tointeger (L, 1);
if (lua_isboolean (L, 2)) {
do_close = lua_toboolean (L, 2);
if (fpath) {
if (lua_isnumber (L, 2)) {
- mode = lua_tonumber (L, 2);
+ mode = lua_tointeger (L, 2);
}
fd = rspamd_file_xopen (fpath, O_RDWR | O_CREAT | O_EXCL, mode, 0);
return 2;
}
- lua_pushnumber (L, fd);
+ lua_pushinteger (L, fd);
}
else {
return luaL_error (L, "invalid arguments");
gint fd = -1;
if (lua_isnumber (L, 1)) {
- fd = lua_tonumber (L, 1);
+ fd = lua_tointeger (L, 1);
if (close (fd) == -1) {
lua_pushboolean (L, false);
gchar *buf;
gint buflen;
- buflen = lua_tonumber (L, 1);
+ buflen = lua_tointeger (L, 1);
if (buflen <= 0) {
return luaL_error (L, "invalid arguments");
old = umask (mask);
- lua_pushnumber (L, old);
+ lua_pushinteger (L, old);
return 1;
}
}
int ret = event_base_loop (ev_base, flags);
- lua_pushnumber (L, ret);
+ lua_pushinteger (L, ret);
return 1;
}
case read_int:
/* Push integer value */
rspamd_strtoul (text, text_len, &num);
- lua_pushnumber (ud->L, num);
+ lua_pushinteger (ud->L, num);
break;
case read_double:
/* Push integer value */
lua_newtable (L);
for (elt = lua_args; *elt != NULL; elt ++) {
- lua_pushnumber (L, i);
+ lua_pushinteger (L, i);
lua_pushstring (L, *elt);
lua_settable (L, -3);
i++;