[Kde-bindings] KDE/kdebindings/ruby/qtruby

Richard Dale rdale at foton.es
Thu Dec 11 16:41:23 UTC 2008


On Thursday 11 December 2008 16:31:49 Davor Ocelic wrote:
> On Thu, Dec 11, 2008 at 07:50:54AM -0500, Davor Ocelic wrote:
> > ....
> >
> >  - RSTRING(rs)->len into RSTRING_LEN(rs) and the likes
> >  - s/rb_frame_last_func/rb_frame_callee/
> >
> > For the KCODE & UTF thing I'm not sure, but I suppose the other
> > two could be taken care of with a simple define and/or version
> > check to do the right thing.
>
> For the defines, I mean something simple, in fact the same thing
> that narray library does:
>
> #if !defined RSTRING_LEN
> #define RSTRING_LEN(a) RSTRING(a)->len
> #endif
> #if !defined RSTRING_PTR
> #define RSTRING_PTR(a) RSTRING(a)->ptr
> #endif
> #if !defined RARRAY_LEN
> #define RARRAY_LEN(a) RARRAY(a)->len
> #endif
> #if !defined RARRAY_PTR
> #define RARRAY_PTR(a) RARRAY(a)->ptr
> #endif
>
> And then of course they can always just use RSTRING_LEN() etc..
>
> I'll prepare a patch with this in the next few days, test with
> 1.8 and 1.9 and send it to the list.
OK, I just commited a few things from the patch just before I saw your mail. I 
have RSTRING_LEN in my ruby.h header from 1.8.7, but maybe it isn't in Ruby 
1.8.6 or less - so it might be a good idea to add the macros like you have 
above.

Apart from that, I think it's mainly just rb_frame_callee() instead of 
rb_frame_last_func() and the KCODE changes as far as I can see.

-- Richard



More information about the Kde-bindings mailing list