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

some non-assertion code write in assert statement #156

Closed
AndrewTsao opened this issue Mar 13, 2012 · 5 comments · Fixed by #226
Closed

some non-assertion code write in assert statement #156

AndrewTsao opened this issue Mar 13, 2012 · 5 comments · Fixed by #226

Comments

@AndrewTsao
Copy link
Contributor

  /* Hold a reference to the main thread in the registry */
  assert(lua_pushthread(L) == 1);
  lua_setfield(L, LUA_REGISTRYINDEX, "main_thread");

@creationix Line 233 in luvit_init.c

@creationix
Copy link
Member

What does this do? just add an assert?

@AndrewTsao
Copy link
Contributor Author

I think it's a typo.

@philips
Copy link
Contributor

philips commented May 22, 2012

@AndrewTsao What does your commit fix?

@bnoordhuis
Copy link
Contributor

If you compile without assertions (-DNDEBUG), lua_pushthread() won't actually get called.

@philips
Copy link
Contributor

philips commented May 23, 2012

@bnoordhuis Ah! Good call. I will merge this fix then.

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.

4 participants