Como passar um ponteiro para o fji do LuaJIT para ser usado como argumento out?

Supondo que haja o seguinte código C:

struct Foo { int dummy; }
int tryToAllocateFoo(Foo ** dest);

... Como fazer o seguinte no LuaJIT?

Foo * pFoo = NULL;
tryToAllocateFoo(&pFoo);