[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: changes in 'require'
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 08 Jul 2005 13:58:44 -0300
> * Windows module search path issues:
> [...]
> I propose to fix this once and for all and follow the suggestion of
> David Burgess to get the path dynamically.
> [...]
> This should be a 10 line change and it only adds code for the Windows
> case. I can create a patch, if needed.
Instead of a patch, I would appreciate some clarification :) Should we
use NULL as the hModule argument? Should we use "PathRemoveFileSpec" to
strip the executable name? Is there a "reasonable" maximum size for the
file name?
> I think a convenient solution would be to strip an underscore prefix
> from the module name before generating the init function name.
An alternative would be to use only the sub-module name, without the
parents. Instead of renaming "foo.so" to "_foo.so", rename it to
"p/foo.so". It seems to be a good idea to hide a private module outside
the main directory, and we simplify the generation of the funcname (no
more LUA_OFSEP). (On the other hand, that could create name conflicts
for homonymous sub-modules from different packages...)
-- Roberto