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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d44feed3f25dc6342272d68eda9bedda3b3e5fa7a8ddd3eceabd439391702991
|
4
|
+
data.tar.gz: 99a711e297e7082271707217b9b8d220a7299399b4a855294d2e08af4d53b96a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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);
|
data/ext/charlock_holmes/ext.c
CHANGED
@@ -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
|
-
|
69
|
-
|
70
|
-
$CPPFLAGS <<
|
68
|
+
flags = compile_options + " -std=#{std}"
|
69
|
+
if try_compile(minimal_program, flags)
|
70
|
+
$CPPFLAGS << flags
|
71
71
|
|
72
72
|
true
|
73
73
|
end
|