From: Roy Sutton Date: 2006-11-15T23:50:31+09:00 Subject: Re: Ruby <-SWIG-> C arrays Kouhei Sutou wrote: > In <2250e499a84aaf577be46b5e5ffd238a@ruby-forum.com> > "Ruby <-SWIG-> C arrays" on Wed, 15 Nov 2006 02:04:14 +0900, > Aureliano Buendia wrote: > >> typedef unsigned long uInt32 >> someFunction(uInt32 someArray[]) >> > Here is a my answer: > > $2 = RARRAY($input)->len; > > Note that RARRAY(x)->len is going away in future versions of Ruby. Use RARRAY_LEN(x) if you can. If you don't have it defined you can always supply it: #ifndef RARRAY_LEN # define RARRAY_LEN(x) RARRAY(x)->len #endif Roy