lua: update deprecated lua_open to luaL_newstate#14297
Merged
mattklein123 merged 3 commits intoenvoyproxy:masterfrom Dec 8, 2020
Merged
lua: update deprecated lua_open to luaL_newstate#14297mattklein123 merged 3 commits intoenvoyproxy:masterfrom
mattklein123 merged 3 commits intoenvoyproxy:masterfrom
Conversation
|
Hi @spacewander, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
lua_open is deprecated in Lua 5.1 and removed in the later version, though LuaJIT might keep the API unchanged. In LuaJIT, lua_open is just an alias of luaL_newstate. Signed-off-by: spacewander <spacewanderlzx@gmail.com>
cf7fd00 to
2bb9139
Compare
dio
suggested changes
Dec 7, 2020
Member
dio
left a comment
There was a problem hiding this comment.
Looks good. A request for additional inline comment.
| TEST_P(LuaIntegrationTest, RdsTestOfLuaPerRoute) { | ||
| // When the route configuration is updated dynamically via RDS and the configuration contains an | ||
| // inline Lua code, Envoy may call lua_open in multiple threads to create new lua_State objects. | ||
| // inline Lua code, Envoy may call luaL_newstate in multiple threads to create new lua_State objects. |
Member
There was a problem hiding this comment.
Thanks. @spacewander could you add a link to luaL_newstate ref here? Thank you!
Member
There was a problem hiding this comment.
Sorry, I think you need to write it as:
`luaL_newstate`
instead of lua_newstate. to skip adding newstate to dictionary.
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
0a183e7 to
89b1aac
Compare
mpuncel
added a commit
to mpuncel/envoy
that referenced
this pull request
Dec 8, 2020
* master: (41 commits) event: Remove a source of non-determinism by always running deferred deletion before post callbacks (envoyproxy#14293) Fix TSAN bug in integration test (envoyproxy#14327) tracing: Add hostname to Zipkin config. (envoyproxy#14186) (envoyproxy#14187) [conn_pool] fix use after free in H/1 connection pool (envoyproxy#14220) lua: update deprecated lua_open to luaL_newstate (envoyproxy#14297) extension: use bool_flag to control extension link (envoyproxy#14240) stats: Factor out creation of cluster-stats StatNames from creation of the stats, to save CPU during xDS updates (envoyproxy#14028) test: add scaled timer integration test (envoyproxy#14290) [Win32 Signals] Add term and ctrl-c signal handlers (envoyproxy#13954) config: v2 transport API fatal-by-default. (envoyproxy#14223) matcher: fix UB bug caused by dereferencing a bad optional (envoyproxy#14271) test: putting fake upstream config in a struct (envoyproxy#14266) wasm: use Bazel rules from Proxy-Wasm Rust SDK. (envoyproxy#14292) docs: fix typo (envoyproxy#14237) dependencies: allowlist CVE-2018-21270 to prevent false positives. (envoyproxy#14294) typo in redis doc (envoyproxy#14248) access_loggers: removed redundant dep (envoyproxy#14274) fix http2 flaky test (envoyproxy#14261) test: disable flaky xds_integration_test. (envoyproxy#14287) http: add functionality to configure kill header in KillRequest proto (envoyproxy#14288) ... Signed-off-by: Michael Puncel <mpuncel@squareup.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: Use
luaL_newstateinstead of the deprecatedlua_openAdditional Description:
lua_openis deprecated in Lua 5.1 and removed in the later version, though LuaJIT might keep the API unchanged.Risk Level: Low. In LuaJIT, lua_open is just an alias of luaL_newstate.
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Platform-Specific Features: N/A
Signed-off-by: spacewander spacewanderlzx@gmail.com