Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use lua_Number instead of lua_Integer for crc32 functions' return val…

…ues because 32-bit signed integers are too short for the crc32 digest.
  • Loading branch information...
commit 752be5db1f67605fce3a856dcd9a0a3b928bba76 1 parent 0727d20
@agentzh agentzh authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/ngx_http_lua_string.c
  2. +1 −1  util/build2.sh
View
4 src/ngx_http_lua_string.c
@@ -456,7 +456,7 @@ ngx_http_lua_ngx_crc32_short(lua_State *L)
p = (u_char *) luaL_checklstring(L, 1, &len);
- lua_pushinteger(L, (lua_Integer) ngx_crc32_short(p, len));
+ lua_pushnumber(L, (lua_Number) ngx_crc32_short(p, len));
return 1;
}
@@ -474,7 +474,7 @@ ngx_http_lua_ngx_crc32_long(lua_State *L)
p = (u_char *) luaL_checklstring(L, 1, &len);
- lua_pushinteger(L, (lua_Integer) ngx_crc32_long(p, len));
+ lua_pushnumber(L, (lua_Number) ngx_crc32_long(p, len));
return 1;
}
View
2  util/build2.sh
@@ -16,7 +16,7 @@ ngx-build $force $version \
--add-module=$root/../ndk-nginx-module \
--add-module=$root/../set-misc-nginx-module \
--with-cc-opt=$'-O3' \
- --with-ld-opt="-Wl,-rpath=/opt/drizzle/lib:/usr/local/lib:/home/lz/lib:/opt/luajit/lib" \
+ --with-ld-opt="-Wl,-rpath=/opt/drizzle/lib:/usr/local/lib:/home/lz/lib:/usr/local/openresty/luajit/lib" \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
Please sign in to comment.
Something went wrong with that request. Please try again.