![](https://secure.gravatar.com/avatar/5cd0acc03793e7944454dbb533bbfe43.jpg?s=120&d=mm&r=g)
22 Sep
2010
22 Sep
'10
4:23 p.m.
On 22 September 2010 19:16, Peter Seibel <peter@gigamonkeys.com> wrote:
Can someone show an example of this defsubst in use? I'm not sure I understand what it's for.
To the best of my understanding it has two effects: 1. it allows reliable inlining on compilers that do not respect inline declarations. 2. it allows the expansion to utilize the lexical context of the call site. Consider: (defmacro foo () :global) (declaim (inline bar1)) (defun bar1 () (foo)) (defsubst bar2 () (foo)) (macrolet ((foo () :local)) (values (bar1) (bar2))) => :GLOBAL, :LOCAL Cheers, -- Nikodemus