zlib 3.2.1 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/zlib/zlib.c +13 -17
- metadata +3 -6
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e92920fce616b99c265e4e452c1d47e8d1719294d3581e4a671c1400b4295eba
         | 
| 4 | 
            +
              data.tar.gz: e2717c9804e532c8a955e2b9a971d8a43b0370057251730bcf8097f790c4e53a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 5bcb8b1c903694ea3757a3da20284986e3109f3a9826c52deb1528475a328d667fddb541b323c0b509719d8c1874998c7036f8af57cc35a95b870db908c646e2
         | 
| 7 | 
            +
              data.tar.gz: 3b78d38c768cb8b8c50f1cdc9dcf13255b1585d5475882060a011fe6f5829fee00f4ea956d4357d28b23034b05f02cd7cb6b4be34caa9e7b564507ebc4e9c161
         | 
    
        data/ext/zlib/zlib.c
    CHANGED
    
    | @@ -25,7 +25,7 @@ | |
| 25 25 | 
             
            # define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
         | 
| 26 26 | 
             
            #endif
         | 
| 27 27 |  | 
| 28 | 
            -
            #define RUBY_ZLIB_VERSION "3.2. | 
| 28 | 
            +
            #define RUBY_ZLIB_VERSION "3.2.2"
         | 
| 29 29 |  | 
| 30 30 | 
             
            #ifndef RB_PASS_CALLED_KEYWORDS
         | 
| 31 31 | 
             
            # define rb_class_new_instance_kw(argc, argv, klass, kw_splat) rb_class_new_instance(argc, argv, klass)
         | 
| @@ -2444,17 +2444,16 @@ struct gzfile { | |
| 2444 2444 |  | 
| 2445 2445 | 
             
            #define GZFILE_READ_SIZE  2048
         | 
| 2446 2446 |  | 
| 2447 | 
            +
            enum { read_raw_arg_len, read_raw_arg_buf, read_raw_arg__count};
         | 
| 2447 2448 | 
             
            struct read_raw_arg {
         | 
| 2448 2449 | 
             
                VALUE io;
         | 
| 2449 | 
            -
                 | 
| 2450 | 
            -
            	const VALUE argv[2]; /* for rb_funcallv */
         | 
| 2451 | 
            -
            	struct {
         | 
| 2452 | 
            -
            	    VALUE len;
         | 
| 2453 | 
            -
            	    VALUE buf;
         | 
| 2454 | 
            -
            	} in;
         | 
| 2455 | 
            -
                } as;
         | 
| 2450 | 
            +
                const VALUE argv[read_raw_arg__count]; /* for rb_funcallv */
         | 
| 2456 2451 | 
             
            };
         | 
| 2457 2452 |  | 
| 2453 | 
            +
            #define read_raw_arg_argc(ra) \
         | 
| 2454 | 
            +
                ((int)read_raw_arg__count - NIL_P((ra)->argv[read_raw_arg__count - 1]))
         | 
| 2455 | 
            +
            #define read_raw_arg_init(io, len, buf) { io, { len, buf } }
         | 
| 2456 | 
            +
             | 
| 2458 2457 | 
             
            static void
         | 
| 2459 2458 | 
             
            gzfile_mark(void *p)
         | 
| 2460 2459 | 
             
            {
         | 
| @@ -2580,9 +2579,9 @@ gzfile_read_raw_partial(VALUE arg) | |
| 2580 2579 | 
             
            {
         | 
| 2581 2580 | 
             
                struct read_raw_arg *ra = (struct read_raw_arg *)arg;
         | 
| 2582 2581 | 
             
                VALUE str;
         | 
| 2583 | 
            -
                int argc =  | 
| 2582 | 
            +
                int argc = read_raw_arg_argc(ra);
         | 
| 2584 2583 |  | 
| 2585 | 
            -
                str = rb_funcallv(ra->io, id_readpartial, argc, ra-> | 
| 2584 | 
            +
                str = rb_funcallv(ra->io, id_readpartial, argc, ra->argv);
         | 
| 2586 2585 | 
             
                Check_Type(str, T_STRING);
         | 
| 2587 2586 | 
             
                return str;
         | 
| 2588 2587 | 
             
            }
         | 
| @@ -2593,8 +2592,8 @@ gzfile_read_raw_rescue(VALUE arg, VALUE _) | |
| 2593 2592 | 
             
                struct read_raw_arg *ra = (struct read_raw_arg *)arg;
         | 
| 2594 2593 | 
             
                VALUE str = Qnil;
         | 
| 2595 2594 | 
             
                if (rb_obj_is_kind_of(rb_errinfo(), rb_eNoMethodError)) {
         | 
| 2596 | 
            -
            	int argc =  | 
| 2597 | 
            -
            	str = rb_funcallv(ra->io, id_read, argc, ra-> | 
| 2595 | 
            +
            	int argc = read_raw_arg_argc(ra);
         | 
| 2596 | 
            +
            	str = rb_funcallv(ra->io, id_read, argc, ra->argv);
         | 
| 2598 2597 | 
             
                    if (!NIL_P(str)) {
         | 
| 2599 2598 | 
             
                        Check_Type(str, T_STRING);
         | 
| 2600 2599 | 
             
                    }
         | 
| @@ -2605,11 +2604,8 @@ gzfile_read_raw_rescue(VALUE arg, VALUE _) | |
| 2605 2604 | 
             
            static VALUE
         | 
| 2606 2605 | 
             
            gzfile_read_raw(struct gzfile *gz, VALUE outbuf)
         | 
| 2607 2606 | 
             
            {
         | 
| 2608 | 
            -
                struct read_raw_arg ra | 
| 2609 | 
            -
             | 
| 2610 | 
            -
                ra.io = gz->io;
         | 
| 2611 | 
            -
                ra.as.in.len = INT2FIX(GZFILE_READ_SIZE);
         | 
| 2612 | 
            -
                ra.as.in.buf = outbuf;
         | 
| 2607 | 
            +
                struct read_raw_arg ra =
         | 
| 2608 | 
            +
            	read_raw_arg_init(gz->io, INT2FIX(GZFILE_READ_SIZE), outbuf);
         | 
| 2613 2609 |  | 
| 2614 2610 | 
             
                return rb_rescue2(gzfile_read_raw_partial, (VALUE)&ra,
         | 
| 2615 2611 | 
             
                                  gzfile_read_raw_rescue, (VALUE)&ra,
         | 
    
        metadata
    CHANGED
    
    | @@ -1,15 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: zlib
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 3.2. | 
| 4 | 
            +
              version: 3.2.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Yukihiro Matsumoto
         | 
| 8 8 | 
             
            - UENO Katsuhiro
         | 
| 9 | 
            -
            autorequire:
         | 
| 10 9 | 
             
            bindir: exe
         | 
| 11 10 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date:  | 
| 11 | 
            +
            date: 1980-01-02 00:00:00.000000000 Z
         | 
| 13 12 | 
             
            dependencies: []
         | 
| 14 13 | 
             
            description: Ruby interface for the zlib compression/decompression library
         | 
| 15 14 | 
             
            email:
         | 
| @@ -31,7 +30,6 @@ licenses: | |
| 31 30 | 
             
            - Ruby
         | 
| 32 31 | 
             
            - BSD-2-Clause
         | 
| 33 32 | 
             
            metadata: {}
         | 
| 34 | 
            -
            post_install_message:
         | 
| 35 33 | 
             
            rdoc_options: []
         | 
| 36 34 | 
             
            require_paths:
         | 
| 37 35 | 
             
            - lib
         | 
| @@ -46,8 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 46 44 | 
             
                - !ruby/object:Gem::Version
         | 
| 47 45 | 
             
                  version: '0'
         | 
| 48 46 | 
             
            requirements: []
         | 
| 49 | 
            -
            rubygems_version: 3. | 
| 50 | 
            -
            signing_key:
         | 
| 47 | 
            +
            rubygems_version: 3.6.9
         | 
| 51 48 | 
             
            specification_version: 4
         | 
| 52 49 | 
             
            summary: Ruby interface for the zlib compression/decompression library
         | 
| 53 50 | 
             
            test_files: []
         |