Professional Web Applications Themes

Correctly handling the deprecation of rb_enable_super - Ruby

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 <:((><...

  1. #1

    Default 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

    <:((><


    Nathaniel Talbott Guest

  2. #2

    Default Re: Correctly handling the deprecation of rb_enable_super

    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

    nobu.nokada@softhome.net Guest

  3. #3

    Default Re: Correctly handling the deprecation of rb_enable_super

    [email]nobu.nokadasofthome.net[/email] [mailto:nobu.nokadasofthome.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.
    Thanks, Nobu! Worked like a charm.


    Nathaniel

    <:((><


    Nathaniel Talbott Guest

  4. #4

    Default Re: Correctly handling the deprecation of rb_enable_super

    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

    nobu.nokada@softhome.net Guest

  5. #5

    Default Re: Correctly handling the deprecation of rb_enable_super

    >>>>> "n" == nobu nokada <nobu.nokadasofthome.net> writes:

    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



    ts Guest

Similar Threads

  1. how to close correctly?
    By flairman in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: January 10th, 03:50 PM
  2. Can't get Projector to run correctly
    By Oblio in forum Macromedia Director Basics
    Replies: 0
    Last Post: January 25th, 10:45 AM
  3. Not Exporting Correctly
    By Thors1982 webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 4
    Last Post: August 4th, 05:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139