Hello community, here is the log from the commit of package rubygem-json for openSUSE:Factory checked in at 2015-06-12 20:30:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-json (Old) and /work/SRC/openSUSE:Factory/.rubygem-json.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-json" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-json/rubygem-json.changes 2015-02-05 11:01:12.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-json.new/rubygem-json.changes 2015-06-12 20:30:47.000000000 +0200 @@ -1,0 +2,9 @@ +Wed Jun 3 04:32:30 UTC 2015 - co...@suse.com + +- updated to version 1.8.3 + see installed CHANGES + + 2015-06-01 (1.8.3) + * Fix potential memory leak, thx to nobu. + +------------------------------------------------------------------- Old: ---- json-1.8.2.gem New: ---- json-1.8.3.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-json.spec ++++++ --- /var/tmp/diff_new_pack.RgxsrE/_old 2015-06-12 20:30:48.000000000 +0200 +++ /var/tmp/diff_new_pack.RgxsrE/_new 2015-06-12 20:30:48.000000000 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-json -Version: 1.8.2 +Version: 1.8.3 Release: 0 %define mod_name json %define mod_full_name %{mod_name}-%{version} ++++++ json-1.8.2.gem -> json-1.8.3.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2015-01-09 01:55:42.000000000 +0100 +++ new/.travis.yml 2015-06-01 18:00:27.000000000 +0200 @@ -9,6 +9,8 @@ - 1.9.3 - 2.0.0 - 2.1 + - 2.2.1 + - 2.2.2 - 2.2 - ree - rbx-2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGES new/CHANGES --- old/CHANGES 2015-01-09 01:55:42.000000000 +0100 +++ new/CHANGES 2015-06-01 18:00:27.000000000 +0200 @@ -1,3 +1,5 @@ +2015-06-01 (1.8.3) + * Fix potential memory leak, thx to nobu. 2015-01-08 (1.8.2) * Some performance improvements by Vipul A M <vipulnsw...@gmail.com>. * Fix by Jason R. Clark <jcl...@newrelic.com> to avoid mutation of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.rdoc new/README.rdoc --- old/README.rdoc 2015-01-09 01:55:42.000000000 +0100 +++ new/README.rdoc 2015-06-01 18:00:28.000000000 +0200 @@ -8,9 +8,9 @@ * A pure ruby variant, that relies on the iconv and the stringscan extensions, which are both part of the ruby standard library. -* The quite a bit faster C extension variant, which is in parts implemented - in C and comes with its own unicode conversion functions and a parser - generated by the ragel state machine compiler +* The quite a bit faster native extension variant, which is in parts + implemented in C or Java and comes with its own unicode conversion + functions and a parser generated by the ragel state machine compiler http://www.cs.queensu.ca/~thurston/ragel . Both variants of the JSON generator generate UTF-8 character sequences by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION new/VERSION --- old/VERSION 2015-01-09 01:55:42.000000000 +0100 +++ new/VERSION 2015-06-01 18:00:28.000000000 +0200 @@ -1 +1 @@ -1.8.2 +1.8.3 Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/json/ext/generator/generator.c new/ext/json/ext/generator/generator.c --- old/ext/json/ext/generator/generator.c 2015-01-09 01:55:42.000000000 +0100 +++ new/ext/json/ext/generator/generator.c 2015-06-01 18:00:28.000000000 +0200 @@ -526,17 +526,11 @@ }; #endif -static JSON_Generator_State *State_allocate(void) -{ - JSON_Generator_State *state = ALLOC(JSON_Generator_State); - MEMZERO(state, JSON_Generator_State, 1); - return state; -} - static VALUE cState_s_allocate(VALUE klass) { - JSON_Generator_State *state = State_allocate(); - return TypedData_Wrap_Struct(klass, &JSON_Generator_State_type, state); + JSON_Generator_State *state; + return TypedData_Make_Struct(klass, JSON_Generator_State, + &JSON_Generator_State_type, state); } /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/json/ext/generator/generator.h new/ext/json/ext/generator/generator.h --- old/ext/json/ext/generator/generator.h 2015-01-09 01:55:42.000000000 +0100 +++ new/ext/json/ext/generator/generator.h 2015-06-01 18:00:28.000000000 +0200 @@ -112,7 +112,6 @@ static VALUE mNilClass_to_json(int argc, VALUE *argv, VALUE self); static VALUE mObject_to_json(int argc, VALUE *argv, VALUE self); static void State_free(void *state); -static JSON_Generator_State *State_allocate(void); static VALUE cState_s_allocate(VALUE klass); static VALUE cState_configure(VALUE self, VALUE opts); static VALUE cState_to_h(VALUE self); @@ -147,11 +146,20 @@ static VALUE cState_depth(VALUE self); static VALUE cState_depth_set(VALUE self, VALUE depth); static FBuffer *cState_prepare_buffer(VALUE self); -#ifdef TypedData_Wrap_Struct +#ifndef ZALLOC +#define ZALLOC(type) ((type *)ruby_zalloc(sizeof(type))) +static inline void *ruby_zalloc(size_t n) +{ + void *p = ruby_xmalloc(n); + memset(p, 0, n); + return p; +} +#endif +#ifdef TypedData_Make_Struct static const rb_data_type_t JSON_Generator_State_type; #define NEW_TYPEDDATA_WRAPPER 1 #else -#define TypedData_Wrap_Struct(klass, ignore, json) Data_Wrap_Struct(klass, NULL, State_free, json) +#define TypedData_Make_Struct(klass, type, ignore, json) Data_Make_Struct(klass, type, NULL, State_free, json) #define TypedData_Get_Struct(self, JSON_Generator_State, ignore, json) Data_Get_Struct(self, JSON_Generator_State, json) #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/json/ext/parser/parser.c new/ext/json/ext/parser/parser.c --- old/ext/json/ext/parser/parser.c 2015-01-09 01:55:42.000000000 +0100 +++ new/ext/json/ext/parser/parser.c 2015-06-01 18:00:28.000000000 +0200 @@ -28,16 +28,16 @@ UTF32 result = 0; b = digit_values[p[0]]; if (b < 0) return UNI_REPLACEMENT_CHAR; - result = (result << 4) | b; + result = (result << 4) | (unsigned char)b; b = digit_values[p[1]]; - result = (result << 4) | b; if (b < 0) return UNI_REPLACEMENT_CHAR; + result = (result << 4) | (unsigned char)b; b = digit_values[p[2]]; - result = (result << 4) | b; if (b < 0) return UNI_REPLACEMENT_CHAR; + result = (result << 4) | (unsigned char)b; b = digit_values[p[3]]; - result = (result << 4) | b; if (b < 0) return UNI_REPLACEMENT_CHAR; + result = (result << 4) | (unsigned char)b; return result; } @@ -89,11 +89,11 @@ #line 92 "parser.c" -static const int JSON_object_start = 1; -static const int JSON_object_first_final = 27; -static const int JSON_object_error = 0; +enum {JSON_object_start = 1}; +enum {JSON_object_first_final = 27}; +enum {JSON_object_error = 0}; -static const int JSON_object_en_main = 1; +enum {JSON_object_en_main = 1}; #line 151 "parser.rl" @@ -467,11 +467,11 @@ #line 470 "parser.c" -static const int JSON_value_start = 1; -static const int JSON_value_first_final = 21; -static const int JSON_value_error = 0; +enum {JSON_value_start = 1}; +enum {JSON_value_first_final = 21}; +enum {JSON_value_error = 0}; -static const int JSON_value_en_main = 1; +enum {JSON_value_en_main = 1}; #line 271 "parser.rl" @@ -776,11 +776,11 @@ #line 779 "parser.c" -static const int JSON_integer_start = 1; -static const int JSON_integer_first_final = 3; -static const int JSON_integer_error = 0; +enum {JSON_integer_start = 1}; +enum {JSON_integer_first_final = 3}; +enum {JSON_integer_error = 0}; -static const int JSON_integer_en_main = 1; +enum {JSON_integer_en_main = 1}; #line 295 "parser.rl" @@ -875,11 +875,11 @@ #line 878 "parser.c" -static const int JSON_float_start = 1; -static const int JSON_float_first_final = 8; -static const int JSON_float_error = 0; +enum {JSON_float_start = 1}; +enum {JSON_float_first_final = 8}; +enum {JSON_float_error = 0}; -static const int JSON_float_en_main = 1; +enum {JSON_float_en_main = 1}; #line 329 "parser.rl" @@ -1041,11 +1041,11 @@ #line 1044 "parser.c" -static const int JSON_array_start = 1; -static const int JSON_array_first_final = 17; -static const int JSON_array_error = 0; +enum {JSON_array_start = 1}; +enum {JSON_array_first_final = 17}; +enum {JSON_array_error = 0}; -static const int JSON_array_en_main = 1; +enum {JSON_array_en_main = 1}; #line 381 "parser.rl" @@ -1373,11 +1373,11 @@ #line 1376 "parser.c" -static const int JSON_string_start = 1; -static const int JSON_string_first_final = 8; -static const int JSON_string_error = 0; +enum {JSON_string_start = 1}; +enum {JSON_string_first_final = 8}; +enum {JSON_string_error = 0}; -static const int JSON_string_en_main = 1; +enum {JSON_string_en_main = 1}; #line 494 "parser.rl" @@ -1730,11 +1730,11 @@ #line 1733 "parser.c" -static const int JSON_start = 1; -static const int JSON_first_final = 10; -static const int JSON_error = 0; +enum {JSON_start = 1}; +enum {JSON_first_final = 10}; +enum {JSON_error = 0}; -static const int JSON_en_main = 1; +enum {JSON_en_main = 1}; #line 740 "parser.rl" @@ -1904,11 +1904,11 @@ #line 1907 "parser.c" -static const int JSON_quirks_mode_start = 1; -static const int JSON_quirks_mode_first_final = 10; -static const int JSON_quirks_mode_error = 0; +enum {JSON_quirks_mode_start = 1}; +enum {JSON_quirks_mode_first_final = 10}; +enum {JSON_quirks_mode_error = 0}; -static const int JSON_quirks_mode_en_main = 1; +enum {JSON_quirks_mode_en_main = 1}; #line 778 "parser.rl" @@ -2091,15 +2091,6 @@ } } - -static JSON_Parser *JSON_allocate(void) -{ - JSON_Parser *json = ALLOC(JSON_Parser); - MEMZERO(json, JSON_Parser, 1); - json->fbuffer = fbuffer_alloc(0); - return json; -} - static void JSON_mark(void *ptr) { JSON_Parser *json = ptr; @@ -2136,8 +2127,10 @@ static VALUE cJSON_parser_s_allocate(VALUE klass) { - JSON_Parser *json = JSON_allocate(); - return TypedData_Wrap_Struct(klass, &JSON_Parser_type, json); + JSON_Parser *json; + VALUE obj = TypedData_Make_Struct(klass, JSON_Parser, &JSON_Parser_type, json); + json->fbuffer = fbuffer_alloc(0); + return obj; } /* @@ -2164,7 +2157,7 @@ } -void Init_parser() +void Init_parser(void) { rb_require("json/common"); mJSON = rb_define_module("JSON"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/json/ext/parser/parser.h new/ext/json/ext/parser/parser.h --- old/ext/json/ext/parser/parser.h 2015-01-09 01:55:42.000000000 +0100 +++ new/ext/json/ext/parser/parser.h 2015-06-01 18:00:28.000000000 +0200 @@ -68,16 +68,24 @@ static VALUE convert_encoding(VALUE source); static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self); static VALUE cParser_parse(VALUE self); -static JSON_Parser *JSON_allocate(void); static void JSON_mark(void *json); static void JSON_free(void *json); static VALUE cJSON_parser_s_allocate(VALUE klass); static VALUE cParser_source(VALUE self); -#ifdef TypedData_Wrap_Struct +#ifndef ZALLOC +#define ZALLOC(type) ((type *)ruby_zalloc(sizeof(type))) +static inline void *ruby_zalloc(size_t n) +{ + void *p = ruby_xmalloc(n); + memset(p, 0, n); + return p; +} +#endif +#ifdef TypedData_Make_Struct static const rb_data_type_t JSON_Parser_type; #define NEW_TYPEDDATA_WRAPPER 1 #else -#define TypedData_Wrap_Struct(klass, ignore, json) Data_Wrap_Struct(klass, JSON_mark, JSON_free, json) +#define TypedData_Make_Struct(klass, type, ignore, json) Data_Make_Struct(klass, type, NULL, JSON_free, json) #define TypedData_Get_Struct(self, JSON_Parser, ignore, json) Data_Get_Struct(self, JSON_Parser, json) #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/json/ext/parser/parser.rl new/ext/json/ext/parser/parser.rl --- old/ext/json/ext/parser/parser.rl 2015-01-09 01:55:42.000000000 +0100 +++ new/ext/json/ext/parser/parser.rl 2015-06-01 18:00:28.000000000 +0200 @@ -26,16 +26,16 @@ UTF32 result = 0; b = digit_values[p[0]]; if (b < 0) return UNI_REPLACEMENT_CHAR; - result = (result << 4) | b; + result = (result << 4) | (unsigned char)b; b = digit_values[p[1]]; - result = (result << 4) | b; if (b < 0) return UNI_REPLACEMENT_CHAR; + result = (result << 4) | (unsigned char)b; b = digit_values[p[2]]; - result = (result << 4) | b; if (b < 0) return UNI_REPLACEMENT_CHAR; + result = (result << 4) | (unsigned char)b; b = digit_values[p[3]]; - result = (result << 4) | b; if (b < 0) return UNI_REPLACEMENT_CHAR; + result = (result << 4) | (unsigned char)b; return result; } @@ -814,15 +814,6 @@ } } - -static JSON_Parser *JSON_allocate(void) -{ - JSON_Parser *json = ALLOC(JSON_Parser); - MEMZERO(json, JSON_Parser, 1); - json->fbuffer = fbuffer_alloc(0); - return json; -} - static void JSON_mark(void *ptr) { JSON_Parser *json = ptr; @@ -859,8 +850,10 @@ static VALUE cJSON_parser_s_allocate(VALUE klass) { - JSON_Parser *json = JSON_allocate(); - return TypedData_Wrap_Struct(klass, &JSON_Parser_type, json); + JSON_Parser *json; + VALUE obj = TypedData_Make_Struct(klass, JSON_Parser, &JSON_Parser_type, json); + json->fbuffer = fbuffer_alloc(0); + return obj; } /* @@ -887,7 +880,7 @@ } -void Init_parser() +void Init_parser(void) { rb_require("json/common"); mJSON = rb_define_module("JSON"); Files old/json.gemspec and new/json.gemspec differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/json_pure.gemspec new/json_pure.gemspec --- old/json_pure.gemspec 2015-01-09 01:55:42.000000000 +0100 +++ new/json_pure.gemspec 2015-06-01 18:00:28.000000000 +0200 @@ -1,14 +1,14 @@ # -*- encoding: utf-8 -*- -# stub: json_pure 1.8.2 ruby lib +# stub: json_pure 1.8.3 ruby lib Gem::Specification.new do |s| s.name = "json_pure" - s.version = "1.8.2" + s.version = "1.8.3" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Florian Frank"] - s.date = "2015-01-09" + s.date = "2015-06-01" s.description = "This is a JSON implementation in pure Ruby." s.email = "fl...@ping.de" s.extra_rdoc_files = ["README.rdoc"] @@ -16,7 +16,7 @@ s.homepage = "http://flori.github.com/json" s.licenses = ["Ruby"] s.rdoc_options = ["--title", "JSON implemention for ruby", "--main", "README.rdoc"] - s.rubygems_version = "2.4.5" + s.rubygems_version = "2.4.6" s.summary = "JSON Implementation for Ruby" s.test_files = ["./tests/test_json.rb", "./tests/test_json_addition.rb", "./tests/test_json_encoding.rb", "./tests/test_json_fixtures.rb", "./tests/test_json_generate.rb", "./tests/test_json_generic_object.rb", "./tests/test_json_string_matching.rb", "./tests/test_json_unicode.rb"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/json/version.rb new/lib/json/version.rb --- old/lib/json/version.rb 2015-01-09 01:55:42.000000000 +0100 +++ new/lib/json/version.rb 2015-06-01 18:00:28.000000000 +0200 @@ -1,6 +1,6 @@ module JSON # JSON version - VERSION = '1.8.2' + VERSION = '1.8.3' VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc: VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc: VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-01-09 01:55:42.000000000 +0100 +++ new/metadata 2015-06-01 18:00:27.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: json version: !ruby/object:Gem::Version - version: 1.8.2 + version: 1.8.3 platform: ruby authors: - Florian Frank autorequire: bindir: bin cert_chain: [] -date: 2015-01-09 00:00:00.000000000 Z +date: 2015-06-01 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: permutation @@ -188,7 +188,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.4.5 +rubygems_version: 2.4.6 signing_key: specification_version: 4 summary: JSON Implementation for Ruby