[DRE-commits] [ruby-oj] 03/06: Drop 02_avoid_name_conflict_with_ext.patch and 0001-Updated-for-Ruby-2.3.0.patch, not needed any more
Cédric Boutillier
boutil at moszumanska.debian.org
Wed Jun 1 22:32:25 UTC 2016
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-oj.
commit 56a84c423a8449cbaa732940aade8661c43e315f
Author: Cédric Boutillier <boutil at debian.org>
Date: Thu Jun 2 00:13:41 2016 +0200
Drop 02_avoid_name_conflict_with_ext.patch and 0001-Updated-for-Ruby-2.3.0.patch, not needed any more
---
debian/patches/0001-Updated-for-Ruby-2.3.0.patch | 107 ---------------------
.../patches/02_avoid_name_conflict_with_ext.patch | 13 ---
debian/patches/series | 2 -
3 files changed, 122 deletions(-)
diff --git a/debian/patches/0001-Updated-for-Ruby-2.3.0.patch b/debian/patches/0001-Updated-for-Ruby-2.3.0.patch
deleted file mode 100644
index 1d623ea..0000000
--- a/debian/patches/0001-Updated-for-Ruby-2.3.0.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From 03592a272976a7a6ffa4248cdfebddde59213bb7 Mon Sep 17 00:00:00 2001
-From: Peter Ohler <peter at ohler.com>
-Date: Thu, 31 Dec 2015 11:38:12 -0800
-Subject: [PATCH] Updated for Ruby 2.3.0.
-
----
- ext/oj/extconf.rb | 1 +
- ext/oj/fast.c | 4 ++++
- ext/oj/reader.c | 5 +++--
- test/test_scp.rb | 20 +++++++++++++++++---
- 6 files changed, 28 insertions(+), 6 deletions(-)
-
---- a/ext/oj/extconf.rb
-+++ b/ext/oj/extconf.rb
-@@ -34,6 +34,7 @@ dflags = {
- 'USE_RB_MUTEX' => (is_windows && !('1' == version[0] && '8' == version[1])) ? 1 : 0,
- 'DATETIME_1_8' => ('ruby' == type && ('1' == version[0] && '8' == version[1])) ? 1 : 0,
- 'NO_TIME_ROUND_PAD' => ('rubinius' == type) ? 1 : 0,
-+ 'HAS_DATA_OBJECT_WRAP' => ('ruby' == type && '2' == version[0] && '3' <= version[1]) ? 1 : 0,
- }
- # This is a monster hack to get around issues with 1.9.3-p0 on CentOS 5.4. SO
- # some reason math.h and string.h contents are not processed. Might be a
---- a/ext/oj/fast.c
-+++ b/ext/oj/fast.c
-@@ -813,7 +813,11 @@ parse_json(VALUE clas, char *json, int g
- }
- #endif
- // last arg is free func void* func(void*)
-+#if HAS_DATA_OBJECT_WRAP
-+ doc->self = rb_data_object_wrap(clas, doc, 0, free_doc_cb);
-+#else
- doc->self = rb_data_object_alloc(clas, doc, 0, free_doc_cb);
-+#endif
- rb_gc_register_address(&doc->self);
- doc->json = json;
- DATA_PTR(doc->self) = doc;
---- a/ext/oj/reader.c
-+++ b/ext/oj/reader.c
-@@ -109,7 +109,7 @@ int
- oj_reader_read(Reader reader) {
- int err;
- size_t shift = 0;
--
-+
- if (0 == reader->read_func) {
- return -1;
- }
-@@ -165,7 +165,7 @@ rescue_cb(VALUE rbuf, VALUE err) {
- if (rb_eTypeError != clas && rb_eEOFError != clas) {
- Reader reader = (Reader)rbuf;
-
-- rb_raise(err, "at line %d, column %d\n", reader->line, reader->col);
-+ rb_raise(clas, "at line %d, column %d\n", reader->line, reader->col);
- }
- return Qfalse;
- }
-@@ -185,6 +185,7 @@ partial_io_cb(VALUE rbuf) {
- }
- str = StringValuePtr(rstr);
- cnt = RSTRING_LEN(rstr);
-+ //printf("*** partial read %lu bytes, str: '%s'\n", cnt, str);
- strcpy(reader->tail, str);
- reader->read_end = reader->tail + cnt;
-
---- a/test/test_scp.rb
-+++ b/test/test_scp.rb
-@@ -73,6 +73,7 @@ class AllHandler < Oj::ScHandler
- end # AllHandler
-
- class Closer < AllHandler
-+ attr_accessor :io
- def initialize(io)
- super()
- @io = io
-@@ -341,7 +342,13 @@ class ScpTest < Minitest::Test
- [:hash_set, 'one', true]], handler.calls)
- else
- read_io.close
-- write_io.write json
-+ write_io.write json[0..11]
-+ sleep(0.1)
-+ begin
-+ write_io.write json[12..-1]
-+ rescue Exception => e
-+ # ignore, should fail to write
-+ end
- write_io.close
- Process.exit(0)
- end
-@@ -358,8 +365,15 @@ class ScpTest < Minitest::Test
- end
- Thread.start(json) do |j|
- c = server.accept()
-- c.puts json
-- c.close
-+ c.puts json[0..11]
-+ 10.times {
-+ break if c.closed?
-+ sleep(0.1)
-+ }
-+ unless c.closed?
-+ c.puts json[12..-1]
-+ c.close
-+ end
- end
- begin
- sock = TCPSocket.new('localhost', 8080)
diff --git a/debian/patches/02_avoid_name_conflict_with_ext.patch b/debian/patches/02_avoid_name_conflict_with_ext.patch
deleted file mode 100644
index 218c1b3..0000000
--- a/debian/patches/02_avoid_name_conflict_with_ext.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Description: Avoid confusion between library and binary extension
-Author: Cédric Boutillier <boutil at debian.org>
-Forwarded: no
-Last-Update: 2014-03-01
-
---- a/lib/oj.rb
-+++ b/lib/oj.rb
-@@ -39,4 +39,4 @@
- require 'oj/saj'
- require 'oj/schandler'
-
--require 'oj/oj' # C extension
-+require 'oj.so' # C extension
diff --git a/debian/patches/series b/debian/patches/series
index cb4b9e9..e1dd96e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,2 @@
01_dont_mess_with_loadpath.patch
-02_avoid_name_conflict_with_ext.patch
03_find_test_helper.patch
-0001-Updated-for-Ruby-2.3.0.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