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

Re: [PATCH] Avoid allocating memory to extract basename using svn_relpath_basename

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: Mon, 04 Oct 2010 21:42:47 +0530

On 10/04/2010 05:52 PM, vijayaguru wrote:
> Hi,
>
> From svn_relpath_basename documentation, if pool is NULL, it simply
> returns a pointer to the string without allocating additional memory.
> Pass NULL pointer to svn_relpath_basename wherever the returned basename
> need not be persistent. It could save few bytes of memory.
>
>
> [[[
> Log:
> Pass NULL pointer to svn_relpath_basename wherever the returned
> basename need not be allocated in pool.
>
> * subversion/mod_dav_svn/reports/update.c
> (absent_helper, upd_delete_entry)
> * subversion/libsvn_wc/update_editor.c
> (delete_entry)
> * subversion/svnlook/main.c
> (print_tree)
> * subversion/libsvn_client/repos_diff.c
> (absent_directory)
> * subversion/libsvn_ra_neon/commit.c
> (commit_delete_entry)
> * subversion/libsvn_ra_serf/commit.c
> (checkout_dir)
> * subversion/libsvn_repos/node_tree.c
> (add_open_helper)
>
> Pass NULL pointer to svn_relpath_basename wherever the returned
> basename need not be persistent.
>
> Patch by: Vijayaguru G<vijay_at_collab.net>
> Suggested by: Kameshj
>
> ]]]
>

Thanks committed in r1004306.

With regards
Kamesh Jayachandran
> Thanks& Regards,
> Vijayaguru
>
Received on 2010-10-04 18:16:09 CEST

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.