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

Re: [PATCH] Fix svndiff-test and vdelta-test

From: <cmpilato_at_collab.net>
Date: 2002-02-15 22:35:47 CET

Daniel Berlin <dan@dberlin.org> writes:

> They need to create and pass pools, or else they crash.

Committed, despite a little bug, and no log message from you :-(

> Index: ./svndiff-test.c
> ===================================================================
> --- ./svndiff-test.c
> +++ ./svndiff-test.c Fri Feb 15 16:16:58 2002
> @@ -21,6 +21,7 @@
> #include <apr_general.h>
> #include "svn_base64.h"
> #include "svn_quoprint.h"
> +#include "svn_pools.h"
> #include "svn_delta.h"
> #include "svn_error.h"
>
> @@ -34,28 +35,29 @@
> svn_txdelta_window_handler_t svndiff_handler;
> svn_stream_t *encoder;
> void *svndiff_baton;
> + apr_pool_t *pool = svn_pool_create (NULL);
>
> source_file = fopen (argv[1], "rb");
> target_file = fopen (argv[2], "rb");
>
> apr_initialize();
> - svn_txdelta (&txdelta_stream, svn_stream_from_stdio (source_file, NULL),
> - svn_stream_from_stdio (target_file, NULL), NULL);
> + svn_txdelta (&txdelta_stream, svn_stream_from_stdio (source_file, pool),
> + svn_stream_from_stdio (target_file, pool), pool);
>
> #ifdef QUOPRINT_SVNDIFFS
> - encoder = svn_quoprint_encode (svn_stream_from_stdio (stdout, NULL), NULL);
> + encoder = svn_quoprint_encode (svn_stream_from_stdio (stdout, pool), pool);
> #else
> - encoder = svn_base64_encode (svn_stream_from_stdio (stdout, NULL), NULL);
> + encoder = svn_base64_encode (svn_stream_from_stdio (stdout, pool), pool);
> #endif
> - svn_txdelta_to_svndiff (encoder, NULL, &svndiff_handler, &svndiff_baton);
> + svn_txdelta_to_svndiff (encoder, pool, &svndiff_handler, &svndiff_baton, 1);

Whoops! How did that extra "1" get into the call to svn_txdelta_to_svndiff()?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:08 2006

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.