You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/03/10 14:43:13 UTC
svn commit: r1665546 - /subversion/trunk/subversion/libsvn_delta/compat.c
Author: rhuijben
Date: Tue Mar 10 13:43:12 2015
New Revision: 1665546
URL: http://svn.apache.org/r1665546
Log:
Use a struct as baton to avoid constness warnings in an
editor v2 helper function.
* subversion/libsvn_delta/compat.c
(open_delta_target): Use change as baton.
(ev2_apply_textdelta): Update caller.
Modified:
subversion/trunk/subversion/libsvn_delta/compat.c
Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1665546&r1=1665545&r2=1665546&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Tue Mar 10 13:43:12 2015
@@ -816,8 +816,9 @@ static svn_error_t *
open_delta_target(svn_stream_t **stream, void *baton,
apr_pool_t *result_pool, apr_pool_t *scratch_pool)
{
- const char **delta_target = baton;
- return svn_stream_open_unique(stream, delta_target, NULL,
+ struct change_node *change = baton;
+ return svn_stream_open_unique(stream, &change->contents_abspath,
+ NULL,
svn_io_file_del_on_pool_cleanup,
result_pool, scratch_pool);
}
@@ -850,8 +851,7 @@ ev2_apply_textdelta(void *file_baton,
FALSE, handler_pool);
change->contents_changed = TRUE;
- target = svn_stream_lazyopen_create(open_delta_target,
- &change->contents_abspath,
+ target = svn_stream_lazyopen_create(open_delta_target, change,
FALSE, fb->eb->edit_pool);
svn_txdelta_apply(hb->source, target,