path: root/internal.h
diff options
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-06 11:57:35 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-06 11:57:35 +0000
commit9fea8758e98eed379bf406f2fea6c8403efe2590 (patch)
tree43b6d68224149d266a858e9ec18ac7ddf61f707a /internal.h
parentc247e62808211a8e3ef0f54718b4dfea3bc46e13 (diff)
* Invoke RUBY_REPLACE_TYPE for size_t.
Don't invoke RUBY_CHECK_PRINTF_PREFIX for size_t to avoid conflict with RUBY_REPLACE_TYPE. * internal.h (rb_absint_size): Declared. (rb_absint_size_in_word): Ditto. (rb_int_export): Ditto. * bignum.c (rb_absint_size): New function. (rb_absint_size_in_word): Ditto. (int_export_fill_dd): Ditto. (int_export_take_lowbits): Ditto. (rb_int_export): Ditto. * pack.c (pack_pack): Use rb_int_export for BER compressed integer. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
1 files changed, 5 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index be522c8b09..3fa110539e 100644
--- a/internal.h
+++ b/internal.h
@@ -99,6 +99,8 @@ VALUE rb_big_fdiv(VALUE x, VALUE y);
VALUE rb_big_uminus(VALUE x);
VALUE rb_integer_float_cmp(VALUE x, VALUE y);
VALUE rb_integer_float_eq(VALUE x, VALUE y);
+size_t rb_absint_size(VALUE val, int *number_of_leading_zero_bits);
+size_t rb_absint_size_in_word(VALUE val, size_t word_numbits, size_t *number_of_leading_zero_bits);
/* class.c */
VALUE rb_obj_methods(int argc, VALUE *argv, VALUE obj);
@@ -423,6 +425,9 @@ const char *rb_objspace_data_type_name(VALUE obj);
/* Temporary. This API will be removed (renamed). */
VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
+/* bignum.c */
+void *rb_int_export(VALUE val, int *signp, void *bufarg, size_t *countp, int wordorder, size_t wordsize, int endian, size_t nails);
/* io.c */
void rb_maygvl_fd_fix_cloexec(int fd);