fix: balance Lua module loader stack - #76
Closed
nkbeast wants to merge 1 commit into
Closed
Conversation
Contributor
Contributor
Author
|
Thanks for the pointers, both commits are in now — kept your separator fix and the lookup order as is. What's left in this PR is just the stack balance: luaL_gsub pushes the substituted name onto the Lua stack and nothing popped it, so every require() left one slot behind. The name is copied into a std::string before the pop so the pointer stays valid afterwards. |
nkbeast
force-pushed
the
fix/balance-lua-module-loader-stack
branch
from
September 3, 2026 17:21
b81cb17 to
6693ae1
Compare
Contributor
Author
|
Closing this — your two commits covered the real problems here, and looking at the rebased diff the only thing left was the luaL_gsub pop, which the normal require cleanup already handles anyway. Thanks for the quick pointers on which commits landed. |
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.
Summary
luaL_gsubresult from the Lua stackValidation
git diff --check— passed