Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 52 lines (36 sloc) 1.607 kB
d5b9585 @ezequielgarcia added autmatic interface release through garbage collection, added TO…
authored
1
12f0217 @ezequielgarcia Update TODO file
authored
2 Still, there is a lot of work todo!
d5b9585 @ezequielgarcia added autmatic interface release through garbage collection, added TO…
authored
3
4 * Write more tests and examples, ( maybe translating DirectFB-examples? )
12f0217 @ezequielgarcia Update TODO file
authored
5 * Fix makefile, to ease cross-compiling.
d5b9585 @ezequielgarcia added autmatic interface release through garbage collection, added TO…
authored
6
7 Generator script
8 ----------------
17362bc @ezequielgarcia Update TODO file
authored
9 * Fix intelligent enum generation, fails sometimes.
1b282ff @ezequielgarcia README and TODO updated
authored
10 * "Please, please clean my perl style" -- the script
17362bc @ezequielgarcia Update TODO file
authored
11 * Fix union parsing.
12 * Break parsing and generation into two separates operations, well defined inside script.
13 * Remove barewords filehandles.
d5b9585 @ezequielgarcia added autmatic interface release through garbage collection, added TO…
authored
14
15 DirectFB generation
16 -------------------
17362bc @ezequielgarcia Update TODO file
authored
17 * Add more interface support, if makes sense. Particularly, I would like to have EventBuffer.
18 * Add more function support, if makes sense.
d5b9585 @ezequielgarcia added autmatic interface release through garbage collection, added TO…
authored
19
20 Enums
21 -----
22
23 This is still an open issue. Right now, every C-enum is a lua global variable.
24 This pollutes the namespace and prevents us from checking illegal values.
25
26 One possible solution that may be added to the present one (so one can compare them)
27 would be to pass strings as: 'ONE,TWO,THREE' (where the comma can be replaced 'ONE|TWO|THREE').
28
29 This string gets parsed (in the C-side) and each one is used as a key into a table, like this:
30
1b282ff @ezequielgarcia README and TODO updated
authored
31 enum_table['ONE']
32 enum_table['TWO']
d5b9585 @ezequielgarcia added autmatic interface release through garbage collection, added TO…
authored
33
34 If we found a nil value, this means the string is illegal for this enum.
35 This way we can avoid annoying string comparison and take advantage of lua
36 string handling (?).
37
38 On returning an enum, we could build a userdata an implement a contains() function.
39 So the usage would be like this:
40
1b282ff @ezequielgarcia README and TODO updated
authored
41 caps = s:GetCapabilities()
42 if caps:contains('SOME_ENUM') then
43 -- stuff
44 end
45
46 Also, if we make contains() the metamethod for __index we will be able to write:
47 if caps['SOME_ENUM'] then
48 -- stuff
49 end
50
51
Something went wrong with that request. Please try again.