[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>

Hello,

9 messages 2017/10/04

[ruby-core:83424] [Ruby trunk Bug#14036] Signature of rb_uint2big and rb_int2big

From: eregontp@...
Date: 2017-10-20 21:40:50 UTC
List: ruby-core #83424
Issue #14036 has been reported by Eregon (Benoit Daloze).

----------------------------------------
Bug #14036: Signature of rb_uint2big and rb_int2big
https://bugs.ruby-lang.org/issues/14036

* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
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.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next