File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ ffi.cdef[[
1111typedef unsigned char u_char;
1212
1313u_char * ngx_hex_dump (u_char * dst , const u_char * src , size_t len );
14+
15+ intptr_t ngx_atoi (const unsigned char * line , size_t n );
1416]]
1517
1618local str_type = ffi .typeof (" uint8_t[?]" )
@@ -24,6 +26,11 @@ function to_hex(s)
2426end
2527
2628
29+ function atoi (s )
30+ return tonumber (C .ngx_atoi (s , # s ))
31+ end
32+
33+
2734-- to prevent use of casual module global variables
2835getmetatable (resty .string ).__newindex = function (table , key , val )
2936 error (' attempt to write to undeclared variable "' .. key .. ' ": '
Original file line number Diff line number Diff line change 1+ {
2+ <insert_a_suppression_name_here>
3+ Memcheck:Cond
4+ fun:lj_str_new
5+ obj:*
6+ }
17{
28 <insert_a_suppression_name_here>
39 Memcheck:Param
You can’t perform that action at this time.
0 commit comments