[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua binding: How to implement C enum
- From: Patrick Rapin <toupie300@...>
- Date: Thu, 15 Dec 2011 22:54:23 +0100
> The third option, aTableWithStringKeys, looks the most convenient :)
Yes, from the library binding perspective. But IMHO this is not the
most important point.
I was supposing (this is the case in my projects) that there exists a
unique function, typically written in C, that converts a string or
table of strings into an integer value, given the enumeration type
So the real choice should be made on the ease of use (from the library
user point of view) rather than the ease to implement.