lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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.


Thank you for your help and suggestions.