Patch to compile under ruby 1.9 (svn)

Below you can find the patch to current svn that needs to be applied
to compile under ruby 1.9 (current svn).

The only stuff that needed to be changed (but many, many times…) is
from

RARRAY(xxx)->len
to
RARRAY_LEN(xxx)

and from

RARRAY(xxx)->ptr
to
RARRAY_PTR(xxx)

The whole tree compiles, but I only use GTK (and a relatively small
part of it). Thus, no warranty…

Carlo

Hi,

In [email protected]
“[ruby-gnome2-devel-en] Patch to compile under ruby 1.9 (svn)” on Sun,
26 Oct 2008 17:57:23 +0100,
“Carlo E. Prelz” [email protected] wrote:

and from

RARRAY(xxx)->ptr
to
RARRAY_PTR(xxx)

The whole tree compiles, but I only use GTK (and a relatively small
part of it). Thus, no warranty…

I’m sorry for my late response. I did the same work a month ago.
I know that there are many other problems to work with Ruby
1.9 but I have time for now…

Thanks,

kou

Subject: Re: [ruby-gnome2-devel-en] Patch to compile under ruby 1.9
(svn)
Date: mar 09 dic 08 08:28:24 +0900

Quoting Kouhei S. ([email protected]):

I’m sorry for my late response. I did the same work a month ago.
I know that there are many other problems to work with Ruby
1.9 but I have time for now…

No problem of course.

There were a few other things in my patch, that are still not
corrected in the SVN tree:

  1. the rubysig.h include file now gives a warning if inserted :

warning: #warning rubysig.h is obsolete

(in rbgtk.h, rbgobj_type.c)

  1. rb_thread_critical seems not to exist anymore. It is referred to in
    rbgobj_type.c. I have included this line:

static VALUE rb_thread_critical=Qfalse;

which seems to work, but I have no idea if this is the right way to
solve the problem.

  1. rb_progname seems not to exist anymore. It is referred to in
    rbgtkmain.c. I have no idea about how exactly to solve this issue,
    too. What I did is to modify line

EXTERN VALUE rb_progname;

to

VALUE rb_progname=Qnil;

(around the beginning), and then, before rb_progname is used, I added
these lines

if(rb_progname==Qnil)
rb_progname=rb_gv_get("$PROGRAM_NAME");

You will certainly know what is the right patch to apply :wink:

Thanks,

Thanks to you!

Carlo

  •     Se la Strada e la sua Virtu' non fossero state messe da 
    

parte,

  • K * Carlo E. Prelz - [email protected] che bisogno ci
    sarebbe
    •           di parlare tanto di amore e di rettitudine? 
      

(Chuang-Tzu)

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] Patch to compile under ruby 1.9 (svn)” on
Wed, 10 Dec 2008 10:18:12 +0100,
“Carlo E. Prelz” [email protected] wrote:

Subject: Re: [ruby-gnome2-devel-en] Patch to compile under ruby 1.9 (svn)
Date: mar 09 dic 08 08:28:24 +0900

Quoting Kouhei S. ([email protected]):

I’m sorry for my late response. I did the same work a month ago.
I know that there are many other problems to work with Ruby
1.9 but I have time for now…

Oops… I wanted to say “I don’t have time for now…”. :<

There were a few other things in my patch, that are still not
corrected in the SVN tree:

  1. the rubysig.h include file now gives a warning if inserted :

warning: #warning rubysig.h is obsolete

(in rbgtk.h, rbgobj_type.c)

done.

  1. rb_thread_critical seems not to exist anymore. It is referred to in
    rbgobj_type.c. I have included this line:

static VALUE rb_thread_critical=Qfalse;

which seems to work, but I have no idea if this is the right way to
solve the problem.

done.

(around the beginning), and then, before rb_progname is used, I added
these lines

if(rb_progname==Qnil)
rb_progname=rb_gv_get(“$PROGRAM_NAME”);

We should use rb_argv0 instead of rb_progname.

Thanks,

kou