[sr-dev] domain attributes
Andrei Pelinescu-Onciul
andrei at iptel.org
Thu Jul 2 17:58:42 CEST 2009
On Jul 02, 2009 at 18:53, Juha Heinanen <jh at tutpro.com> wrote:
> Andrei Pelinescu-Onciul writes:
>
> > > if i write in my script somewhere
> > >
> > > $avp("fd") = "foo";
> > >
> > > and in some other place reference $fd, how can double lookup during
> > > runtime be avoided?
> >
> > At fixup time $fd is looked-up. If it's a pvar is replaced with a pv
> > spec. If it's not with an avp spec.
>
> ok. does this fixup happen also when $fd is used in an expression, like
>
> $var(foo) = $fd;
Yes.
>
> if i write
>
> lookup_domain("$fd", "$fd");
>
> the first $fd must be an avp, because lookup_domain expects an avp name
> as first param and the second could be either a pvar or avp, but that
> can be determined at fixup time.
That does not work right now, but it would be very easy to make it work.
Andrei
More information about the sr-dev
mailing list