Find file
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (36 sloc) 1.57 KB
Still, there is a lot of work todo!
* Write more tests and examples, ( maybe translating DirectFB-examples? )
* Fix makefile, to ease cross-compiling.
Generator script
* Fix intelligent enum generation, fails sometimes.
* "Please, please clean my perl style" -- the script
* Fix union parsing.
* Break parsing and generation into two separates operations, well defined inside script.
* Remove barewords filehandles.
DirectFB generation
* Add more interface support, if makes sense. Particularly, I would like to have EventBuffer.
* Add more function support, if makes sense.
This is still an open issue. Right now, every C-enum is a lua global variable.
This pollutes the namespace and prevents us from checking illegal values.
One possible solution that may be added to the present one (so one can compare them)
would be to pass strings as: 'ONE,TWO,THREE' (where the comma can be replaced 'ONE|TWO|THREE').
This string gets parsed (in the C-side) and each one is used as a key into a table, like this:
If we found a nil value, this means the string is illegal for this enum.
This way we can avoid annoying string comparison and take advantage of lua
string handling (?).
On returning an enum, we could build a userdata an implement a contains() function.
So the usage would be like this:
caps = s:GetCapabilities()
if caps:contains('SOME_ENUM') then
-- stuff
Also, if we make contains() the metamethod for __index we will be able to write:
if caps['SOME_ENUM'] then
-- stuff