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

Re: [PATCH] Help SWIG to parse SVN_VER_NUM

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 28 Jul 2009 16:18:02 -0400

Yes, works in 1.6, too.

As I said, I don't know Ruby, but the code in what I would guess is referred
to as Svn::Util::set_constants() (in util.rb) appears to me to strip off the
SVN_ prefix at module load time.

Роман Донченко wrote:
> Hmm. Are you sure? I mean, I don't know Ruby either, but did the SVN_
> prefix really disappear? There are definitely the full names in the
> SWIG-generated file:
>
> ~
> rb_define_const(mCore, "SVN_VER_NUM", SWIG_FromCharPtr("1.7.0"));
> rb_define_const(mCore, "SVN_VER_NUMBER", SWIG_FromCharPtr("1.7.0-dev"));
> rb_define_const(mCore, "SVN_VERSION", SWIG_FromCharPtr("1.7.0 (dev
> build)"));
> ~
>
> Does your test work in 1.6, too?
>
> I've committed my diff anyway, though (r38485), because the only
> difference between those newly added lines and the lines I've removed is
> the function (SWIG_FromCharPtr vs. rb_str_new2).
>
> Roman.
>
> C. Michael Pilato <cmpilato_at_collab.net> писал в своём письме Tue, 28 Jul
> 2009 19:40:15 +0400:
>
>> A-ha! I was close. It's:
>>
>> require "svn/core"
>> print Svn::Core::VER_NUM + "\n"
>>
>> +1 to commit your patch, Roman.
>>
>> C. Michael Pilato wrote:
>>> This seems to work fine for Python. But I can't figure out how to
>>> test it
>>> for Ruby. (I don't know the language.)
>>>
>>> I've tried something like:
>>>
>>> require "svn/core"
>>> print Svn::Core::SVN_VER_NUM
>>>
>>> but I get errors. However, I get the same errors using 1.6.x, so
>>> that tells
>>> me that my testing method is bogus. :-(
>>>
>>>
>>> Roman Donchenko wrote:
>>>> Greetings,
>>>>
>>>> I'm not sure if the SWIG interface definition files lie within my
>>>> zone of
>>>> authority, so I'll post to the list this time. 8=]
>>>>
>>>> [[[
>>>> * subversion/bindings/swig/core.i: Add the definition of
>>>> APR_STRINGIFY, so
>>>> SWIG can parse SVN_VER_NUM and dependent macros. Remove explicit
>>>> definitions of said macros from the Ruby-specific code.
>>>> ]]]
>>>>
>>>> I must admit that the Ruby modifications are completely untested.
>>>> Whilst I
>>>> can't think of a reason they would be broken by the change, it would
>>>> nevertheless be great if somebody confirmed they aren't - which is the
>>>> second reason I'm posting this. 8=]
>>>>
>>>> Roman.
>>>>
>>>> ------------------------------------------------------
>>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2375673
>>>>
>>>>
>>>
>>>
>>
>>
>
>

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2376386

Received on 2009-07-28 22:18:34 CEST

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.