Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
893b65e4
Commit
893b65e4
authored
Aug 15, 2015
by
Dan O'Reilly
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into py2_py3_straddle
parents
7013a75b
0cb84ee3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
21 additions
and
13 deletions
+21
-13
JsonFormatterTest.cs
csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs
+0
-1
DescriptorsTest.cs
...rp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs
+7
-0
DescriptorProtoFile.cs
csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs
+0
-0
generate_descriptors_proto.sh
objectivec/generate_descriptors_proto.sh
+1
-4
csharp_field_base.cc
src/google/protobuf/compiler/csharp/csharp_field_base.cc
+1
-1
objectivec_file.cc
src/google/protobuf/compiler/objectivec/objectivec_file.cc
+0
-3
objectivec_generator.cc
...ogle/protobuf/compiler/objectivec/objectivec_generator.cc
+6
-1
objectivec_generator.h
...oogle/protobuf/compiler/objectivec/objectivec_generator.h
+1
-0
objectivec_helpers.cc
...google/protobuf/compiler/objectivec/objectivec_helpers.cc
+0
-0
objectivec_helpers.h
src/google/protobuf/compiler/objectivec/objectivec_helpers.h
+5
-3
No files found.
csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs
View file @
893b65e4
...
...
@@ -244,7 +244,6 @@ namespace Google.Protobuf
[
TestCase
(
null
,
"{ }"
)]
[
TestCase
(
"x"
,
"{ 'fooString': 'x' }"
)]
[
TestCase
(
""
,
"{ 'fooString': '' }"
)]
[
TestCase
(
null
,
"{ }"
)]
public
void
Oneof
(
string
fooStringValue
,
string
expectedJson
)
{
var
message
=
new
TestOneof
();
...
...
csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs
View file @
893b65e4
...
...
@@ -251,5 +251,12 @@ namespace Google.Protobuf.Reflection
Assert
.
AreEqual
(
new
[]
{
11
,
1
,
101
,
200
},
fields
.
InDeclarationOrder
().
Select
(
x
=>
x
.
FieldNumber
));
Assert
.
AreEqual
(
new
[]
{
1
,
11
,
101
,
200
},
fields
.
InFieldNumberOrder
().
Select
(
x
=>
x
.
FieldNumber
));
}
[
Test
]
public
void
DescriptorProtoFileDescriptor
()
{
var
descriptor
=
Google
.
Protobuf
.
Reflection
.
FileDescriptor
.
DescriptorProtoFileDescriptor
;
}
}
}
csharp/src/Google.Protobuf/Reflection/DescriptorProtoFile.cs
View file @
893b65e4
This diff is collapsed.
Click to expand it.
objectivec/generate_descriptors_proto.sh
View file @
893b65e4
...
...
@@ -11,7 +11,6 @@ set -eu
readonly
ScriptDir
=
$(
dirname
"
$(
echo
$0
|
sed
-e
"s,^
\(
[^/]
\)
,
$(
pwd
)
/
\1
,"
)
"
)
readonly
ProtoRootDir
=
"
${
ScriptDir
}
/.."
readonly
ProtoC
=
"
${
ProtoRootDir
}
/src/protoc"
pushd
"
${
ProtoRootDir
}
"
>
/dev/null
...
...
@@ -35,7 +34,7 @@ fi
cd
src
make
$@
protoc
declare
-a
RUNTIME_PROTO_FILES
=(
\
declare
-a
RUNTIME_PROTO_FILES
=(
\
google/protobuf/any.proto
\
google/protobuf/api.proto
\
google/protobuf/descriptor.proto
\
...
...
@@ -49,5 +48,3 @@ declare -a RUNTIME_PROTO_FILES=(\
google/protobuf/wrappers.proto
)
./protoc
--objc_out
=
"
${
ProtoRootDir
}
/objectivec"
${
RUNTIME_PROTO_FILES
[@]
}
popd
>
/dev/null
src/google/protobuf/compiler/csharp/csharp_field_base.cc
View file @
893b65e4
...
...
@@ -67,7 +67,7 @@ void FieldGeneratorBase::SetCommonFieldVariables(
tag_bytes
+=
", "
+
SimpleItoa
(
tag_array
[
i
]);
}
(
*
variables
)[
"access_level"
]
=
class_access_level
()
;
(
*
variables
)[
"access_level"
]
=
"public"
;
(
*
variables
)[
"tag"
]
=
SimpleItoa
(
tag
);
(
*
variables
)[
"tag_size"
]
=
SimpleItoa
(
tag_size
);
(
*
variables
)[
"tag_bytes"
]
=
tag_bytes
;
...
...
src/google/protobuf/compiler/objectivec/objectivec_file.cc
View file @
893b65e4
...
...
@@ -54,9 +54,6 @@ FileGenerator::FileGenerator(const FileDescriptor *file)
:
file_
(
file
),
root_class_name_
(
FileClassName
(
file
)),
is_public_dep_
(
false
)
{
// Validate the objc prefix.
ValidateObjCClassPrefix
(
file_
);
for
(
int
i
=
0
;
i
<
file_
->
enum_type_count
();
i
++
)
{
EnumGenerator
*
generator
=
new
EnumGenerator
(
file_
->
enum_type
(
i
));
enum_generators_
.
push_back
(
generator
);
...
...
src/google/protobuf/compiler/objectivec/objectivec_generator.cc
View file @
893b65e4
...
...
@@ -57,8 +57,13 @@ bool ObjectiveCGenerator::Generate(const FileDescriptor* file,
return
false
;
}
FileGenerator
file_generator
(
file
);
// Validate the objc prefix/package pairing.
if
(
!
ValidateObjCClassPrefix
(
file
,
error
))
{
// *error will have been filled in.
return
false
;
}
FileGenerator
file_generator
(
file
);
string
filepath
=
FilePath
(
file
);
// Generate header.
...
...
src/google/protobuf/compiler/objectivec/objectivec_generator.h
View file @
893b65e4
...
...
@@ -53,6 +53,7 @@ class LIBPROTOC_EXPORT ObjectiveCGenerator : public CodeGenerator {
private
:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
(
ObjectiveCGenerator
);
};
}
// namespace objectivec
}
// namespace compiler
}
// namespace protobuf
...
...
src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
View file @
893b65e4
This diff is collapsed.
Click to expand it.
src/google/protobuf/compiler/objectivec/objectivec_helpers.h
View file @
893b65e4
...
...
@@ -62,9 +62,6 @@ string FileName(const FileDescriptor* file);
// declared in the proto package.
string
FilePath
(
const
FileDescriptor
*
file
);
// Checks the prefix for a given file and outputs any warnings/errors needed.
void
ValidateObjCClassPrefix
(
const
FileDescriptor
*
file
);
// Gets the name of the root class we'll generate in the file. This class
// is not meant for external consumption, but instead contains helpers that
// the rest of the the classes need
...
...
@@ -145,6 +142,11 @@ string BuildFlagsString(const vector<string>& strings);
string
BuildCommentsString
(
const
SourceLocation
&
location
);
// Checks the prefix for a given file and outputs any warnings needed, if
// there are flat out errors, then out_error is filled in and the result is
// false.
bool
ValidateObjCClassPrefix
(
const
FileDescriptor
*
file
,
string
*
out_error
);
// Generate decode data needed for ObjC's GPBDecodeTextFormatName() to transform
// the input into the the expected output.
class
LIBPROTOC_EXPORT
TextFormatDecodeData
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment