[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Re: [PATCH] Trace update, and cancel update editors patch

From: Bill Tutt <rassilon_at_lyra.org>
Date: 2002-01-10 12:49:18 CET

> From: Greg Stein [mailto:gstein@lyra.org]
>
> On Mon, Dec 24, 2001 at 01:54:13PM -0800, Bill Tutt wrote:
> > > From: Greg Stein [mailto:gstein@lyra.org]
> > > >...
> > > > +/* Used by the trace_update editor in libsvn_client
> > > > + */
> > > > +void
> > > > +svn_cl__print_message(void *ui_baton,
> > > > + svn_stringbuf_t *msg)
> > > > +{
> > > > + fputs(msg->data, stdout);
> > > > +}
> > >
> > > 1) that should be const svn_string_t *, or just const char *. No
need
> > for
> > > a
> > > darned stringbuf.
> > >
> > > 2) use fwrite if you have a string(buf), since you already have
the
> > length.
> > >
> >
> > Most (99.9%) of the trace messages are formatted output anyway. If
we
> > pass in a stringbuf, the extra length data might help out UI apps
that
> > need to convert the thing into a Unicode string. Additionally, the
> > command line client is going to use puts() anyway, since the trace
> > messages shouldn't include \n at the end of the strings.
>
> Then use a "const svn_string_t *" if you want the length.
>
> svn_stringbuf_t : for mutable counted strings
> svn_string_t : for immutable counted strings
>

I don't need the length, although somebody else might, I also don't want
a silly type conversion allocation when I don't need one.

What about "const svn_stringbuf_t * const" as a compromise? :)

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:55 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.