get struct member as cdata

  • From: Cosmin Apreutesei <cosmin.apreutesei@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 17 May 2012 02:42:09 +0300

Hi, I have a struct with a member of type uint and I want to get it as
a signed int, so that I can get say the value 0xffffffff as -1. The
problem as I see it is that indexing a struct returns Lua types
instead of cdata so it's too late for a ffi.cast(). Any way to solve
this? Thanks.

Other related posts: