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
f9c5978f
Commit
f9c5978f
authored
Dec 22, 2009
by
kenton@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hopefully fix build on Sun Studio.
parent
c0ee4d2e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
subprocess.cc
src/google/protobuf/compiler/subprocess.cc
+1
-0
extension_set.cc
src/google/protobuf/extension_set.cc
+6
-4
extension_set.h
src/google/protobuf/extension_set.h
+3
-3
extension_set_heavy.cc
src/google/protobuf/extension_set_heavy.cc
+2
-2
No files found.
src/google/protobuf/compiler/subprocess.cc
View file @
f9c5978f
...
...
@@ -35,6 +35,7 @@
#ifndef _WIN32
#include <errno.h>
#include <sys/wait.h>
#include <signal.h>
#endif
#include <algorithm>
...
...
src/google/protobuf/extension_set.cc
View file @
f9c5978f
...
...
@@ -138,9 +138,9 @@ void ExtensionSet::RegisterEnumExtension(const MessageLite* containing_type,
EnumValidityFunc
*
is_valid
)
{
GOOGLE_CHECK_EQ
(
type
,
WireFormatLite
::
TYPE_ENUM
);
ExtensionInfo
info
(
type
,
is_repeated
,
is_packed
);
info
.
enum_
is_valid
=
CallNoArgValidityFunc
;
info
.
enum_
validity_check
.
func
=
CallNoArgValidityFunc
;
// See comment in CallNoArgValidityFunc() about why we use a c-style cast.
info
.
enum_
is_valid_
arg
=
(
void
*
)
is_valid
;
info
.
enum_
validity_check
.
arg
=
(
void
*
)
is_valid
;
Register
(
containing_type
,
number
,
info
);
}
...
...
@@ -761,7 +761,8 @@ bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input,
int
value
;
if
(
!
WireFormatLite
::
ReadPrimitive
<
int
,
WireFormatLite
::
TYPE_ENUM
>
(
input
,
&
value
))
return
false
;
if
(
extension
.
enum_is_valid
(
extension
.
enum_is_valid_arg
,
value
))
{
if
(
extension
.
enum_validity_check
.
func
(
extension
.
enum_validity_check
.
arg
,
value
))
{
AddEnum
(
number
,
WireFormatLite
::
TYPE_ENUM
,
true
,
value
,
extension
.
descriptor
);
}
...
...
@@ -814,7 +815,8 @@ bool ExtensionSet::ParseField(uint32 tag, io::CodedInputStream* input,
if
(
!
WireFormatLite
::
ReadPrimitive
<
int
,
WireFormatLite
::
TYPE_ENUM
>
(
input
,
&
value
))
return
false
;
if
(
!
extension
.
enum_is_valid
(
extension
.
enum_is_valid_arg
,
value
))
{
if
(
!
extension
.
enum_validity_check
.
func
(
extension
.
enum_validity_check
.
arg
,
value
))
{
// Invalid value. Treat as unknown.
field_skipper
->
SkipUnknownEnum
(
number
,
value
);
}
else
if
(
extension
.
is_repeated
)
{
...
...
src/google/protobuf/extension_set.h
View file @
f9c5978f
...
...
@@ -99,9 +99,9 @@ struct ExtensionInfo {
union
{
struct
{
EnumValidityFuncWithArg
*
enum_is_valid
;
const
void
*
enum_is_valid_
arg
;
};
EnumValidityFuncWithArg
*
func
;
const
void
*
arg
;
}
enum_validity_check
;
const
MessageLite
*
message_prototype
;
};
...
...
src/google/protobuf/extension_set_heavy.cc
View file @
f9c5978f
...
...
@@ -175,8 +175,8 @@ bool DescriptorPoolExtensionFinder::Find(int number, ExtensionInfo* output) {
<<
"Extension factory's GetPrototype() returned NULL for extension: "
<<
extension
->
full_name
();
}
else
if
(
extension
->
cpp_type
()
==
FieldDescriptor
::
CPPTYPE_ENUM
)
{
output
->
enum_
is_valid
=
ValidateEnumUsingDescriptor
;
output
->
enum_
is_valid_
arg
=
extension
->
enum_type
();
output
->
enum_
validity_check
.
func
=
ValidateEnumUsingDescriptor
;
output
->
enum_
validity_check
.
arg
=
extension
->
enum_type
();
}
return
true
;
...
...
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