Project

General

Profile

Actions

Bug #13439

closed

[PATCH] fix RSTRUCT_LEN macro in public C API

Added by normalperson (Eric Wong) about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:80692]

Description

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

Files

Actions #1

Updated by Anonymous about 7 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r58359.


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]
Actions #2

Updated by usa (Usaku NAKAMURA) almost 7 years ago

  • Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: REQUIRED to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) almost 7 years ago

  • Backport changed from 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONE

ruby_2_4 r58636 merged revision(s) 58359.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0