Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an<LuaObj> 要 如何取得 lua 的 type typename #281

Open
shewer opened this issue Oct 17, 2023 · 0 comments
Open

an<LuaObj> 要 如何取得 lua 的 type typename #281

shewer opened this issue Oct 17, 2023 · 0 comments

Comments

@shewer
Copy link
Contributor

shewer commented Oct 17, 2023

如題:
有個 LuaObj 需要判斷是否是function (LUA_TFUNCTION)

class  lua_component {
   protected: 
        an<LuaObj> func_ = {};
        Lua* lua_
};
an<LuaObj> func= {};
if ( ! func_ ||  func_->type() != LUA_TFUNCTION) {
// ....
}
else {
// ....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant