documented the 5th optional argument, "res_table", for ngx.re.match().

This commit is contained in:
Yichun Zhang (agentzh) 2014-01-10 15:13:54 -08:00
Родитель eb43c9c7de
Коммит 6169a191d1
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -3964,7 +3964,7 @@ Returns `true` if the current request is an nginx subrequest, or `false` otherwi
ngx.re.match
------------
**syntax:** *captures, err = ngx.re.match(subject, regex, options?, ctx?)*
**syntax:** *captures, err = ngx.re.match(subject, regex, options?, ctx?, res_table?)*
**context:** *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua*, ngx.timer.**
@ -4114,6 +4114,8 @@ To confirm that PCRE JIT is enabled, activate the Nginx debug log by adding the
pcre JIT compiling result: 1
Starting from the `0.9.4` release, this function also accepts a 5th argument, `res_table`, for letting the caller supply the Lua table used to hold all the capturing results. This table will always be cleared before inserting the resulting capturing data. This is very useful for recycling Lua tables and saving GC and table allocation overhead.
This feature was introduced in the `v0.2.1rc11` release.
[Back to TOC](#table-of-contents)

Просмотреть файл

@ -3279,7 +3279,7 @@ Parse the http time string (as returned by [[#ngx.http_time|ngx.http_time]]) int
Returns <code>true</code> if the current request is an nginx subrequest, or <code>false</code> otherwise.
== ngx.re.match ==
'''syntax:''' ''captures, err = ngx.re.match(subject, regex, options?, ctx?)''
'''syntax:''' ''captures, err = ngx.re.match(subject, regex, options?, ctx?, res_table?)''
'''context:''' ''set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua*, ngx.timer.*''
@ -3421,6 +3421,8 @@ To confirm that PCRE JIT is enabled, activate the Nginx debug log by adding the
pcre JIT compiling result: 1
</geshi>
Starting from the <code>0.9.4</code> release, this function also accepts a 5th argument, <code>res_table</code>, for letting the caller supply the Lua table used to hold all the capturing results. This table will always be cleared before inserting the resulting capturing data. This is very useful for recycling Lua tables and saving GC and table allocation overhead.
This feature was introduced in the <code>v0.2.1rc11</code> release.
== ngx.re.find ==