google-protobuf 3.16.0.rc.1-x86-mingw32 → 3.16.0.rc.2-x86-mingw32
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.
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/defs.c +35 -8
- data/ext/google/protobuf_c/protobuf.c +1 -0
- data/lib/google/2.3/protobuf_c.so +0 -0
- data/lib/google/2.4/protobuf_c.so +0 -0
- data/lib/google/2.5/protobuf_c.so +0 -0
- data/lib/google/2.6/protobuf_c.so +0 -0
- data/lib/google/2.7/protobuf_c.so +0 -0
- data/lib/google/3.0/protobuf_c.so +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71b6d11cfa5d81939ab38c7cf9235d4557995b94ec51e834aa0e240c4c92f1b9
|
4
|
+
data.tar.gz: 4f083b2bb6fb52150022d2cf30aad869f407d9904ef1b6c3dbdb28f734d38b54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d77d0065ebb922ae5f12a6731e5a38bc62a039c601b5864bc70c3a8bca233ec9eee87fe43f276f436a54e705f3592b619a9c96b5adceb28913aa479f2f3e05e2
|
7
|
+
data.tar.gz: a45a99d7dc8e51bda922805b663c96dcc11702460bd5a81bc98c0d8ac9770a951239b68f8da6527f5597e6658d6ab90ccf7995b26403b01a8eebd59693af6339
|
@@ -868,6 +868,20 @@ static VALUE FieldDescriptor_default(VALUE _self) {
|
|
868
868
|
return Convert_UpbToRuby(default_val, TypeInfo_get(self->fielddef), Qnil);
|
869
869
|
}
|
870
870
|
|
871
|
+
|
872
|
+
/*
|
873
|
+
* call-seq:
|
874
|
+
* FieldDescriptor.json_name => json_name
|
875
|
+
*
|
876
|
+
* Returns this field's json_name, as a Ruby string, or nil if not yet set.
|
877
|
+
*/
|
878
|
+
static VALUE FieldDescriptor_json_name(VALUE _self) {
|
879
|
+
FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
|
880
|
+
const upb_fielddef *f = self->fielddef;
|
881
|
+
const char *json_name = upb_fielddef_jsonname(f);
|
882
|
+
return rb_str_new2(json_name);
|
883
|
+
}
|
884
|
+
|
871
885
|
/*
|
872
886
|
* call-seq:
|
873
887
|
* FieldDescriptor.label => label
|
@@ -1043,6 +1057,7 @@ static void FieldDescriptor_register(VALUE module) {
|
|
1043
1057
|
rb_define_method(klass, "name", FieldDescriptor_name, 0);
|
1044
1058
|
rb_define_method(klass, "type", FieldDescriptor__type, 0);
|
1045
1059
|
rb_define_method(klass, "default", FieldDescriptor_default, 0);
|
1060
|
+
rb_define_method(klass, "json_name", FieldDescriptor_json_name, 0);
|
1046
1061
|
rb_define_method(klass, "label", FieldDescriptor_label, 0);
|
1047
1062
|
rb_define_method(klass, "number", FieldDescriptor_number, 0);
|
1048
1063
|
rb_define_method(klass, "submsg_name", FieldDescriptor_submsg_name, 0);
|
@@ -1750,6 +1765,16 @@ static void msgdef_add_field(VALUE msgbuilder_rb, upb_label_t label, VALUE name,
|
|
1750
1765
|
field_proto,
|
1751
1766
|
FileBuilderContext_strdup(self->file_builder, default_value));
|
1752
1767
|
}
|
1768
|
+
|
1769
|
+
if (rb_funcall(options, rb_intern("key?"), 1,
|
1770
|
+
ID2SYM(rb_intern("json_name"))) == Qtrue) {
|
1771
|
+
VALUE json_name =
|
1772
|
+
rb_hash_lookup(options, ID2SYM(rb_intern("json_name")));
|
1773
|
+
|
1774
|
+
google_protobuf_FieldDescriptorProto_set_json_name(
|
1775
|
+
field_proto,
|
1776
|
+
FileBuilderContext_strdup(self->file_builder, json_name));
|
1777
|
+
}
|
1753
1778
|
}
|
1754
1779
|
|
1755
1780
|
if (oneof_index >= 0) {
|
@@ -1899,18 +1924,20 @@ static VALUE MessageBuilderContext_required(int argc, VALUE* argv,
|
|
1899
1924
|
*/
|
1900
1925
|
static VALUE MessageBuilderContext_repeated(int argc, VALUE* argv,
|
1901
1926
|
VALUE _self) {
|
1902
|
-
VALUE name, type, number
|
1927
|
+
VALUE name, type, number;
|
1928
|
+
VALUE type_class, options = Qnil;
|
1903
1929
|
|
1904
|
-
|
1905
|
-
|
1930
|
+
rb_scan_args(argc, argv, "32", &name, &type, &number, &type_class, &options);
|
1931
|
+
|
1932
|
+
// Allow passing (name, type, number, options) or
|
1933
|
+
// (name, type, number, type_class, options)
|
1934
|
+
if (argc == 4 && RB_TYPE_P(type_class, T_HASH)) {
|
1935
|
+
options = type_class;
|
1936
|
+
type_class = Qnil;
|
1906
1937
|
}
|
1907
|
-
name = argv[0];
|
1908
|
-
type = argv[1];
|
1909
|
-
number = argv[2];
|
1910
|
-
type_class = (argc > 3) ? argv[3] : Qnil;
|
1911
1938
|
|
1912
1939
|
msgdef_add_field(_self, UPB_LABEL_REPEATED, name, type, number, type_class,
|
1913
|
-
|
1940
|
+
options, -1, false);
|
1914
1941
|
|
1915
1942
|
return Qnil;
|
1916
1943
|
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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.16.0.rc.
|
4
|
+
version: 3.16.0.rc.2
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Protobuf Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler-dock
|
@@ -128,7 +128,7 @@ homepage: https://developers.google.com/protocol-buffers
|
|
128
128
|
licenses:
|
129
129
|
- BSD-3-Clause
|
130
130
|
metadata:
|
131
|
-
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.16.0-
|
131
|
+
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.16.0-rc2/ruby
|
132
132
|
post_install_message:
|
133
133
|
rdoc_options: []
|
134
134
|
require_paths:
|