[sr-dev] domain attributes

Juha Heinanen jh at tutpro.com
Thu Jul 2 17:53:46 CEST 2009


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;

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.

-- juha



More information about the sr-dev mailing list