[Eventmachine-talk] Ruby I/O

Francis Cianfrocca
Tue, 13 Mar 2007 11:41:36 -0000

On 3/13/07, Tony Arcieri <tony at clickcaster.com>
wrote:
>
> Yes, it didn''t build.  It looks like it''s trying to cast
a pointer to an
> int, and since I''m building it on 64-bit machines pointers are
64-bit and
> int 32-bit:
>
> g++ -I. -I. -I/usr/local/lib/ruby/1.8/x86 _64-linux -I.
> -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_ERR_H  -DOS_UNIX -DBUILD_FOR_RUBY
> -DWITH_SSL -fPIC -g -O2   -c rubyhttp.cpp
> rubyhttp.cpp: In function ''VALUE t_post_init(VALUE)'':
> rubyhttp.cpp:166: error: cast from
''RubyHttpConnection_t*'' to ''int'' loses
> precision
> make: *** [rubyhttp.o ] Error 1
>


Looks like you should be able to change  line 166 to the following:

 rb_ivar_set (self, rb_intern ("@http______conn"), INT2NUM
((long)hc));

looking in ruby.h, INT2NUM takes a long, so this should silence the compiler
error. Let me know if you get a chance to try it.
-------------- next part --------------
An HTML attachment was scrubbed...