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

Re: [PATCH] Perl bindings corrupt "{DATE}" revision variable

From: Daniel Shahaf <danielsh_at_apache.org>
Date: Wed, 2 Nov 2016 18:47:53 +0000

Rainer Müller wrote on Wed, Nov 02, 2016 at 18:29:04 +0100:
> Index: subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
> ===================================================================
> --- subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (revision 1767623)
> +++ subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (working copy)
> @@ -470,9 +470,11 @@ svn_opt_revision_t *svn_swig_pl_set_revision(svn_o
> if (!end)
> maybe_croak(("unknown opt_revision_t string \"%s\": "
> "missing closing brace for \"{DATE}\"", input));
> + char saved = *end;

Do the perl bindings use C89, like libsvn*? C89 forbids middle-of-block
declarations.

> *end = '\0';
> err = svn_parse_date (&matched, &tm,
> input + 1, apr_time_now(), pool);
> + *end = saved;

The two maybe_croak() calls after this line (one of them in the patch
context, one just below it) would now print two right braces.

> if (err) {
> svn_error_clear (err);
> maybe_croak(("unknown opt_revision_t string \"{%s}\": "

Thanks for the patch and log message. I can't easily test it, but
I think it's correct, modulo the two trivial points above.

Cheers,

Daniel
Received on 2016-11-02 19:48:00 CET

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.