turbo
turbo copied to clipboard
remove ffi.gc for http_parser_url
luajit may manage http_parser_url
struct directly instead of managing a struct http_parser_url *
and a block of struct http_parser_url
instance.
this change can fix the following test case by the luajit 2.0.5
self.request.headers.http_parser_url = nil
print("[Debug] url field:", self.request.headers:get_url_field(turbo.httputil.UF.PATH))
collectgarbage("collect")
print("[Debug] url field:", self.request.headers:get_url_field(turbo.httputil.UF.PATH))
before adding this change, the second print cannot get the value since the data seems to be freed by lua GC.
@kernelsauce is there any comment about the PR?