google-protobuf 3.8.0.rc.1 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of google-protobuf might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/google/protobuf_c/upb.c +42 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acc61dfa5ec7487b0b62edbf098aca5a5d0ce33145cbab091a892f1ed9f240cf
|
4
|
+
data.tar.gz: f7666d31441737c415008dfa0077657b8afb3c23fd0966f972b305163ffd2a02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 481d523e6d2dc363c73695025811bcc181358513a9a7931d4f19d6c9aab40a085a2e02e97d5370069f339897b8170fd3ddca906952717233e582cd10a9dcfd4c
|
7
|
+
data.tar.gz: 9cf2022047f865793c3edc480147e1e2c27f1d1d676239090c32f3356a8c4f6f6405bde3b8a879aeb9200725d7e340f9fec8d1457ed37411feb3b4d0546dd96c
|
data/ext/google/protobuf_c/upb.c
CHANGED
@@ -14299,6 +14299,47 @@ static void start_timestamp_zone(upb_json_parser *p, const char *ptr) {
|
|
14299
14299
|
capture_begin(p, ptr);
|
14300
14300
|
}
|
14301
14301
|
|
14302
|
+
#define EPOCH_YEAR 1970
|
14303
|
+
#define TM_YEAR_BASE 1900
|
14304
|
+
|
14305
|
+
static bool isleap(int year) {
|
14306
|
+
return (year % 4) == 0 && (year % 100 != 0 || (year % 400) == 0);
|
14307
|
+
}
|
14308
|
+
|
14309
|
+
const unsigned short int __mon_yday[2][13] = {
|
14310
|
+
/* Normal years. */
|
14311
|
+
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
|
14312
|
+
/* Leap years. */
|
14313
|
+
{ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
|
14314
|
+
};
|
14315
|
+
|
14316
|
+
int64_t epoch(int year, int yday, int hour, int min, int sec) {
|
14317
|
+
int64_t years = year - EPOCH_YEAR;
|
14318
|
+
|
14319
|
+
int64_t leap_days = years / 4 - years / 100 + years / 400;
|
14320
|
+
|
14321
|
+
int64_t days = years * 365 + yday + leap_days;
|
14322
|
+
int64_t hours = days * 24 + hour;
|
14323
|
+
int64_t mins = hours * 60 + min;
|
14324
|
+
int64_t secs = mins * 60 + sec;
|
14325
|
+
return secs;
|
14326
|
+
}
|
14327
|
+
|
14328
|
+
static int64_t upb_mktime(const struct tm *tp) {
|
14329
|
+
int sec = tp->tm_sec;
|
14330
|
+
int min = tp->tm_min;
|
14331
|
+
int hour = tp->tm_hour;
|
14332
|
+
int mday = tp->tm_mday;
|
14333
|
+
int mon = tp->tm_mon;
|
14334
|
+
int year = tp->tm_year + TM_YEAR_BASE;
|
14335
|
+
|
14336
|
+
/* Calculate day of year from year, month, and day of month. */
|
14337
|
+
int mon_yday = ((__mon_yday[isleap(year)][mon]) - 1);
|
14338
|
+
int yday = mon_yday + mday;
|
14339
|
+
|
14340
|
+
return epoch(year, yday, hour, min, sec);
|
14341
|
+
}
|
14342
|
+
|
14302
14343
|
static bool end_timestamp_zone(upb_json_parser *p, const char *ptr) {
|
14303
14344
|
size_t len;
|
14304
14345
|
const char *buf;
|
@@ -14325,7 +14366,7 @@ static bool end_timestamp_zone(upb_json_parser *p, const char *ptr) {
|
|
14325
14366
|
}
|
14326
14367
|
|
14327
14368
|
/* Normalize tm */
|
14328
|
-
seconds =
|
14369
|
+
seconds = upb_mktime(&p->tm);
|
14329
14370
|
seconds += 3600 * hours;
|
14330
14371
|
|
14331
14372
|
/* Check timestamp boundary */
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.0
|
4
|
+
version: 3.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Protobuf Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler-dock
|
@@ -120,15 +120,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
121
121
|
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
123
|
+
version: '2.3'
|
124
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- - "
|
126
|
+
- - ">="
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version:
|
128
|
+
version: '0'
|
129
129
|
requirements: []
|
130
|
-
|
131
|
-
rubygems_version: 2.7.6
|
130
|
+
rubygems_version: 3.0.3
|
132
131
|
signing_key:
|
133
132
|
specification_version: 4
|
134
133
|
summary: Protocol Buffers
|