unf_ext 0.0.8.2-x86-mingw32 → 0.0.9-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8259b68bc2f4cf43b2267fe5e8d8d20c06b929e102973b985d2ec64de2567b29
4
- data.tar.gz: 5f341af8118fc39da62615b0471d25baa931d060ca442afc06f58512eac919a1
3
+ metadata.gz: 0b8c714f79595d30e51cfd4a5aa3b7aa35fbcdbc65e12cdcd2583c2e60ba7b45
4
+ data.tar.gz: ac5bcb45c22d3d95451cfef2ae5d3f79593fd28092a823125f0dbb2b53549a1c
5
5
  SHA512:
6
- metadata.gz: 4cbadbe118c366bc13a4b3375fc4d3c74e1fc5a9fb020a5f18a6afbe8f262614996c99c589bb132edf83df33579dfd07a2ac90ac98d5a483fdbb9a42fe41e8aa
7
- data.tar.gz: e363d3b0dd653f2da55347598a8be297e9d03485ef60454d6a17209f55177af50024311e0ea3135666a8d1430d5fb9312fd228baa7f5962510d53beca2c3e518
6
+ metadata.gz: a1060824ec201a7f8fbeb7bd0c69992fe32afe40365937f4e04625768f7395fc47838cb8d2e3dafbfda9341f13fa5859375f7314343da53a5698d7d5ed59ae33
7
+ data.tar.gz: 9fa37db63a24970bbd0c68b5bd7e9edb5c41abbdf35147bc0dc1d777d6a76074e30a34b0f19c5300a110d92aeca6c510fce99e3db7d40f2c142dc5a312256d6a
@@ -11,28 +11,22 @@ jobs:
11
11
  strategy:
12
12
  fail-fast: false
13
13
  matrix:
14
- os: [ ubuntu-20.04, macos-11.0, windows-2019 ]
15
- ruby: [ 2.7, "3.0", 3.1, head ]
14
+ os: [ ubuntu-22.04, macos-12, windows-2022 ]
15
+ ruby: [ 2.7, "3.0", 3.1, 3.2, head ]
16
16
  include:
17
- - { os: windows-2019, ruby: mingw }
17
+ - { os: windows-2022, ruby: ucrt }
18
+ - { os: windows-2022, ruby: mswin }
18
19
  exclude:
19
- - { os: windows-2019, ruby: head }
20
+ - { os: windows-2022, ruby: head }
20
21
 
21
22
  steps:
22
23
  - name: repo checkout
23
- uses: actions/checkout@v2
24
+ uses: actions/checkout@v4
24
25
 
25
- - name: load ruby cross-compilation toolkit
26
- uses: MSP-Greg/setup-ruby-pkgs@v1
26
+ - uses: ruby/setup-ruby@v1
27
27
  with:
28
28
  ruby-version: ${{ matrix.ruby }}
29
- mingw: _upgrade_
30
-
31
- - name: bundle install
32
- shell: pwsh
33
- run: |
34
- bundle config set --local path .bundle/vendor
35
- bundle install --jobs 4 --retry 3
29
+ bundler-cache: true
36
30
 
37
31
  - name: compile
38
32
  timeout-minutes: 5
data/.gitignore CHANGED
@@ -1,7 +1,7 @@
1
1
  *.gem
2
2
  *.rbc
3
3
  *.so
4
- .bundle
4
+ *.bundle
5
5
  .config
6
6
  .yardoc
7
7
  Gemfile.lock
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # Changelog
2
+
3
+ ## [0.0.9](https://github.com/knu/ruby-unf_ext/tree/v0.0.9) (2023-11-11)
4
+
5
+ [Full Changelog](https://github.com/knu/ruby-unf_ext/compare/v0.0.8.2...v0.0.9)
6
+
7
+ - Use the newer TypedData extension API [\#72](https://github.com/knu/ruby-unf_ext/pull/72) ([casperisfine](https://github.com/casperisfine))
8
+ - Update Actions - updates OS's, add Ruby 3,2, etc [\#71](https://github.com/knu/ruby-unf_ext/pull/71) ([MSP-Greg](https://github.com/MSP-Greg))
9
+ - Add cross compilation for Ruby 3.2 [\#69](https://github.com/knu/ruby-unf_ext/pull/69) ([johnnyshields](https://github.com/johnnyshields))
10
+
1
11
  ## 0.0.8.2 (2022-05-26)
2
12
 
3
13
  - Add x64-mingw-ucrt native gem support for RubyInstaller 3.1.
@@ -6,6 +6,11 @@ else
6
6
  have_library('stdc++')
7
7
 
8
8
  case RbConfig::CONFIG['host_os']
9
+ when /mswin/
10
+ # Avoid `error C7555: use of designated initializers requires at least '/std:c++20'`
11
+ $CFLAGS << ' ' << '-std:c++20'
12
+ $CPPFLAGS << ' ' << '-std:c++20'
13
+ $CXXFLAGS << ' ' << '-std:c++20'
9
14
  when /solaris(!?2.11)/
10
15
  # Do a little trickery here to enable C++ standard on Solaris 11 if found.
11
16
  # This also forces 64bit compilation mode.
data/ext/unf_ext/unf.cc CHANGED
@@ -8,7 +8,7 @@
8
8
  extern "C" {
9
9
  VALUE unf_allocate(VALUE klass);
10
10
  VALUE unf_initialize(VALUE self);
11
- void unf_delete(UNF::Normalizer* ptr);
11
+ void unf_delete(void* ptr);
12
12
  VALUE unf_normalize(VALUE self, VALUE source, VALUE normalization_form);
13
13
 
14
14
  ID FORM_NFD;
@@ -30,10 +30,17 @@ extern "C" {
30
30
  FORM_NFKC= rb_intern("nfkc");
31
31
  }
32
32
 
33
+ static const rb_data_type_t unf_normalizer_data_type = {
34
+ .wrap_struct_name = "UNF::Normalizer",
35
+ .function = {
36
+ .dfree = unf_delete
37
+ },
38
+ .flags = RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
39
+ };
33
40
 
34
41
  VALUE unf_allocate(VALUE klass) {
35
42
  UNF::Normalizer* ptr;
36
- VALUE obj = Data_Make_Struct(klass, UNF::Normalizer, NULL, unf_delete, ptr);
43
+ VALUE obj = TypedData_Make_Struct(klass, UNF::Normalizer, &unf_normalizer_data_type, ptr);
37
44
  new ((void*)ptr) UNF::Normalizer;
38
45
  return obj;
39
46
  }
@@ -42,14 +49,15 @@ extern "C" {
42
49
  return self;
43
50
  }
44
51
 
45
- void unf_delete(UNF::Normalizer* ptr) {
52
+ void unf_delete(void *data) {
53
+ UNF::Normalizer* ptr = (UNF::Normalizer*)data;
46
54
  ptr->~Normalizer();
47
55
  ruby_xfree(ptr);
48
56
  }
49
57
 
50
58
  VALUE unf_normalize(VALUE self, VALUE source, VALUE normalization_form) {
51
59
  UNF::Normalizer* ptr;
52
- Data_Get_Struct(self, UNF::Normalizer, ptr);
60
+ TypedData_Get_Struct(self, UNF::Normalizer, &unf_normalizer_data_type, ptr);
53
61
 
54
62
  const char* src = StringValueCStr(source);
55
63
  const char* rlt;
data/lib/2.4/unf_ext.so CHANGED
Binary file
data/lib/2.5/unf_ext.so CHANGED
Binary file
data/lib/2.6/unf_ext.so CHANGED
Binary file
data/lib/2.7/unf_ext.so CHANGED
Binary file
data/lib/3.0/unf_ext.so CHANGED
Binary file
data/lib/3.1/unf_ext.so CHANGED
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  module UNF
2
2
  class Normalizer
3
- VERSION = "0.0.8.2"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
data/unf_ext.gemspec CHANGED
@@ -29,6 +29,6 @@ Gem::Specification.new do |gem|
29
29
  gem.add_development_dependency("test-unit")
30
30
  gem.add_development_dependency("rdoc", ["> 2.4.2"])
31
31
  gem.add_development_dependency("bundler", [">= 1.2"])
32
- gem.add_development_dependency("rake-compiler", [">= 1.1.1"])
33
- gem.add_development_dependency("rake-compiler-dock", [">= 1.2.1"])
32
+ gem.add_development_dependency("rake-compiler", [">= 1.2.1"])
33
+ gem.add_development_dependency("rake-compiler-dock", [">= 1.3.0"])
34
34
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unf_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8.2
4
+ version: 0.0.9
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Takeru Ohta
8
8
  - Akinori MUSHA
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-06-25 00:00:00.000000000 Z
12
+ date: 2023-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -73,28 +73,28 @@ dependencies:
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 1.1.1
76
+ version: 1.2.1
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 1.1.1
83
+ version: 1.2.1
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rake-compiler-dock
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - ">="
89
89
  - !ruby/object:Gem::Version
90
- version: 1.2.1
90
+ version: 1.3.0
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - ">="
96
96
  - !ruby/object:Gem::Version
97
- version: 1.2.1
97
+ version: 1.3.0
98
98
  description: Unicode Normalization Form support library for CRuby
99
99
  email:
100
100
  - knu@idaemons.org
@@ -126,6 +126,7 @@ files:
126
126
  - lib/2.7/unf_ext.so
127
127
  - lib/3.0/unf_ext.so
128
128
  - lib/3.1/unf_ext.so
129
+ - lib/3.2/unf_ext.so
129
130
  - lib/unf_ext.rb
130
131
  - lib/unf_ext/version.rb
131
132
  - test/helper.rb
@@ -136,7 +137,7 @@ homepage: https://github.com/knu/ruby-unf_ext
136
137
  licenses:
137
138
  - MIT
138
139
  metadata: {}
139
- post_install_message:
140
+ post_install_message:
140
141
  rdoc_options: []
141
142
  require_paths:
142
143
  - lib
@@ -147,15 +148,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
148
  version: '2.4'
148
149
  - - "<"
149
150
  - !ruby/object:Gem::Version
150
- version: 3.2.dev
151
+ version: 3.3.dev
151
152
  required_rubygems_version: !ruby/object:Gem::Requirement
152
153
  requirements:
153
154
  - - ">="
154
155
  - !ruby/object:Gem::Version
155
156
  version: '0'
156
157
  requirements: []
157
- rubygems_version: 3.3.4
158
- signing_key:
158
+ rubygems_version: 3.3.26
159
+ signing_key:
159
160
  specification_version: 4
160
161
  summary: Unicode Normalization Form support library for CRuby
161
162
  test_files: