Difference (from prior major revision)
(no other diffs)
Changed: 1c1,3
Well, this page was created automatically, so I guess I'll replace "Describe the new page here" with something slightly more useful -- a link to my one and only contribution:
|
Changed: 3c5
Immediately after posting CreatingBinaryExtensionModules, I discovered the similar BinaryModuleTutorial. However, that tutorial does not address the issue of where the Lua API routines are located. If they are statically linked into the host application, then the extension cannot use them (unless the host is specifically written to pass function pointers to the DLL, a mechanism outside the scope of 'loadlib'). So the DLL must statically link to it's own copy of the Lua API routines. If the Lua API uses any static variables (I don't know that it does) the host and the extension will have separate copies, and things could go horribly wrong.
|
Changed: 5,7c7
Immediately after posting that, I discovered a similar page (BinaryModuleTutorial). Doh! However, that page does not address the issue of where the Lua API routines are located. If they are statically linked into the host application, then the DLL cannot use them (unless the host is specifically written to pass function pointers to the DLL). So the DLL must statically link to it's own copy of the Lua API routines. If the Lua API uses any static variables (I don't know that it does) the host and the extension will have separate copies, and things could go horribly wrong. However, since there is no mention of this issue in the BinaryModuleTutorial, it appears that Lua does not use any static data, and that creating modules as described there actually works -- it just wastes space (every extension module contain it's own copy of the entire Lua API).
|
However, since there is no mention of this issue in the BinaryModuleTutorial, it appears that Lua does not use any static data, and that creating modules as described there actually works. It just wastes space, as every extension module contain it's own copy of the entire Lua API.
|
Immediately after posting CreatingBinaryExtensionModules, I discovered the similar BinaryModuleTutorial. However, that tutorial does not address the issue of where the Lua API routines are located. If they are statically linked into the host application, then the extension cannot use them (unless the host is specifically written to pass function pointers to the DLL, a mechanism outside the scope of 'loadlib'). So the DLL must statically link to it's own copy of the Lua API routines. If the Lua API uses any static variables (I don't know that it does) the host and the extension will have separate copies, and things could go horribly wrong.
However, since there is no mention of this issue in the BinaryModuleTutorial, it appears that Lua does not use any static data, and that creating modules as described there actually works. It just wastes space, as every extension module contain it's own copy of the entire Lua API.
RecentChanges · preferences
edit · history
Last edited August 31, 2003 4:48 pm GMT (diff)