[PATCH] ruby <= 1.8.5 fix
From: Rupert Wood <me_at_rupey.net>
Date: Mon, 16 Feb 2009 19:25:28 -0000
The commit to fix Ruby 1.9 (35852) broke 1.8.5 and below lower because they don't define RARRAY_PTR and LEN or RSTRING_PTR and LEN. AFAICS there's no minimum Ruby version documented (although there is a configure check for >= 1.8.2) so 1.8.5 should still be OK.
The following patch adds the missing defines. As far as I can see swigutil_rb.h isn't used outside the libsvn_swig_ruby build so it's safe to modify for this (if you did prefer to avoid changing the .h then both swigutil_rb.c and the ruby svn_client.c need patching). Ideally I would also wrap the checks and definitions in a #if that tests Ruby's version but I can't see an easy way to pull in Ruby's version.h and I think it's overkill to write a configure check for this. However I think it's a safe bet that all future Ruby versions will define RARRAY_PTR. The RArray structure is the same in versions 1.8.2, -3 and -4 so this patch should work for those versions too.
Tested against trunk r35879 on i686-linux with Ruby 1.8.5. I do see the following check-swig-rb failures but then I see the same failures building against 1.8.6 without this patch.
1) Failure:
2) Error:
219 tests, 1488 assertions, 1 failures, 1 errors
[[[
* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h:
------------------------------------------------------
|
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.