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

On Tue, Jan 29, 2013 at 3:28 PM, Peter Enerccio <enerccio@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)