katlogic/pudata
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
lua_pushuserdata() polyfill Sometimes, one needs to push existing userdata by pointer. This is not safe (as the pointer might be stale), therefore it is not part of core Lua api. This header file should be included after Lua headers - mainly because it overrides lua_newuserdata() with a macro, all hell would break loose otherwise. After that, you can push userdata by pointer. In case the userdata object has been collected in the meantime, nil is pushed on stack. This is handy for debugging, with native function you'd get dangling pointer on Lua heap. It is also very slow, so it is not a good idea to use this in release / performance bound code. Patching Lua(JIT) with native function is left as an excercise for the reader. -- k