title: Accessing Light userdata in Lua
body: <p>I may be misunderstanding their use or misread the documentation, but how do I access members of a struct or class passed to Lua as light userdata? For example if a vector using the following struct</p>
  
  <pre><code>typedef struct Foo {
    int x;
    int y;
  } Foo;
  </code></pre>
  
  <p>was declared as 'test' and defined as something like x = 413 and y = 612, and pushed with a call</p>
  
  <pre><code>lua_pushlightuserdata( L, (void *) &amp;test ) ;
  </code></pre>
  
  <p>What would the Lua code of a function that manipulates or prints x and y look like?</p>