mmdb 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/ext/mmdb/mmdb.c +9 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 014e86e972f3e39a9c37f4935251398f4cb48743
4
- data.tar.gz: c5f0c1242458448fb1beb3944f8d639e75dc2028
3
+ metadata.gz: c003d1a3bcc65bfd788940aee81b4e4e5d68bf9b
4
+ data.tar.gz: 1d0b0c279059882fae061b885b68386a8bcb910f
5
5
  SHA512:
6
- metadata.gz: ab00c0859f05ba290efccc93eadbb7d3943002e84cad9152be24084e782d80739861978fe9f1adf219d24fdd81ed0ca3a15a714f26b65b9dd926ff8f91d9bdd7
7
- data.tar.gz: 8f9c5dacaf7d463c34df1b4a37fdebef7f8dc956a5b6cd0e94944fd2a1b17727a99b8e2aed93c828a5d7988ee492204fda56814a564bc3d7537f6511a64daa76
6
+ metadata.gz: 88c2e1f0674ec8978be22616318dc6ed024b66f22fc973ab00913c31d20ccbf0aa2953535d98fbb589df3504a2d23fc6e6259ea0089d9a940f2d0e514511a8c7
7
+ data.tar.gz: 8492961a442761eb29507316adbb6926bf5efe85ac70a505bb2e3a1feeef6f3cd2e1b760852f0dc03fcf5bc04ef30423712c6d7ee860aecb22517cd202f13dcd
@@ -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.1.5
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-07 00:00:00.000000000 Z
11
+ date: 2016-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler