[PATCH] buildtools: Use separate storage for each function in runonce
Simo
simo at samba.org
Tue Jan 20 07:48:28 MST 2015
On Tue, 2015-01-20 at 14:01 +0100, Petr Viktorin wrote:
> On 01/16/2015 06:55 PM, Petr Viktorin wrote:
> > Hello,
> > I ran across this curiosity while trying to wrap my head around the
> > build system:
> >
> > @runonce
> > def add_one(x):
> > return x + 1
> >
> > @runonce
> > def sub_one(x):
> > return x - 1
> >
> > add_one(1) # returns 2
> > sub_one(1) # also returns 2!
> >
> >
> > Fix attached.
> >
>
> Once again, with the sign-off line. Sorry for the noise.
>
Doesn't this patch also remove the intended functionality of running the
same function only once ?
It looks to me that the proper fix would be to add the function name to
args ? Am I completely off track ?
Simo.
--
Simo Sorce
More information about the samba-technical
mailing list