Difference between revisions of "Talk:Embedding a new programming language as a module"

From AOLserver Wiki
Jump to navigation Jump to search
Line 16: Line 16:
  
 
Also eventually the reader may need to learn about <pre>Ns_ConfigGetValue</pre> to complete more complex tasks.
 
Also eventually the reader may need to learn about <pre>Ns_ConfigGetValue</pre> to complete more complex tasks.
 +
 +
----
 +
 +
I honestly don't know how to go about building or configuring a ".lua" extension handler. The full-fledged example I would look at (PyWX) is a great example of a C++ module, but it's a bit difficult for me to translate what's going on in PyWX to what I should do for Lua with a C module. I might be able to work out the extension handler portion, but getting Lua's "print" to output correctly might be tricky. -- --[[User:Caveman|Caveman]] 08:42, 6 December 2005 (EST)

Revision as of 13:42, 6 December 2005

Do you think any examples like:

Ns_Log(Debug, "opening lua state");

Would be useful here?


What about proper termination:

Ns_RegisterShutdown(MyLuaCleanup, ...);

Also eventually the reader may need to learn about

Ns_ConfigGetValue

to complete more complex tasks.


I honestly don't know how to go about building or configuring a ".lua" extension handler. The full-fledged example I would look at (PyWX) is a great example of a C++ module, but it's a bit difficult for me to translate what's going on in PyWX to what I should do for Lua with a C module. I might be able to work out the extension handler portion, but getting Lua's "print" to output correctly might be tricky. -- --Caveman 08:42, 6 December 2005 (EST)