You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Sperling <st...@elego.de> on 2008/10/15 12:42:48 UTC

SWIG ignoring constants?

Hi,

I got this warning during the build:
/home/stsp/svn/svn-trunk/subversion/include/svn_props.h:482:
Warning(305): Bad constant value (ignored).

The constant the warning is referring to looks like this:

          /**
           * This is a list of all revision properties.
           */
line 482: #define SVN_PROP_REVISION_ALL_PROPS SVN_PROP_REVISION_AUTHOR, \
                                              SVN_PROP_REVISION_LOG, \
                                              SVN_PROP_REVISION_DATE, \
                                              SVN_PROP_REVISION_AUTOVERSIONED, \
                                              SVN_PROP_REVISION_ORIG_DATE, \
                                              SVNSYNC_PROP_LOCK, \
                                              SVNSYNC_PROP_FROM_URL, \
                                              SVNSYNC_PROP_FROM_UUID, \
                                              SVNSYNC_PROP_LAST_MERGED_REV, \
                                              SVNSYNC_PROP_CURRENTLY_COPYING,

I'm not entirely sure why SWIG is ignoring this constant.
Neither do I know what the consequences are.

So I just wanted to ask whether anyone who has an idea about
this issue can comment on this.

Thanks,
Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: SWIG ignoring constants?

Posted by Jeremy Whitlock <jc...@gmail.com>.
> I got this warning during the build:
> /home/stsp/svn/svn-trunk/subversion/include/svn_props.h:482:
> Warning(305): Bad constant value (ignored).
>
> The constant the warning is referring to looks like this:
>
>          /**
>           * This is a list of all revision properties.
>           */
> line 482: #define SVN_PROP_REVISION_ALL_PROPS SVN_PROP_REVISION_AUTHOR, \
>                                              SVN_PROP_REVISION_LOG, \
>                                              SVN_PROP_REVISION_DATE, \
>                                              SVN_PROP_REVISION_AUTOVERSIONED, \
>                                              SVN_PROP_REVISION_ORIG_DATE, \
>                                              SVNSYNC_PROP_LOCK, \
>                                              SVNSYNC_PROP_FROM_URL, \
>                                              SVNSYNC_PROP_FROM_UUID, \
>                                              SVNSYNC_PROP_LAST_MERGED_REV, \
>                                              SVNSYNC_PROP_CURRENTLY_COPYING,
>
> I'm not entirely sure why SWIG is ignoring this constant.
> Neither do I know what the consequences are.
>
> So I just wanted to ask whether anyone who has an idea about
> this issue can comment on this.

SWIG's C parser is not a complete parser and is easy confused.  I can
see why this could cause an issue.  The best thing from a SWIG
perspective would be to break those out into individual definitions
instead of one long chained one.

-- 
Take care,

Jeremy Whitlock
http://www.thoughtspark.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: SWIG ignoring constants?

Posted by David James <ja...@gmail.com>.
On Wed, Oct 15, 2008 at 5:42 AM, Stefan Sperling <st...@elego.de> wrote:
> Hi,
>
> I got this warning during the build:
> /home/stsp/svn/svn-trunk/subversion/include/svn_props.h:482:
> Warning(305): Bad constant value (ignored).
>
> The constant the warning is referring to looks like this:
>
>          /**
>           * This is a list of all revision properties.
>           */
> line 482: #define SVN_PROP_REVISION_ALL_PROPS SVN_PROP_REVISION_AUTHOR, \
>                                              SVN_PROP_REVISION_LOG, \
>                                              SVN_PROP_REVISION_DATE, \
>                                              SVN_PROP_REVISION_AUTOVERSIONED, \
>                                              SVN_PROP_REVISION_ORIG_DATE, \
>                                              SVNSYNC_PROP_LOCK, \
>                                              SVNSYNC_PROP_FROM_URL, \
>                                              SVNSYNC_PROP_FROM_UUID, \
>                                              SVNSYNC_PROP_LAST_MERGED_REV, \
>                                              SVNSYNC_PROP_CURRENTLY_COPYING,
>
> I'm not entirely sure why SWIG is ignoring this constant.
> Neither do I know what the consequences are.
>
> So I just wanted to ask whether anyone who has an idea about
> this issue can comment on this.

This is not really a big problem. You have a list of properties there
and SWIG says that it doesn't know how to convert your list of
properties into something that Python or Ruby or Perl can understand.

To make the list of all properties available to SWIG, we probably
would want to %ignore your constant defined in the header file and
teach SWIG to build a string array of the properties instead. This is
probably a 3 line patch to core.i.

Cheers,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org