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

Re: [PATCH] python bindings bugfix for svn_repos_get_logs (resend, issue 1387)

From: Russell Yanofsky <rey4_at_columbia.edu>
Date: 2003-07-26 01:45:36 CEST

cmpilato@collab.net wrote:
> "Russell Yanofsky" <rey4@columbia.edu> writes:
>
> > This is a trivial 3-line fix for the python bindings.
>
> Committed in revision 6579, though I'm not sure I understand
> the need for the 'immutable' marker. That string should be
> allocated from the pool, right? So clearing or destroying
> the pool would de-alloc the copyfrom_path. What am I
> mis-logic-ifying?

When subversion assigns a string to svn_log_changed_path_t::copyfrom_path, it
doesn't need to be freed since it is allocated in the pool. But if a python user
assigned a string to that member, the string would be allocated on the heap and
would need to be freed in order to prevent a memory leak. The immutable marker
just prevents users from assigning their own values to that member so there
can't be any leaks.

- Russ

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 26 01:46:58 2003

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.