bson 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bson might be problematic. Click here for more details.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +7 -0
- data/ext/bson/native.c +5 -4
- data/lib/bson/version.rb +1 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6ad453f095cb79d3aaf2fdd4b9d4cd12d169678
|
4
|
+
data.tar.gz: d29d2f0b0fd25f0d3ca9f83913e9a7099b43e780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd903a7e666a27c16591d9207b90eecf16a9854371148e7c8cdc53d6bdf8a1e510ccd68ea5e455a54b4d6e66f39ef3e9292d1cbc6fb213bbc8cefba6f000adf2
|
7
|
+
data.tar.gz: 8d8a8546d7beabdcbd0d11b95b37cc4aafe1b76649d9a2beeb1040a9cda741ddc7435c9c811a096d76348a51b4f1570b144c7d170edee73e896ecdb5d4181e33
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/ext/bson/native.c
CHANGED
@@ -210,7 +210,7 @@ static VALUE rb_float_from_bson_double(VALUE self, VALUE value)
|
|
210
210
|
{
|
211
211
|
const char * bytes;
|
212
212
|
double v;
|
213
|
-
bytes =
|
213
|
+
bytes = StringValuePtr(value);
|
214
214
|
memcpy(&v, bytes, RSTRING_LEN(value));
|
215
215
|
return DBL2NUM(v);
|
216
216
|
}
|
@@ -358,7 +358,7 @@ static VALUE rb_integer_to_bson_key(int argc, VALUE *argv, VALUE self)
|
|
358
358
|
*/
|
359
359
|
static VALUE rb_integer_from_bson_int32(VALUE self, VALUE bson)
|
360
360
|
{
|
361
|
-
const uint8_t *v = (const uint8_t*)
|
361
|
+
const uint8_t *v = (const uint8_t*) StringValuePtr(bson);
|
362
362
|
const int32_t integer = v[0] + (v[1] << 8) + (v[2] << 16) + (v[3] << 24);
|
363
363
|
return INT2NUM(integer);
|
364
364
|
}
|
@@ -381,7 +381,7 @@ static int64_t rb_bson_to_int64_t(VALUE bson)
|
|
381
381
|
uint32_t byte_0, byte_1;
|
382
382
|
int64_t byte_2, byte_3;
|
383
383
|
int64_t lower, upper;
|
384
|
-
v = (uint8_t*)
|
384
|
+
v = (uint8_t*) StringValuePtr(bson);
|
385
385
|
byte_0 = v[0];
|
386
386
|
byte_1 = v[1];
|
387
387
|
byte_2 = v[2];
|
@@ -457,7 +457,7 @@ static VALUE int64_t_to_bson(int64_t v, VALUE encoded)
|
|
457
457
|
*/
|
458
458
|
static VALUE rb_integer_to_bson_int64(VALUE self, VALUE encoded)
|
459
459
|
{
|
460
|
-
return int64_t_to_bson(NUM2INT64(self), encoded);
|
460
|
+
return int64_t_to_bson(NUM2INT64(self), StringValue(encoded));
|
461
461
|
}
|
462
462
|
|
463
463
|
/**
|
@@ -529,6 +529,7 @@ static VALUE rb_string_set_int32(VALUE str, VALUE pos, VALUE an_int32)
|
|
529
529
|
(v >> 16) & 255,
|
530
530
|
(v >> 24) & 255
|
531
531
|
};
|
532
|
+
rb_str_modify(str);
|
532
533
|
if (offset < 0 || offset + 4 > RSTRING_LEN(str)) {
|
533
534
|
rb_raise(rb_eArgError, "invalid position");
|
534
535
|
}
|
data/lib/bson/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Brock
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
XZOS48LlWh15EG4yZo/gRzqNAW2LUIkYA5eMS2Kp6r+KV8IBUO/LaHdrXbdilpa8
|
35
35
|
BRsuCo7UZDbFVRns04HLyjVvkj+K/ywIcdKdS0csz5M=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2015-
|
37
|
+
date: 2015-05-19 00:00:00.000000000 Z
|
38
38
|
dependencies: []
|
39
39
|
description: A full featured BSON specification implementation, in Ruby
|
40
40
|
email:
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: 1.3.6
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project: bson
|
139
|
-
rubygems_version: 2.4.
|
139
|
+
rubygems_version: 2.4.6
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Ruby Implementation of the BSON specification
|
metadata.gz.sig
CHANGED
Binary file
|