diff options
Diffstat (limited to 'ClientHamr/GuiLua/test_c.c')
-rw-r--r-- | ClientHamr/GuiLua/test_c.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ClientHamr/GuiLua/test_c.c b/ClientHamr/GuiLua/test_c.c new file mode 100644 index 0000000..4427724 --- /dev/null +++ b/ClientHamr/GuiLua/test_c.c | |||
@@ -0,0 +1,22 @@ | |||
1 | /* Should be a Lua module, roughly the same as test.lua | ||
2 | |||
3 | */ | ||
4 | |||
5 | |||
6 | |||
7 | /* NOTES - | ||
8 | |||
9 | From http://www.inf.puc-rio.br/~roberto/pil2/chapter15.pdf | ||
10 | |||
11 | "Well-behaved C libraries should export one function called | ||
12 | luaopen_modname, which is the function that require tries to call after | ||
13 | linking the library. In Section 26.2 we will discuss how to write C | ||
14 | libraries." | ||
15 | |||
16 | The "modname" bit is replaced by the name of the module. Though if the | ||
17 | module name includes a hyphen, the "require" function strips out the | ||
18 | hyphen and the bit before it. | ||
19 | |||
20 | Though it seems that chapter 26 is not in the same place? | ||
21 | |||
22 | */ | ||