|
Am 02.11.2013 16:34 schröbte Paul Chavent:
- redefine print (_G.print = myprint), i like this one and i'm currently trying to understand how to pass userdata (closures seems to be the solution, but i hardly understand how to use it from c)
You can take a look at cprint[1], which is a replacement for the default `print` function, and uses a userdata upvalue.
[1]: https://github.com/siffiejoe/lua-cprint/blob/master/cprint.c
Thank you for your help and suggestions. Paul
Philipp