zstd-ruby 1.5.4.1 → 1.5.5.1

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.
@@ -10,7 +10,11 @@ static void
10
10
  streaming_decompress_mark(void *p)
11
11
  {
12
12
  struct streaming_decompress_t *sd = p;
13
+ #ifdef HAVE_RB_GC_MARK_MOVABLE
14
+ rb_gc_mark_movable(sd->buf);
15
+ #else
13
16
  rb_gc_mark(sd->buf);
17
+ #endif
14
18
  }
15
19
 
16
20
  static void
@@ -30,10 +34,26 @@ streaming_decompress_memsize(const void *p)
30
34
  return sizeof(struct streaming_decompress_t);
31
35
  }
32
36
 
37
+ #ifdef HAVE_RB_GC_MARK_MOVABLE
38
+ static size_t
39
+ streaming_decompress_compact(void *p)
40
+ {
41
+ struct streaming_decompress_t *sd = p;
42
+ sd->buf = rb_gc_location(sd->buf);
43
+ }
44
+ #endif
45
+
33
46
  static const rb_data_type_t streaming_decompress_type = {
34
- "streaming_decompress",
35
- { streaming_decompress_mark, streaming_decompress_free, streaming_decompress_memsize, },
36
- 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
47
+ "streaming_decompress",
48
+ {
49
+ streaming_decompress_mark,
50
+ streaming_decompress_free,
51
+ streaming_decompress_memsize,
52
+ #ifdef HAVE_RB_GC_MARK_MOVABLE
53
+ streaming_decompress_compact,
54
+ #endif
55
+ },
56
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
37
57
  };
38
58
 
39
59
  static VALUE
@@ -1,3 +1,3 @@
1
1
  module Zstd
2
- VERSION = "1.5.4.1"
2
+ VERSION = "1.5.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zstd-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4.1
4
+ version: 1.5.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SpringMT
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-21 00:00:00.000000000 Z
11
+ date: 2024-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,6 +87,7 @@ files:
87
87
  - bin/setup
88
88
  - ext/zstdruby/common.h
89
89
  - ext/zstdruby/extconf.rb
90
+ - ext/zstdruby/libzstd/common/allocations.h
90
91
  - ext/zstdruby/libzstd/common/bits.h
91
92
  - ext/zstdruby/libzstd/common/bitstream.h
92
93
  - ext/zstdruby/libzstd/common/compiler.h