[ruby-cvs:65531] normal:r58359 (trunk): fix RSTRUCT_LEN macro in public C API

normal at ruby-lang.org normal at ruby-lang.org
Sat Apr 15 09:46:00 JST 2017


normal	2017-04-15 09:46:00 +0900 (Sat, 15 Apr 2017)

  New Revision: 58359

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58359

  Log:
    fix RSTRUCT_LEN macro in public C API
    
    rb_struct_size returns an Integer VALUE, so it must be converted
    to a `long` for compatibility with previous Ruby C API versions.
    
    * ext/-test-/struct/len.c: new
    * test/-ext-/struct/test_len.rb: new
    * include/ruby/ruby.h (RSTRUCT_LEN): use NUM2LONG
      [ruby-core:80692] [Bug #13439]

  Added files:
    trunk/ext/-test-/struct/len.c
    trunk/test/-ext-/struct/test_len.rb
  Modified files:
    trunk/include/ruby/ruby.h


More information about the ruby-cvs mailing list