Forum: Ruby-Gnome 2 Patch to compile under ruby 1.9 (svn)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3853dd5371ac1e094fc45d6c2aa0e459?d=identicon&s=25 Carlo E. Prelz (Guest)
on 2008-10-26 18:38
(Received via mailing list)
Attachment: ruby-gnome-diff.bz2 (20 KB)
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
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2008-12-09 12:29
(Received via mailing list)
Hi,

In <20081026165723.GA18285@frittella.fluido.as>
  "[ruby-gnome2-devel-en] Patch to compile under ruby 1.9 (svn)" on Sun,
26 Oct 2008 17:57:23 +0100,
  "Carlo E. Prelz" <fluido@fluido.as> 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
3853dd5371ac1e094fc45d6c2aa0e459?d=identicon&s=25 Carlo E. Prelz (Guest)
on 2008-12-10 10:58
(Received via mailing list)
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 Sutou (kou@cozmixng.org):

> 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)

2) 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.

3) 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 ;-)

> Thanks,

Thanks to you!

Carlo

--
  *         Se la Strada e la sua Virtu' non fossero state messe da
parte,
* K * Carlo E. Prelz - fluido@fluido.as             che bisogno ci
sarebbe
  *               di parlare tanto di amore e di rettitudine?
(Chuang-Tzu)
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2008-12-10 13:25
(Received via mailing list)
Hi,

In <20081210091812.GA13575@frittella.fluido.as>
  "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" <fluido@fluido.as> 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 Sutou (kou@cozmixng.org):
>
> > 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.

> 2) 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
This topic is locked and can not be replied to.