Skip to content

请问对于LuaJIT有办法设置某个文件为私有环境吗? #1994

Closed Answered by sumneko
robincodex asked this question in Q&A
Discussion options

You must be logged in to vote

没有相关支持,事实上也没什么人用 _ENV = {} 来写代码,还是老老实实的 local M = {},然后要导出的类都加个 M 前缀,最后 return M 吧。

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@robincodex
Comment options

Answer selected by robincodex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants