[Ecls-list] Overwriting cl functions

Juan Jose Garcia-Ripoll juanjose.garciaripoll at gmail.com
Tue Jan 29 16:33:36 UTC 2013

On Tue, Jan 29, 2013 at 5:30 PM, Juan Jose Garcia-Ripoll <
juanjose.garciaripoll at gmail.com> wrote:

> On Tue, Jan 29, 2013 at 3:28 PM, Peter Enerccio <enerccio at gmail.com>wrote:
>> Basically, I want to overwrite open function to return my specific (gray)
>> stream. instead of usual stream that it would.
>> Ideally, all functions/macros that use open should use that function
>> instead, but I am not sure if it is possible.
> This is the only instance where ECL contemplates redefinition. Use
> (gray::redefine-cl-functions)

Sorry, I misread again: you want _your_ own OPEN function. In this case why
don't you shadow OPEN in your application and force it to return gray
streams? All packages in your application will see the shadowed symbol.

The other alternative, redefining OPEN, only works if you tell the compiler
not to inline OPEN with a global (proclaim '(notinline open)), for
otherwise it will use the C function in the generated code.


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20130129/8ff7a502/attachment.html>

More information about the ecl-devel mailing list