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

Incorrect doc string for svn_log_message_receiver_t's pool parameter?

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-04-25 23:12:14 CEST

svn_log_message_receiver_t documents its POOL parameter as:

 * Use @a pool for all allocation. (If the caller is iterating over log
 * messages, invoking this receiver on each, we recommend the standard
 * pool loop recipe: create a subpool, pass it as @a pool to each call,
 * clear it after each iteration, destroy it after the loop is done.)

However, in svn_repos_get_logs3() (called indirectly over ra_local),
we invoke the function pointer parameter RECEIVER with an iterpool (a
sub-pool used for temporary allocation in loops). This means that any
data allocated in the POOL passed to this log receiver is going to be
cleared, and that a pool must be stashed in the receiver's BATON.

This means that either the documentation for
svn_log_message_receiver_t is incorrect, or that
svn_repos_get_logs3()'s usage of its receiver is wrong.

Which is it?

  • application/pgp-signature attachment: stored
Received on Wed Apr 25 23:12:25 2007

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.