Re: Access to parameterized type

  • From: Joshua Day <josh.day@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 3 Sep 2012 10:30:17 -0400

Justin Cormack wrote:
> As Mike said you need a type name (string) a ctype or an object of the type.
> So a Lua table can store either of these. An ffi object can only store the
> third. But it has to be allocated. You could create a C struct with a single
> field of the right type (not an array) and pass this to create the array if
> you want to avoid Lua tables.

For what it's worth, this is why I suggested letting ffi objects hold proper
Lua references.  William could then keep a reference to the ctype.  Nice and
straightforward.

--
Joshua

Other related posts: