google-protobuf 3.10.0.rc.1 → 3.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/google/protobuf_c/upb.c +23 -41
- data/lib/google/protobuf.rb +12 -8
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a726a79c4bbd05f12c50b72ac540abf7f0cb67f546b5b3b8b6ecc5bb11bfd5ef
|
|
4
|
+
data.tar.gz: 616a212526d93355ba41297d9f91aca04dacdf471f34fd80449eb5f6796b66bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c41b1b90d9960bb021bcc9a48f3dc7f5327aded20c40d5dd0bcf13ee69e99a4e4795136a4c15ac2f4d269fb5584eae3a38ef0e0fa6b9a9b576d93b6fbf938d2
|
|
7
|
+
data.tar.gz: 60a418dd82766817f1d77a4fdbe94aa397eacafbe080c31d046287afd5d35d5e4e4f3d96ffca2ed1d64e66434d3f847a3a933e8f4db860177fda56cc679c773a
|
data/ext/google/protobuf_c/upb.c
CHANGED
|
@@ -10117,46 +10117,28 @@ static void start_timestamp_zone(upb_json_parser *p, const char *ptr) {
|
|
|
10117
10117
|
capture_begin(p, ptr);
|
|
10118
10118
|
}
|
|
10119
10119
|
|
|
10120
|
-
|
|
10121
|
-
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
int64_t
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
int64_t secs = mins * 60 + sec;
|
|
10143
|
-
return secs;
|
|
10144
|
-
}
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
static int64_t upb_mktime(const struct tm *tp) {
|
|
10148
|
-
int sec = tp->tm_sec;
|
|
10149
|
-
int min = tp->tm_min;
|
|
10150
|
-
int hour = tp->tm_hour;
|
|
10151
|
-
int mday = tp->tm_mday;
|
|
10152
|
-
int mon = tp->tm_mon;
|
|
10153
|
-
int year = tp->tm_year + TM_YEAR_BASE;
|
|
10154
|
-
|
|
10155
|
-
/* Calculate day of year from year, month, and day of month. */
|
|
10156
|
-
int mon_yday = ((__mon_yday[isleap(year)][mon]) - 1);
|
|
10157
|
-
int yday = mon_yday + mday;
|
|
10158
|
-
|
|
10159
|
-
return epoch(year, yday, hour, min, sec);
|
|
10120
|
+
/* epoch_days(1970, 1, 1) == 1970-01-01 == 0. */
|
|
10121
|
+
static int epoch_days(int year, int month, int day) {
|
|
10122
|
+
static const uint16_t month_yday[12] = {0, 31, 59, 90, 120, 151,
|
|
10123
|
+
181, 212, 243, 273, 304, 334};
|
|
10124
|
+
int febs_since_0 = month > 2 ? year + 1 : year;
|
|
10125
|
+
int leap_days_since_0 = div_round_up(febs_since_0, 4) -
|
|
10126
|
+
div_round_up(febs_since_0, 100) +
|
|
10127
|
+
div_round_up(febs_since_0, 400);
|
|
10128
|
+
int days_since_0 =
|
|
10129
|
+
365 * year + month_yday[month - 1] + (day - 1) + leap_days_since_0;
|
|
10130
|
+
|
|
10131
|
+
/* Convert from 0-epoch (0001-01-01 BC) to Unix Epoch (1970-01-01 AD).
|
|
10132
|
+
* Since the "BC" system does not have a year zero, 1 BC == year zero. */
|
|
10133
|
+
return days_since_0 - 719528;
|
|
10134
|
+
}
|
|
10135
|
+
|
|
10136
|
+
static int64_t upb_timegm(const struct tm *tp) {
|
|
10137
|
+
int64_t ret = epoch_days(tp->tm_year + 1900, tp->tm_mon + 1, tp->tm_mday);
|
|
10138
|
+
ret = (ret * 24) + tp->tm_hour;
|
|
10139
|
+
ret = (ret * 60) + tp->tm_min;
|
|
10140
|
+
ret = (ret * 60) + tp->tm_sec;
|
|
10141
|
+
return ret;
|
|
10160
10142
|
}
|
|
10161
10143
|
|
|
10162
10144
|
static bool end_timestamp_zone(upb_json_parser *p, const char *ptr) {
|
|
@@ -10186,7 +10168,7 @@ static bool end_timestamp_zone(upb_json_parser *p, const char *ptr) {
|
|
|
10186
10168
|
}
|
|
10187
10169
|
|
|
10188
10170
|
/* Normalize tm */
|
|
10189
|
-
seconds =
|
|
10171
|
+
seconds = upb_timegm(&p->tm);
|
|
10190
10172
|
|
|
10191
10173
|
/* Check timestamp boundary */
|
|
10192
10174
|
if (seconds < -62135596800) {
|
data/lib/google/protobuf.rb
CHANGED
|
@@ -56,15 +56,19 @@ else
|
|
|
56
56
|
module Internal
|
|
57
57
|
def self.infer_package(names)
|
|
58
58
|
# Package is longest common prefix ending in '.', if any.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
if not names.empty?
|
|
60
|
+
min, max = names.minmax
|
|
61
|
+
last_common_dot = nil
|
|
62
|
+
min.size.times { |i|
|
|
63
|
+
if min[i] != max[i] then break end
|
|
64
|
+
if min[i] == ?. then last_common_dot = i end
|
|
65
|
+
}
|
|
66
|
+
if last_common_dot
|
|
67
|
+
return min.slice(0, last_common_dot)
|
|
68
|
+
end
|
|
67
69
|
end
|
|
70
|
+
|
|
71
|
+
nil
|
|
68
72
|
end
|
|
69
73
|
|
|
70
74
|
class NestingBuilder
|
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.10.
|
|
4
|
+
version: 3.10.1
|
|
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-
|
|
11
|
+
date: 2019-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake-compiler-dock
|
|
@@ -112,7 +112,7 @@ homepage: https://developers.google.com/protocol-buffers
|
|
|
112
112
|
licenses:
|
|
113
113
|
- BSD-3-Clause
|
|
114
114
|
metadata:
|
|
115
|
-
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.10.
|
|
115
|
+
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.10.1/ruby
|
|
116
116
|
post_install_message:
|
|
117
117
|
rdoc_options: []
|
|
118
118
|
require_paths:
|
|
@@ -124,9 +124,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
124
124
|
version: '2.3'
|
|
125
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
requirements:
|
|
127
|
-
- - "
|
|
127
|
+
- - ">="
|
|
128
128
|
- !ruby/object:Gem::Version
|
|
129
|
-
version:
|
|
129
|
+
version: '0'
|
|
130
130
|
requirements: []
|
|
131
131
|
rubygems_version: 3.0.6
|
|
132
132
|
signing_key:
|