lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


 >> but to much details can spoil things :)

   Oh, I'd love to have his cheat code that opened up a script interpreter
window for GF, just THINK of the trouble I could get myself into!  <grin> 
But I don't think it'd be wise for Bret to leak it.

 >> and then befor every function and external variable I added LUA_API

   I guess it's half-a-dozen of one, 6 of the other:  decl or def. 
Maintaining a .DEF can be some work, but modifying the source can be as
much.  I'd prefer not to modify the source _at all_ if I can get away with
it.  That way my work is greatly reduced if the official 3.2 is released
during my development.
   By the way, just for general reference, here's the hack awk script I
used to def the headers in case someone else can benefit from it:

   <-- cut here -->
   BEGIN { print "LIBRARY LUA\nEXPORTS" }
   /^(int|void|char|double|long|lua_)/ {
     gsub("\\\*","",$2)
     if ($2 ~ "\\\(") $2 = substr($2,0,match($2,"\\\(")-1)
     if ($2 != "") print "   " $2
     }
   <-- cut here -->

   (spaces inserted at head of lines to hopefully prevent any mail
mangling)

   I named it "h2def.awk" so my command-line was "awk -f h2def.awk *.h
>lua.def".  It is _not_ a general purpose tool, but it did work on the Lua
include files due to their consistent formatting.

 >> are u using Delphi for a specific reason? 

   Because I'm no good with MFC?  <grin>  Seriously, I consider myself a
capable C programmer, but I've never had much exposure to the MFC, and for
tools/utilities stuff that need a lot of user interface stuff I'm about 1K
times more productive with Delphi.  So if I'm to use Lua I'd like to be
able to use it EVERYWHERE!  :-)

 >> having Lua in a DLL or having plugins in a DLL?

   Having Lua in a DLL.  Specifically:  sometimes with wrapping something
up into a DLL you have to write a few custom initializing/finalizing type
things to get it all working right.  Or you have to write wrapper functions
to expose certain variables and such.  I haven't yet found any such
problems with Lua, but I'm still new to it, so was wondering if anyone else
had encountered anything like that.
   Does it work having _both_ Lua and library extensions in DLL's?  (not
that I'm likely to do that, probably just Lua in DLL extensions static in
host app, but I'm curious)

   Cheers,

   Dave