On Tue, May 17, 2011 at 06:55,  <danie...@apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_subr/deprecated.c Tue May 17 10:55:51 
> 2011
> @@ -630,6 +630,17 @@ svn_opt_print_generic_help(const char *h
>
>  /*** From io.c ***/
>  svn_error_t *
> +svn_io_file_create(const char *file,
> +                   const char *contents,
> +                   apr_pool_t *pool)
> +{
> +  const svn_string_t *contents_string;
> +
> +  contents_string = (contents ? svn_string_create(contents, pool) : NULL);
> +  return svn_io_file_create2(file, contents_string, pool);

contents_string can go on the stack, rather than allocated:

contents_string.data = contents;
contents_string.len = strlen(contents);
return svn_error_return(svn_io_file_create2(file, &contents_string, pool);

... tho it makes the NULL concept a bit more difficult.

>...

Cheers,
-g

Reply via email to