[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a better way to represent values (was: Re: ADD FILES and UPDATE)
From: |
Jason Stover |
Subject: |
Re: a better way to represent values (was: Re: ADD FILES and UPDATE) |
Date: |
Mon, 8 Dec 2008 08:38:03 -0500 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Sun, Dec 07, 2008 at 09:48:56PM -0800, Ben Pfaff wrote:
> Ben Pfaff <address@hidden> writes:
> So now I want to propose a new way to do it. Change the
> definition of "union value" from this:
>
> /* A numeric or short string value.
> Multiple consecutive values represent a long string. */
> union value
> {
> double f;
> char s[MAX_SHORT_STRING];
> };
>
> to this:
>
> /* A numeric or string value.
> Short string values are stored inline; long string values are
> dynamically allocated. */
> union value
> {
> double f;
> char short_string[MAX_SHORT_STRING];
> char *long_string;
> };
>
> and add some helper functions to make dealing with the two
> different forms of storage for strings a bit easier.
>
> It's something of a big change, because there are a couple of
> hundred of references to the `s' member of union value in the
> source tree, and other related assumptions, but it will probably
> make a lot of other coding easier (as we can see from this
> thread). I'm willing to do the conversion to this form myself
> (and I'll even try to update the developers guide to match).
>
> Any comments?
Sounds good to me.
- Re: ADD FILES and UPDATE, (continued)
- Re: ADD FILES and UPDATE, Ben Pfaff, 2008/12/02
- Re: ADD FILES and UPDATE, Ben Pfaff, 2008/12/03
- a better way to represent values (was: Re: ADD FILES and UPDATE), Ben Pfaff, 2008/12/08
- Re: a better way to represent values (was: Re: ADD FILES and UPDATE), John Darrington, 2008/12/08
- Re: a better way to represent values, Ben Pfaff, 2008/12/08
- Re: a better way to represent values, John Darrington, 2008/12/08
- Re: a better way to represent values, Ben Pfaff, 2008/12/08
- Re: a better way to represent values, John Darrington, 2008/12/09
- Re: a better way to represent values (was: Re: ADD FILES and UPDATE),
Jason Stover <=
Re: ADD FILES and UPDATE, Jason Stover, 2008/12/01