mmdb 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/mmdb/mmdb.c +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c003d1a3bcc65bfd788940aee81b4e4e5d68bf9b
|
4
|
+
data.tar.gz: 1d0b0c279059882fae061b885b68386a8bcb910f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88c2e1f0674ec8978be22616318dc6ed024b66f22fc973ab00913c31d20ccbf0aa2953535d98fbb589df3504a2d23fc6e6259ea0089d9a940f2d0e514511a8c7
|
7
|
+
data.tar.gz: 8492961a442761eb29507316adbb6926bf5efe85ac70a505bb2e3a1feeef6f3cd2e1b760852f0dc03fcf5bc04ef30423712c6d7ee860aecb22517cd202f13dcd
|
data/ext/mmdb/mmdb.c
CHANGED
@@ -70,6 +70,15 @@ static const rb_data_type_t mmdb_data_type = {
|
|
70
70
|
RUBY_TYPED_FREE_IMMEDIATELY,
|
71
71
|
};
|
72
72
|
|
73
|
+
// Supported 2.1 later
|
74
|
+
#if RUBY_API_VERSION_CODE <= 20100
|
75
|
+
VALUE
|
76
|
+
rb_utf8_str_new(const char *ptr, long len) {
|
77
|
+
VALUE str = rb_str_new(ptr, len);
|
78
|
+
rb_enc_associate_index(str, rb_utf8_encindex());
|
79
|
+
return str;
|
80
|
+
}
|
81
|
+
#endif
|
73
82
|
#define check_maxminddb(self) ((struct MaxMindDB*)rb_check_typeddata((self), &mmdb_data_type))
|
74
83
|
#define number_of_digits(n, count) do { \
|
75
84
|
n /= 10; \
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mmdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoppi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|