Hi, I corrected warnings given by GCC (especially I had to use rb_num2long and not rb_num2int but the result is the same). ----- Message d'origine ---- > De : Nobuyoshi Nakada <nobu / ruby-lang.org> > : ruby-core / ruby-lang.org > Envoyle : Lundi, 2 Juin 2008, 3h55mn 13s > Objet : Re: Problem with NUM2INT > > Hi, > > At Mon, 2 Jun 2008 10:07:53 +0900, > Sylvain HENRY wrote in [ruby-core:17036]: > > I started writing my own extension for Ruby in C and I > > encountered what may be a bug with NUM2INT. > > > > I just wanted to convert a Ruby VALUE to a Cnt. The problem > > is that I don't get the same value whether I use NUM2INT, > > rb_num2int or NUM2LONG. > > I couldn't reproduce your result, with ffmpeg stuff commented > out. You're right! I forgot to "clean up" this file from my original project and the problem appears when onef the files "ffmepg/avformat.h" or 'ffmpeg/avcodec.h" is included. I'llry to figure out what's wrong with these files but if someone has an idea, please don't hesitate. > > > I use Ruby 1.8.6 (114), the last onen Gentoo. See attached > > file for the source code. > > What's your platform? 2.6.25-gentoo-r4 #1 SMP Fri May 23 21:40:37 UTC 2008 i686enuine Intel(R) CPU T2600 @ 2.16GHz GenuineIntel GNU/Linux > -- >obu Nakada Thanks, Sylvain __________________________________________________ Do You Yahoo!? En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicitñÔ http://mail.yahoo.fr Yahoo! Mail