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
eaaef0b3
Commit
eaaef0b3
authored
Dec 04, 2012
by
xiaofeng@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues: 342, 424, 428, 430, 436
parent
ef9acc46
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
13 deletions
+10
-13
README.txt
README.txt
+1
-1
python-proto2.cc
python/google/protobuf/pyext/python-proto2.cc
+0
-6
Makefile.am
src/Makefile.am
+2
-2
common.cc
src/google/protobuf/stubs/common.cc
+1
-1
common_unittest.cc
src/google/protobuf/stubs/common_unittest.cc
+3
-3
wire_format.h
src/google/protobuf/wire_format.h
+3
-0
No files found.
README.txt
View file @
eaaef0b3
...
...
@@ -115,7 +115,7 @@ For advanced usage information on configure and make, see INSTALL.txt.
C++ Installation - Windows
==========================
If you are using Micosoft Visual C++, see vsprojects/readme.txt.
If you are using Mic
r
osoft Visual C++, see vsprojects/readme.txt.
If you are using Cygwin or MinGW, follow the Unix installation
instructions, above.
...
...
python/google/protobuf/pyext/python-proto2.cc
View file @
eaaef0b3
...
...
@@ -427,9 +427,6 @@ static bool CheckAndSetString(
GOOGLE_DCHECK
(
descriptor
->
type
()
==
google
::
protobuf
::
FieldDescriptor
::
TYPE_STRING
||
descriptor
->
type
()
==
google
::
protobuf
::
FieldDescriptor
::
TYPE_BYTES
);
if
(
descriptor
->
type
()
==
google
::
protobuf
::
FieldDescriptor
::
TYPE_STRING
)
{
#else
if
(
descriptor
->
file
()
->
options
().
cc_api_version
()
==
2
&&
descriptor
->
type
()
==
google
::
protobuf
::
FieldDescriptor
::
TYPE_STRING
)
{
if
(
!
PyString_Check
(
arg
)
&&
!
PyUnicode_Check
(
arg
))
{
FormatTypeError
(
arg
,
"str, unicode"
);
return
false
;
...
...
@@ -457,9 +454,6 @@ static bool CheckAndSetString(
PyObject
*
encoded_string
=
NULL
;
if
(
descriptor
->
type
()
==
google
::
protobuf
::
FieldDescriptor
::
TYPE_STRING
)
{
#else
if
(
descriptor
->
file
()
->
options
().
cc_api_version
()
==
2
&&
descriptor
->
type
()
==
google
::
protobuf
::
FieldDescriptor
::
TYPE_STRING
)
{
if
(
PyString_Check
(
arg
))
{
encoded_string
=
PyString_AsEncodedObject
(
arg
,
"utf-8"
,
NULL
);
}
else
{
...
...
src/Makefile.am
View file @
eaaef0b3
...
...
@@ -47,6 +47,8 @@ nobase_include_HEADERS = \
google/protobuf/stubs/common.h
\
google/protobuf/stubs/platform_macros.h
\
google/protobuf/stubs/once.h
\
google/protobuf/stubs/template_util.h
\
google/protobuf/stubs/type_traits.h
\
google/protobuf/descriptor.h
\
google/protobuf/descriptor.pb.h
\
google/protobuf/descriptor_database.h
\
...
...
@@ -95,8 +97,6 @@ libprotobuf_lite_la_SOURCES = \
google/protobuf/stubs/stl_util.h
\
google/protobuf/stubs/stringprintf.cc
\
google/protobuf/stubs/stringprintf.h
\
google/protobuf/stubs/template_util.h
\
google/protobuf/stubs/type_traits.h
\
google/protobuf/extension_set.cc
\
google/protobuf/generated_message_util.cc
\
google/protobuf/message_lite.cc
\
...
...
src/google/protobuf/stubs/common.cc
View file @
eaaef0b3
...
...
@@ -110,7 +110,7 @@ void DefaultLogHandler(LogLevel level, const char* filename, int line,
// We use fprintf() instead of cerr because we want this to work at static
// initialization time.
fprintf
(
stderr
,
"libprotobuf %s %s:%d] %s
\n
"
,
fprintf
(
stderr
,
"
[
libprotobuf %s %s:%d] %s
\n
"
,
level_names
[
level
],
filename
,
line
,
message
.
c_str
());
fflush
(
stderr
);
// Needed on MSVC.
}
...
...
src/google/protobuf/stubs/common_unittest.cc
View file @
eaaef0b3
...
...
@@ -94,9 +94,9 @@ TEST(LoggingTest, DefaultLogging) {
string
text
=
GetCapturedTestStderr
();
EXPECT_EQ
(
"libprotobuf INFO "
__FILE__
":"
+
SimpleItoa
(
line
+
1
)
+
"] A message.
\n
"
"libprotobuf WARNING "
__FILE__
":"
+
SimpleItoa
(
line
+
2
)
+
"] A warning.
\n
"
"libprotobuf ERROR "
__FILE__
":"
+
SimpleItoa
(
line
+
3
)
+
"] An error.
\n
"
,
"
[
libprotobuf INFO "
__FILE__
":"
+
SimpleItoa
(
line
+
1
)
+
"] A message.
\n
"
"
[
libprotobuf WARNING "
__FILE__
":"
+
SimpleItoa
(
line
+
2
)
+
"] A warning.
\n
"
"
[
libprotobuf ERROR "
__FILE__
":"
+
SimpleItoa
(
line
+
3
)
+
"] An error.
\n
"
,
text
);
}
...
...
src/google/protobuf/wire_format.h
View file @
eaaef0b3
...
...
@@ -294,6 +294,9 @@ inline void WireFormat::VerifyUTF8String(const char* data, int size,
WireFormat
::
Operation
op
)
{
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
WireFormat
::
VerifyUTF8StringFallback
(
data
,
size
,
op
);
#else
// Avoid the compiler warning about unsued variables.
(
void
)
data
;
(
void
)
size
;
(
void
)
op
;
#endif
}
...
...
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