[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: installing new package loader
- From: Tim Hunter <TimHunter@...>
- Date: Sat, 12 May 2007 18:01:02 -0400
I'm trying to use lua in a non-standard environment that does not have
access to anything like the typical file system and cannot use the I/O
functions declared in C stdio.h. We also use a proprietary API to
dynamically load C libraries. Therefore I need to replace the package
loader functions in package.loaders with a special loader that is
written in C. I understand how to write the loader function. What
process do you recommend for installing this function in package.loaders
and deleting the "standard" loaders loader_Lua, loader_C, and
loader_Croot? I'd like to make the fewest possible changes to the lua
source itself.
The approach I thought of was to add a new statically-linked library to
the lualibs list in linit.c and do the replacement in the library
initialization code.