httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <>
Subject Re: calling pstrdup() on value before table_set?
Date Sun, 21 Dec 1997 20:50:44 GMT
Dean Gaudet wrote:
> On Sun, 21 Dec 1997, Rodent of Unusual Size wrote:
> > My feeling is that when I hand something to table_*(), I'm expecting
> > it to squirrel a value away for me, not just point to it.  The pool
> > is an attribute of the table, so copying values into the table's
> > pool makes perfect sense and strikes me as elegant.
> table_set(t, "blahblah", "boohiss").  pstrdup()ing those is a waste of
> time, they're constants. 

Yeah, but how does table_set know that? A quick scan seems to indicate
that about half the calls to table_set have the 2nd argument as a
constant, thus it seems more "natural" and easier to have table_set
also do an alloc of space since in most cases that's how it'll be
used. :/

      Jim Jagielski            |       jaguNET Access Services           |
            "Look at me! I'm wearing a cardboard belt!"

View raw message