Correctly handling the deprecation of rb_enable_super

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

<:((><

Hi,

···

At Fri, 12 Sep 2003 05:47:08 +0900, Nathaniel Talbott wrote:

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.


Nobu Nakada

Thanks, Nobu! Worked like a charm.

Nathaniel

<:((><

···

nobu.nokada@softhome.net [mailto:nobu.nokada@softhome.net] wrote:

#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.

Hi,

···

At Fri, 12 Sep 2003 18:43:25 +0900, Nathaniel Talbott wrote:

#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.

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.


Nobu Nakada

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.

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