Correctly handling the deprecation of rb_enable_super

N

Nathaniel Talbott

I'm using a library (ruby-odbc 0.99 to be exact) that calls
rb_enable_super(), which is obsolete as of ruby 1.8.0. Of course, this
causes said library to spit out warnings at me when I use it. I want to
submit a patch to the author to remove the warnings, but I'm not sure of the
correct way to fix it such that the library will still work under 1.6.x. Can
a C/Ruby guru out there give me a hand?

Thanks,


Nathaniel

<:((><
 
N

nobu.nokada

Hi,

At Fri, 12 Sep 2003 05:47:08 +0900,
Nathaniel said:
I'm using a library (ruby-odbc 0.99 to be exact) that calls
rb_enable_super(), which is obsolete as of ruby 1.8.0. Of course, this
causes said library to spit out warnings at me when I use it. I want to
submit a patch to the author to remove the warnings, but I'm not sure of the
correct way to fix it such that the library will still work under 1.6.x. Can
a C/Ruby guru out there give me a hand?

#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
rb_enable_super(klass, funcname);
#endif

This wouldn't work with transitional versions from 2003/02/09
until 2003/07/16, however, they are deprecated.
 
N

nobu.nokada

Hi,

At Fri, 12 Sep 2003 18:43:25 +0900,
Nathaniel said:
Thanks, Nobu! Worked like a charm.

Now rb_{enable,disable}_super() are dummy macros, so you don't
have to change the library's source. Just update ruby source
and recompile with it.
 
T

ts

n> Now rb_{enable,disable}_super() are dummy macros, so you don't
n> have to change the library's source. Just update ruby source
n> and recompile with it.

Well, some persons are trying to make their libraries work even with
1.8.0, which is released.

p.s. : this problem is well known with bdb ...
Good Luck ...


Guy Decoux
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,125
Messages
2,570,748
Members
47,302
Latest member
MitziWragg

Latest Threads

Top