[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Hooks for I/O, memory, etc?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 11 Jun 2002 11:44:24 -0300
> As for file I/O, printing, etc.: if I can override these things
> without touching the Lua code, great. But again, considering the
> intent of Lua is to embed it into a larger application, the
> process for overriding these things should be explained clearly
> in the manual. I shouldn't have to hunt around the source code
> looking for stdc calls, as I have for past versions.
You don't have to hunt around the source code to change that. Inside
the libraries, each function stand for itself. For instance, "print"
uses the standard I/O facilities (OK, the manual doesn't say that); if
you don't want that, all you have to do is to define your own "print"
function. The manual explains how to do that (i.e. how to define your
own functions).
-- Roberto