static_holmes 0.7.10 → 0.7.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4803d1e6d567e2543704fa2ce8b6f6875673c219ca66b5516944e62e800dc3ee
4
- data.tar.gz: 642edc241c50450f4ca662e6da35898d02a3ca77997eb8f5ce6a1c7f36a7bb84
3
+ metadata.gz: d44feed3f25dc6342272d68eda9bedda3b3e5fa7a8ddd3eceabd439391702991
4
+ data.tar.gz: 99a711e297e7082271707217b9b8d220a7299399b4a855294d2e08af4d53b96a
5
5
  SHA512:
6
- metadata.gz: cfb381f812968124e1c8221c99087b1f0bfef4fb73e9517dce95ed599a1e8132b72b51265d97ae701a4f0583cb497fd6899c336fd2ea8b9bc1b22d2354a54052
7
- data.tar.gz: effc2e698dfd70a5eef40e8265a098ed52847d18fcfde7261b8a37c3b4a2ab277e23003c1916162cc2440de03368b2f398ed957ccc1832d1b5c475cb49a9cf2e
6
+ metadata.gz: c943b95a7cab86ddc69d02231eb1273ade055263b3e7e8a20fc2d0671f1ea6d44dbbcf58697b9c5e7ec8e498643c5b067b8dc60d1a3cfb2388d12ab92a15cf99
7
+ data.tar.gz: 0be53f5049292086423382ac269586e5b381ec5f6bf27b13b52ca8a36129a2a7f398ceba77c7d42b4f52272faee15ab03ee1adf67b266fb000a3b3acc6f6b84b
@@ -38,4 +38,19 @@ static inline VALUE charlock_new_str2(const char *str)
38
38
  #endif
39
39
  }
40
40
 
41
+
42
+ #ifdef __cplusplus
43
+ extern "C"
44
+ {
45
+ #endif
46
+
47
+ extern void Init_charlock_holmes();
48
+ extern void _init_charlock_encoding_detector();
49
+ extern void _init_charlock_converter();
50
+ extern void _init_charlock_transliterator();
51
+
52
+ #ifdef __cplusplus
53
+ }
54
+ #endif
55
+
41
56
  #endif
@@ -29,7 +29,7 @@ static VALUE rb_converter_convert(VALUE self, VALUE rb_txt, VALUE rb_src_enc, VA
29
29
  if (status != U_BUFFER_OVERFLOW_ERROR) {
30
30
  rb_raise(rb_eArgError, "%s", u_errorName(status));
31
31
  }
32
- out_buf = malloc(out_len);
32
+ out_buf = (char *) malloc(out_len);
33
33
 
34
34
  // now do the actual conversion
35
35
  status = U_ZERO_ERROR;
@@ -352,7 +352,7 @@ static VALUE rb_encdec__alloc(VALUE klass)
352
352
  UErrorCode status = U_ZERO_ERROR;
353
353
  VALUE obj;
354
354
 
355
- detector = calloc(1, sizeof(charlock_detector_t));
355
+ detector = (charlock_detector_t *) calloc(1, sizeof(charlock_detector_t));
356
356
  obj = Data_Wrap_Struct(klass, NULL, rb_encdec__free, (void *)detector);
357
357
 
358
358
  detector->csd = ucsdet_open(&status);
@@ -1,9 +1,5 @@
1
1
  #include "common.h"
2
2
 
3
- extern void _init_charlock_encoding_detector();
4
- extern void _init_charlock_converter();
5
- extern void _init_charlock_transliterator();
6
-
7
3
  VALUE rb_mCharlockHolmes;
8
4
 
9
5
  void Init_charlock_holmes() {
@@ -12,4 +8,4 @@ void Init_charlock_holmes() {
12
8
  _init_charlock_encoding_detector();
13
9
  _init_charlock_converter();
14
10
  _init_charlock_transliterator();
15
- }
11
+ }
@@ -65,9 +65,9 @@ end
65
65
  if icu_requires_version_flag
66
66
  abort "Cannot compile icu with your compiler: recent versions require C++17 support." unless %w[c++20 c++17 c++11 c++0x].any? do |std|
67
67
  checking_for("icu that compiles with #{std} standard") do
68
- if try_compile(minimal_program, compile_options + " -std=#{std}")
69
- compile_options << " -std=#{std}"
70
- $CPPFLAGS << " -std=#{std}"
68
+ flags = compile_options + " -std=#{std}"
69
+ if try_compile(minimal_program, flags)
70
+ $CPPFLAGS << flags
71
71
 
72
72
  true
73
73
  end
@@ -1,3 +1,3 @@
1
1
  module CharlockHolmes
2
- VERSION = "0.7.10"
2
+ VERSION = "0.7.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: static_holmes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.7.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Lopez