[Win32utils-devel] 1.9.x compatibility for win32-api
Daniel.Berger at qwest.com
Wed Feb 18 16:19:10 EST 2009
> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of
> Luis Lavena
> Sent: Wednesday, February 18, 2009 12:44 PM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] 1.9.x compatibility for win32-api
> On Wed, Feb 18, 2009 at 5:17 PM, Berger, Daniel
> <Daniel.Berger at qwest.com> wrote:
> > [...]
> > I'm a little stuck at the moment, as it appears 1.9.x has
> separate macros for RARRAY(ptr) vs RARRAY(ptr)->[index].
> Anyone happen to know what it is?
> > Anyway, this is what I've got so far. If anyone can fill in
> the "???" for me that would be swell.
> > // Ruby 1.9.x
> > #ifndef RSTRING_PTR
> > #define RSTRING_PTR(s) (RSTRING(s)->ptr) #endif #ifndef RSTRING_LEN
> > #define RSTRING_LEN(s) (RSTRING(s)->len) #endif
> > #ifndef RARRAY_PTR
> > #define RARRAY_PTR(a) (RARRAY(a)->ptr) #define RARRAY_??????
> > (RARRAY(a)->ptr[i]) #endif #ifndef RARRAY_LEN #define RARRAY_LEN(a)
> > (RARRAY(a)->len) #endif
> This ticket has a good example:
> Only RARRAY_PTR(a) needs to get defined, since the index from
> the array will work out of the box in both cases.
> Did that help?
More information about the win32utils-devel