Project

General

Profile

Bug #14036

Signature of rb_uint2big and rb_int2big

Added by Eregon (Benoit Daloze) about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:83424]

Description

rb_uint2big and rb_int2big are declared as such:

VALUE rb_uint2big(VALUE);
VALUE rb_int2big(SIGNED_VALUE);

and VALUE is one of

typedef uintptr_t VALUE;
typedef unsigned long VALUE;
typedef unsigned LONG_LONG VALUE;

and SIGNED_VALUE similar but without unsigned.

Should the signatures actually be:

VALUE rb_uint2big(unsigned long);
VALUE rb_int2big(long);

Of course, there is not much difference here.
But it seems a bit strange to make this kind of conversion functions taking C integers depend on the bitwidth of VALUE.


Related issues

Related to Ruby master - Bug #15570: rb_int2big signature change #14036 breaks VIM on 32b archesOpenActions

Associated revisions

Revision d77e8a7d
Added by nobu (Nobuyoshi Nakada) over 1 year ago

Signature of rb_uint2big and rb_int2big

  • include/ruby/ruby.h (rb_uint2big, rb_int2big): declare with uintptr_t and intptr_t instead of VALUE and SIGNED_VALUE respectively. [ruby-core:83424] [Bug #14036]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 62494
Added by nobu (Nobuyoshi Nakada) over 1 year ago

Signature of rb_uint2big and rb_int2big

  • include/ruby/ruby.h (rb_uint2big, rb_int2big): declare with uintptr_t and intptr_t instead of VALUE and SIGNED_VALUE respectively. [ruby-core:83424] [Bug #14036]

Revision 62494
Added by nobu (Nobuyoshi Nakada) over 1 year ago

Signature of rb_uint2big and rb_int2big

  • include/ruby/ruby.h (rb_uint2big, rb_int2big): declare with uintptr_t and intptr_t instead of VALUE and SIGNED_VALUE respectively. [ruby-core:83424] [Bug #14036]

Revision b2033b8b
Added by nobu (Nobuyoshi Nakada) over 1 year ago

Signature of rb_uint2inum and rb_int2inum

  • include/ruby/ruby.h (rb_int2inum, rb_uint2inum): adjust declarations. [ruby-core:83424] [Bug #14036]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 62498
Added by nobu (Nobuyoshi Nakada) over 1 year ago

Signature of rb_uint2inum and rb_int2inum

  • include/ruby/ruby.h (rb_int2inum, rb_uint2inum): adjust declarations. [ruby-core:83424] [Bug #14036]

Revision 62498
Added by nobu (Nobuyoshi Nakada) over 1 year ago

Signature of rb_uint2inum and rb_int2inum

  • include/ruby/ruby.h (rb_int2inum, rb_uint2inum): adjust declarations. [ruby-core:83424] [Bug #14036]

History

#1

Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Description updated (diff)
#2

Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Status changed from Open to Closed

Applied in changeset trunk|r62494.


Signature of rb_uint2big and rb_int2big

  • include/ruby/ruby.h (rb_uint2big, rb_int2big): declare with uintptr_t and intptr_t instead of VALUE and SIGNED_VALUE respectively. [ruby-core:83424] [Bug #14036]
#3

Updated by vo.x (Vit Ondruch) 10 months ago

  • Related to Bug #15570: rb_int2big signature change #14036 breaks VIM on 32b arches added

Also available in: Atom PDF