summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-11 21:39:55 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-11 21:39:55 +0000
commit0c9a719d7728e026e2bd4dfef61d940d3ca7248f (patch)
treeabf593edd8848f8f9e18699b07a11aacb2389da8 /internal.h
parenta338c4ed5d519f05bf1f9fcd6a7b237a3101df0a (diff)
* 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
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal.h b/internal.h
index bcc6c58a31..46f0890899 100644
--- a/internal.h
+++ b/internal.h
@@ -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 */