[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C struct from Lua table?
- From: Charles Heywood <vandor2012@...>
- Date: Fri, 27 Oct 2017 16:43:38 +0000
I'm not sure if you can do something like that in C. In C, aren't data structures like structs defined at compile time? You could make a data structure and then populate it based on a Lua method or something but it feels like it'd be better to do it from C instead if it's just going to stay in C (alternatively, if it's needed in Lua, provide a method to push a table populated with the config to Lua).
What about C/C++ bindings over Lua API like Sol2 or LuaBridge? Is it necessary to generate structures to parse configs?