Well I tried the shadowing import, compiles fine, but when attempting to
load that fas, it will throw redefinition error
(defpackage :test)
(in-package :test)
(shadowing-import 'open)
(defun open (filespec &key direction element-type if-exists
if-does-not-exist
external-format)
(print "test")
(cl::open filespec :direction direction :element-type element-type
:if-exists if-exists :if-does-not-exist if-does-not-exist
:external-format external-format))
2013/1/29 Juan Jose Garcia-Ripoll <juanjose.garciarip...@gmail.com>
> On Tue, Jan 29, 2013 at 5:30 PM, Juan Jose Garcia-Ripoll <
> juanjose.garciarip...@gmail.com> wrote:
>
>>
>> On Tue, Jan 29, 2013 at 3:28 PM, Peter Enerccio <enerc...@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.
>
> Juanjo
>
>
> --
> Instituto de Física Fundamental, CSIC
> c/ Serrano, 113b, Madrid 28006 (Spain)
> http://juanjose.garciaripoll.googlepages.com
>
--
Bc. Peter Vaňušanik
http://www.bishojo.tk
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list