Permalink
Browse files

fixed ngx. table entry count during table initialization.

  • Loading branch information...
1 parent 2c5a758 commit 14e079ccafc8264a9f0d46f845bceb8495c7d801 @agentzh agentzh committed Feb 7, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/ngx_http_lua_setby.c
  2. +1 −1 src/ngx_http_lua_util.c
  3. +3 −3 t/062-count.t
View
@@ -195,7 +195,7 @@ ngx_http_lua_set_by_lua_env(lua_State *L, ngx_http_request_t *r, size_t nargs,
/* {{{ initialize ngx.* namespace */
- lua_createtable(L, 0 /* narr */, 67 /* nrec */); /* ngx.* */
+ lua_createtable(L, 0 /* narr */, 68 /* nrec */); /* ngx.* */
ngx_http_lua_inject_internal_utils(r->connection->log, L);
View
@@ -533,7 +533,7 @@ init_ngx_lua_globals(ngx_conf_t *cf, lua_State *L)
ngx_http_lua_inject_ndk_api(L);
#endif /* defined(NDK) && NDK */
- lua_createtable(L, 0 /* narr */, 83 /* nrec */); /* ngx.* */
+ lua_createtable(L, 0 /* narr */, 84 /* nrec */); /* ngx.* */
ngx_http_lua_inject_internal_utils(cf->log, L);
View
@@ -35,7 +35,7 @@ __DATA__
--- request
GET /test
--- response_body
-ngx: 83
+ngx: 84
--- no_error_log
[error]
@@ -56,7 +56,7 @@ ngx: 83
--- request
GET /test
--- response_body
-67
+68
--- no_error_log
[error]
@@ -84,7 +84,7 @@ GET /test
--- request
GET /test
--- response_body
-n = 67
+n = 68
--- no_error_log
[error]

0 comments on commit 14e079c

Please sign in to comment.