[DRE-commits] [ruby-oj] 02/03: Drop 90_32bit_fix.patch, applied upstream

Cédric Boutillier boutil at moszumanska.debian.org
Sun May 24 21:58:21 UTC 2015


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-oj.

commit 09ba2fc1702a0e1544bf5b5e937605d9304e33b3
Author: Cédric Boutillier <boutil at debian.org>
Date:   Sun May 24 23:04:23 2015 +0200

    Drop 90_32bit_fix.patch, applied upstream
---
 debian/patches/90_32bit_fix.patch | 126 --------------------------------------
 debian/patches/series             |   1 -
 2 files changed, 127 deletions(-)

diff --git a/debian/patches/90_32bit_fix.patch b/debian/patches/90_32bit_fix.patch
deleted file mode 100644
index 0eb9a45..0000000
--- a/debian/patches/90_32bit_fix.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-Description: attempting 32 bit fix
- solving test failures on non 64bit machines
-Bug: https://github.com/ohler55/oj/issues/233
-Author: Peter Ohler <ohler at mac.com>
-Origin: upstream
-Reviewed-by: Cédric Boutillier <boutil at debian.org>
-Last-Update: 2015-05-04
-
---- a/ext/oj/dump.c
-+++ b/ext/oj/dump.c
-@@ -399,7 +399,7 @@
- dump_fixnum(VALUE obj, Out out) {
-     char	buf[32];
-     char	*b = buf + sizeof(buf) - 1;
--    long	num = NUM2LONG(obj);
-+    long long	num = rb_num2ll(obj);
-     int		neg = 0;
- 
-     if (0 > num) {
-@@ -1031,9 +1031,9 @@
- #else
-     time_t		sec = NUM2LONG(rb_funcall2(obj, oj_tv_sec_id, 0, 0));
- #if HAS_NANO_TIME
--    long		nsec = NUM2LONG(rb_funcall2(obj, oj_tv_nsec_id, 0, 0));
-+    long long		nsec = rb_num2ll((rb_funcall2(obj, oj_tv_nsec_id, 0, 0));
- #else
--    long		nsec = NUM2LONG(rb_funcall2(obj, oj_tv_usec_id, 0, 0)) * 1000;
-+    long long		nsec = rb_num2ll(rb_funcall2(obj, oj_tv_usec_id, 0, 0)) * 1000;
- #endif
- #endif
-     
-@@ -1127,9 +1127,9 @@
- #else
-     time_t		sec = NUM2LONG(rb_funcall2(obj, oj_tv_sec_id, 0, 0));
- #if HAS_NANO_TIME
--    long		nsec = NUM2LONG(rb_funcall2(obj, oj_tv_nsec_id, 0, 0));
-+    long long		nsec = rb_num2ll(rb_funcall2(obj, oj_tv_nsec_id, 0, 0));
- #else
--    long		nsec = NUM2LONG(rb_funcall2(obj, oj_tv_usec_id, 0, 0)) * 1000;
-+    long long		nsec = rb_num2ll(rb_funcall2(obj, oj_tv_usec_id, 0, 0)) * 1000;
- #endif
- #endif
-     long		tzsecs = NUM2LONG(rb_funcall2(obj, oj_utc_offset_id, 0, 0));
---- a/ext/oj/fast.c
-+++ b/ext/oj/fast.c
-@@ -345,7 +345,7 @@
- 	if (neg) {
- 	    n = -n;
- 	}
--	leaf->value = LONG2NUM(n);
-+	leaf->value = rb_ll2inum(n);
-     }
-     leaf->value_type = RUBY_VAL;
- }
---- a/ext/oj/object.c
-+++ b/ext/oj/object.c
-@@ -180,7 +180,7 @@
- 	char	c = *str++;
- 
- 	if ('.' == c) {
--	    long	nsec = 0;
-+	    long long	nsec = 0;
- 
- 	    for (; str < end; str++) {
- 		c = *str;
-@@ -192,7 +192,7 @@
- 	    }
- 	    args[5] = rb_float_new((double)n + ((double)nsec + 0.5) / 1000000000.0);
- 	} else {
--	    args[5] = LONG2NUM(n);
-+	    args[5] = rb_ll2inum(n);
- 	}
- 	if (end < str) {
- 	    args[6] = LONG2NUM(0);
---- a/ext/oj/odd.c
-+++ b/ext/oj/odd.c
-@@ -64,15 +64,15 @@
-     VALUE	rsecs = rb_funcall(obj, sec_id, 0);
-     VALUE	rfrac = rb_funcall(obj, sec_fraction_id, 0);
-     long	sec = NUM2LONG(rsecs);
--    long	num = NUM2LONG(rb_funcall(rfrac, numerator_id, 0));
--    long	den = NUM2LONG(rb_funcall(rfrac, denominator_id, 0));
-+    long long	num = rb_num2ll(rb_funcall(rfrac, numerator_id, 0));
-+    long long	den = rb_num2ll(rb_funcall(rfrac, denominator_id, 0));
- 
- #if DATETIME_1_8
--	num *= 86400;
-+    num *= 86400;
- #endif
-     num += sec * den;
- 
--    return rb_funcall(rb_cObject, rational_id, 2, LONG2FIX(num), LONG2FIX(den));
-+    return rb_funcall(rb_cObject, rational_id, 2, rb_ll2inum(num), rb_ll2inum(den));
- }
- 
- void
---- a/ext/oj/parse.c
-+++ b/ext/oj/parse.c
-@@ -438,6 +438,7 @@
- 		} else {
- 		    zero_cnt = 0;
- 		}
-+		// TBD move size check here
- 		ni.i = ni.i * 10 + d;
- 		if (LONG_MAX <= ni.i || DEC_MAX < ni.dec_cnt - zero_cnt) {
- 		    ni.big = 1;
-@@ -455,6 +456,7 @@
- 		    zero_cnt = 0;
- 		}
- 		ni.dec_cnt++;
-+		// TBD move size check here
- 		ni.num = ni.num * 10 + d;
- 		ni.div *= 10;
- 		if (LONG_MAX <= ni.div || DEC_MAX < ni.dec_cnt - zero_cnt) {
-@@ -702,9 +704,9 @@
- 	    }
- 	} else {
- 	    if (ni->neg) {
--		rnum = LONG2NUM(-ni->i);
-+		rnum = rb_ll2inum(-ni->i);
- 	    } else {
--		rnum = LONG2NUM(ni->i);
-+		rnum = rb_ll2inum(ni->i);
- 	    }
- 	}
-     } else { // decimal
diff --git a/debian/patches/series b/debian/patches/series
index c2d30f0..50c2cb6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
 01_dont_mess_with_loadpath.patch
 02_avoid_name_conflict_with_ext.patch
 03_find_test_helper.patch
-90_32bit_fix.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-oj.git



More information about the Pkg-ruby-extras-commits mailing list