Yep, still need it, just using a local copy until it's committed.
Thanks
Chris
----- Original Message -----
From: <kfogel@collab.net>
To: "Peter N. Lundblad" <peter@famlundblad.se>
Cc: "Chris Foote" <cfoote@v21.me.uk>; "Branko Čibej" <brane@xbc.nu>;
<dev@subversion.tigris.org>
Sent: Monday, October 10, 2005 10:22 PM
Subject: Re: [PATCH] dup function for svn_info_t
Chris, this seems not to have made it into Subversion. Do you not
need it anymore, or do you still want it but just were waiting for
someone to commit it?
-Karl
"Peter N. Lundblad" <peter@famlundblad.se> writes:
> On Mon, 13 Jun 2005, Chris Foote wrote:
>
> > Branko Čibej wrote:
> > > Chris Foote wrote:
> > >
> > > >[LOG]
> > > >
> > > >Add a function to duplicate the svn_info_t structure.
> > > >
> > > >* subversion/include/svn_client.h
> > > > (svn_info_t): Add note to update svn_info_dup when extending the
struct.
> > > > (svn_info_dup): New function to duplicate an svn_info_t.
> > > >
> > > >* subversion/libsvn_client/info.c
> > > > (svn_info_dup): Ditto.
> > > >
> > > >
> > > Why add a public function that's not used anywhere?
> > >
> > So that clients (i.e. one I'm writing) can create safe copies of the struct
> > that are allocated in a different pool from the one that was used when
> > calling svn_client_info.
> >
>
> I agree. The struct might be extended, so to be safe, you need such a
> function.
> > > >+svn_info_t *
> > > >+svn_info_dup (const svn_info_t *info, apr_pool_t *pool)
> > > >+{
> > > >+ svn_info_t *dupinfo = apr_pcalloc (pool, sizeof(*dupinfo));
> > > >+
> > > >+ /* Perform a trivial copy ... */
> > > >+ *dupinfo = *info;
> > > >
> > > >
> > > Since you're copying the struct anyway, there's no sense in using
> > > apr_pcalloc.
> > True, although this is what svn_wc_entry_dup uses.
> >
> I don't mind changing that too, even if this is really cycle-counting if
> anything...
>
> Regards,
> //Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
--
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 16 01:52:34 2005