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

Re: Buildbots failing after reintegration of diff-optimizations-bytes

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 07 Feb 2011 12:10:53 +0000

Johan Corveleyn <jcorvel_at_gmail.com> writes:

> Apparently I broke the builds on the builtbots yesterday evening,
> after integrating the diff-optimizations-bytes branch. Sorry for that.
>
> There were two problems:
> - Failing diff-diff3-test.exe (actually hanging). This was rectified
> in r1067839.
>
> - Failing (python) bindings. I could use some help with that (I don't
> understand how these are generated, and where/what I should change).
> This is the relevant excerpt from stdio from svn-x64-centos gcc:

On Linux one runs 'make swig-py' to build the Python SWIG bindings and
'make check-swig-py' to run the tests.

SWIG generates C code from the .i files in subversion/bindings/swig,
maybe using the subversion/include headers as well (I'm not an expert).

>
> [[[
> subversion/bindings/swig/python/svn_diff.c: In function
> 'svn_diff_fns2_invoke_datasources_open':
> subversion/bindings/swig/python/svn_diff.c:2838: warning: passing
> argument 3 of '_obj->datasources_open' makes pointer from integer
> without a cast
> subversion/bindings/swig/python/svn_diff.c:2838: error: too few
> arguments to function '_obj->datasources_open'
> subversion/bindings/swig/python/svn_diff.c:2839: warning: control
> reaches end of non-void function
> ]]]
>
> Can someone, more knowledgeable than me with the bindings, take a look
> at this and/or give me a pointer for what I should do?

Looking at the declaration in svn_diff.h:

/** A vtable for reading data from the three datasources. */
typedef struct svn_diff_fns2_t
{
  /** Open the datasources of type @a datasources. */
  svn_error_t *(*datasources_open)(void *diff_baton, apr_off_t *prefix_lines,
                                   svn_diff_datasource_e datasource[],
                                   apr_size_t datasource_len);

and the generated code:

static svn_error_t * svn_diff_fns2_invoke_datasources_open(
  svn_diff_fns2_t * _obj, void *diff_baton, apr_off_t *prefix_lines, svn_diff_da
tasource_e datasource[], apr_size_t datasource_len) {
  return (_obj->datasources_open)(diff_baton, prefix_lines, datasource_len);
}

I see that SWIG has simply dropped the datasource parameter. Perhaps
SWIG cannot cope with the [] syntax? Could you use * instead?

-- 
Philip
Received on 2011-02-07 13:11:40 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.