rejectu 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 0b6567f2dd67415c2a817e5907895310439af685
4
- data.tar.gz: 0dc65aa88bb81341421d8eabf548e05b6352a882
3
+ metadata.gz: 26755280c4039506f58fa4ca6f055128a6cd4986
4
+ data.tar.gz: 241be0c2c820fc77f611fa66b69dfc842e71f1e1
5
5
  SHA512:
6
- metadata.gz: af3e3a94fc5650dfe55669461efa16b42fc0bf617b3e08c8165152aaaebfe2345184a570fdd6e8b9278063b2d82f870a3893a54966d026640779154aed108849
7
- data.tar.gz: a987555733a255e82adc2ff41fa6f4fa712b4db0e11f6ad0693bc7780c9c50da5e91ad409fa5c1ef8cdba3052dd5febd8bf565bac185b2a50a0eff1cc7487ba6
6
+ metadata.gz: ff027e3da57a31fa94087f7303d288a61960e93d79d9e09afeb26f58d2b2e93bd5e9549c2d48256fdd82953c9f07c68c9ccd2208cb88057f43fc3ddef5a248c6
7
+ data.tar.gz: ca9c37d6035dee4d3258023cd3d4af76967c2bd5dc006aa666862be7f9e28905c649bcefaed6bed955d8ed6c6cf8dc8ca498ed989a45483d7618339944d885d6
@@ -7,6 +7,7 @@
7
7
  static VALUE mRejectu = Qnil;
8
8
  static VALUE idEncoding, idTo_s;
9
9
 
10
+ #ifdef __SSE2__
10
11
  static inline int
11
12
  has_utf8_supplementary_planes(__m128i v)
12
13
  {
@@ -14,6 +15,7 @@ has_utf8_supplementary_planes(__m128i v)
14
15
  v = _mm_cmpeq_epi16(v, _mm_set1_epi16(0x0f));
15
16
  return _mm_movemask_epi8(v) == 0 ? 0 : 1;
16
17
  }
18
+ #endif
17
19
 
18
20
  static inline void
19
21
  validate_utf8_input(VALUE str)
@@ -62,7 +64,7 @@ is_valid(VALUE self, VALUE str)
62
64
  mask = _mm_movemask_epi8(chunk);
63
65
  if (mask) {
64
66
  /*
65
- * If there's a multi-bye character somewhere in this chunk, we need to check if it's a codepoint
67
+ * If there's a multi-byte character somewhere in this chunk, we need to check if it's a codepoint
66
68
  * from the supplementary plane (11110xxx 10xxxxxx 10xxxxxx 10xxxxxx).
67
69
  *
68
70
  * 1) Unpack the chunk into two halves (16-bit integers)
data/rejectu.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rejectu'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.summary = 'Detects if a UTF-8 string supplementary plane code points'
5
5
  s.description = <<-DOC
6
6
  This gem detects if a UTF-8 encoded string contains characters from the UTF-8 supplementary
@@ -14,4 +14,4 @@ Gem::Specification.new do |s|
14
14
  s.files = `git ls-files`.split("\n")
15
15
  s.extensions = ['ext/rejectu/extconf.rb']
16
16
  s.add_development_dependency 'rake-compiler', '~> 0.9'
17
- end
17
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rejectu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Francis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-24 00:00:00.000000000 Z
11
+ date: 2014-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler