Thanks! It's strange but if I write:
#include <ruby.h>
#include <ffmpeg/avcodec.h>
GCC does not complain (no warning at all even with -Wall) butet wrong results. I didn't found why (conditional define?).

If i switch the include order:
#include <ffmpeg/avcodec.h>
#include <ruby.h>
I get the GCC warning ("RSHIFT" redefined) but this time the "good" RSHIFT is used and results are correct.

I guess I will get ride of the warning by using #undef.

Thanks for your answer! Ruby rocks ;)
Sylvain


----- Message d'origine ----
> De : ts <decoux / moulon.inra.fr>
> : ruby-core / ruby-lang.org
> Envoyle : Lundi, 2 Juin 2008, 10h16mn 55s
> Objet : Re: Re : Problem with NUM2INT
> 
> Sylvain HENRY wrote:
> > Hi,
> > 
> > I corrected warnings given by GCC (especiallyad to use rb_num2long and not 
> rb_num2int but the result is the same).
> > 
> 
> For me it say
> 
>    /home/ts/local/ff/include/libavutil/common.h:107:1: warning: "RSHIFT" 
> redefined
> 
> and it give
> 
> vgs% ruby -r testo -e 'Punyu::Testo::new(100)'
> vindex 201, index 101
> vindex 201, index 100
> vindex 201, index 101
> vgs% 
> 
> You must make in sort that the compiler take the definition of
> RSHIFT() from an ruby include file
> 
> and it will give
> 
> 
> vgs% ruby -r testo -e 'Punyu::Testo::new(100)'
> vindex 201, index 100
> vindex 201, index 100
> vindex 201, index 100
> vgs% 
> 
> 
> Guy Decoux


__________________________________________________
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