[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string.dump(closure)
- From: "Aaron Brown" <arundelo@...>
- Date: Wed, 9 Aug 2006 02:56:51 -0400
lhf wrote:
To make dit work in all situations would require table
marshalling and also to decide what to with userdata and C
functions. --lhf
If this is what you mean about C functions:
Bytecode = string.dump(print)
stdin:1: unable to dump given function
stack traceback:
[C]: in function 'dump'
stdin:1: in main chunk
[C]: ?
then I understand, but what do you mean about tables and
userdata? Do you mean that tables, C functions, and
userdata are not saved if they are contained in upvalues?
The current behavior apparently doesn't save any values at
all (nor does it allow upvalues to be shared between
functions), but it does allow functions with private state.
That's the behavior I was asking about when I asked whether
it worked in all situations.
In other words, is there a way to write a Lua function that
will give an "unable to dump given function" error when
given to string.dump?
Thanks,
--
Aaron