Re: FFI enums are now always boxed

  • From: Daurnimator <quae@xxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 18 Jul 2012 21:01:14 +1000

On 18 July 2012 20:34, Mike Pall <mike-1207@xxxxxxxxxx> wrote:
> That's a bit expensive, since there's no inverse table for that.
> Also, enum constant keys are unique, but values are not.
> --Mike

I'm tempted to suggest that it shouldn't matter if it's expensive;
printing cdata objects it only something that you'd do for
(often I find I'm debugging, I print an enum, and have no idea which
option it actually belongs to; requiring me to take a few guesses and
check for equality...)

Other related posts: