mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* internal.h (INTEGER_PACK_NEGATIVE): Defined.
(rb_integer_unpack): sign argument removed. * bignum.c (rb_integer_unpack): sign argument removed. Non-negative integers generated by default. INTEGER_PACK_NEGATIVE flag is used to generate non-positive integers. * pack.c (pack_unpack): Follow the above change. * random.c (int_pair_to_real_inclusive): Ditto. (make_seed_value): Ditto. (mt_state): Ditto. (limited_big_rand): Ditto. * marshal.c (r_object0): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a338c4ed5d
commit
0c9a719d77
8 changed files with 62 additions and 41 deletions
|
@ -63,6 +63,7 @@ extern "C" {
|
|||
#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
|
||||
/* For rb_integer_unpack: */
|
||||
#define INTEGER_PACK_FORCE_BIGNUM 0x100
|
||||
#define INTEGER_PACK_NEGATIVE 0x200
|
||||
/* Combinations: */
|
||||
#define INTEGER_PACK_LITTLE_ENDIAN \
|
||||
(INTEGER_PACK_LSWORD_FIRST | \
|
||||
|
@ -448,7 +449,7 @@ VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, in
|
|||
|
||||
/* bignum.c */
|
||||
int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
|
||||
VALUE rb_integer_unpack(int sign, const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
|
||||
VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
|
||||
int rb_integer_pack_2comp(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
|
||||
|
||||
/* io.c */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue