Hello, Richard!

Probably PTR_SZ or PAGE_PTR_SZ would be good?
I feel confusing about OVFL_. Why size of the pointer to the first overflow
page could be different from size of another pointers?
Sorry, I'm far from the code and should not discourse. Just have an idea
that name should be as common (generic) as possible (to follow Occam's
razor). And it's interesting where does it(4) come from? sizeof(int), for
file we should fix it, right? (comment to define).

>OVFL_PTR_SZ might be a better name.  4 is the size (in bytes) used by
>the pointer to the first overflow page that occurs at the end of the
>on-page record.

Happy New Year!

Thanks,
Max


2015-12-31 2:54 GMT+03:00 Domingo Alvarez Duarte <sqlite-mail at dev.dadbiz.es>
:

> Hello Duncan !
>
> I saw a very good point on your suggestion !
>
> I'll use it when writing/refactoring code.
>
> Thanks a lot !
>
>
> >  Wed Dec 30 2015 11:51:54 pm CET CET from "Darren Duncan"
> ><darren at darrenduncan.net>  Subject: Re: [sqlite] Magic number in sqlite
> >source code
> >
> >  On 2015-12-30 12:51 PM, Richard Hipp wrote:
> >
> >>On 12/30/15, Richard Hipp <drh at sqlite.org> wrote:
> >>
> >>>I'll continue look for an alternative way to make the intent of the
> >>> code clearer.
> >>>
>
> >>  See https://www.sqlite.org/src/info/1541607d458069f5 for another
> >> attempt at removing magic numbers. But I don't like it It seems to
> >> complicate more than it clarifies. My current thinking is that the
> >> code should remain as it is on trunk.....
> >>
>
> >  While kludgy itself, a possible compromise is to still use a named
> >constant /
> > macro but have '4' in the name of the macro, eg like 'SOME_FOO_4' where
> the
> >
> > SOME_FOO is a semblance of descriptive and the 4 says what the value is
> so
> >you
> > don't have to look it up. The key thing is that there may be multiple
> >reasons
> > to use the value 4 in a program and the named constant is illustrating
> >which
> > reason it is. If you change the value of the constant then you would also
> > rename this particular constant to match the new value, but the key thing
> >is you
> > have something easily look-upable that shows all the 4 are connected. --
> >Darren
> > Duncan
> >
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users at mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
> >
>
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to