From: William S F. <ws...@fu...> - 2009-05-04 16:54:29
|
Bennett, Patrick wrote: > I've been trying to build an existing swig module of mine w/ Ruby 1.9.1 and it looks like SWIG isn't compatible yet (1.3.39). > > It looks like quite a few of the ruby wrappers try to adjust a Ruby Array's length directly using RARRAY_LEN. > i.e.: > RARRAY_LEN(obj) = size; > > In 1.9.1, the length member doesn't appear to just be a simple integer. The RARRAY_LEN macro will no longer work as an l-value and I don't see an obvious replacement. > Here's its 1.9.1 definition: > #define RARRAY_LEN(a) \ > ((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ? \ > (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \ > (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)) : \ > RARRAY(a)->as.heap.len) > Ruby 1.8 is what we test with when making releases. No one has been actively maintaining Ruby for a while now so some fixes for 1.9 might well be required if the 1.9 api is not backward compatible with 1.8. I suggest you send us any patches you think are needed. William |