[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Converting strings to enum values (C API)
- From: Justin Cormack <justin@...>
- Date: Wed, 4 Dec 2013 23:45:27 +0000
On Wed, Dec 4, 2013 at 10:47 PM, Philipp Janda <siffiejoe@gmx.net> wrote:
>> Or, I could just build a table where keys are strings and values are the
>> enum values, and use that to lookup which enum value is being specified.
>>
That sounds a good solution to me. I tend to prefer to do this stuff
on the Lua side not the C side, then you can eg add tweaks like adding
case insensitivity or combinations of flags easily.
Justin