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
5d8d2b05
Commit
5d8d2b05
authored
Dec 06, 2010
by
liujisi@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues: 200 202 211 215 237 246.
parent
2726e7a6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
7 deletions
+21
-7
configure.ac
configure.ac
+1
-1
CodedOutputStream.java
.../src/main/java/com/google/protobuf/CodedOutputStream.java
+1
-1
GeneratedMessage.java
java/src/main/java/com/google/protobuf/GeneratedMessage.java
+1
-0
GeneratedMessageLite.java
...c/main/java/com/google/protobuf/GeneratedMessageLite.java
+1
-0
coded_stream.h
src/google/protobuf/io/coded_stream.h
+1
-1
repeated_field.h
src/google/protobuf/repeated_field.h
+4
-4
common.cc
src/google/protobuf/stubs/common.cc
+12
-0
No files found.
configure.ac
View file @
5d8d2b05
...
@@ -118,7 +118,7 @@ AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1])
...
@@ -118,7 +118,7 @@ AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1])
AS_IF([test "$with_protoc" != "no"], [
AS_IF([test "$with_protoc" != "no"], [
PROTOC=$with_protoc
PROTOC=$with_protoc
AS_IF([test "$with_protoc" =
=
"yes"], [
AS_IF([test "$with_protoc" = "yes"], [
# No argument given. Use system protoc.
# No argument given. Use system protoc.
PROTOC=protoc
PROTOC=protoc
])
])
...
...
java/src/main/java/com/google/protobuf/CodedOutputStream.java
View file @
5d8d2b05
...
@@ -396,7 +396,7 @@ public final class CodedOutputStream {
...
@@ -396,7 +396,7 @@ public final class CodedOutputStream {
* for converting the enum value to its numeric value.
* for converting the enum value to its numeric value.
*/
*/
public
void
writeEnumNoTag
(
final
int
value
)
throws
IOException
{
public
void
writeEnumNoTag
(
final
int
value
)
throws
IOException
{
write
RawVarint32
(
value
);
write
Int32NoTag
(
value
);
}
}
/** Write an {@code sfixed32} field to the stream. */
/** Write an {@code sfixed32} field to the stream. */
...
...
java/src/main/java/com/google/protobuf/GeneratedMessage.java
View file @
5d8d2b05
...
@@ -56,6 +56,7 @@ import java.util.TreeMap;
...
@@ -56,6 +56,7 @@ import java.util.TreeMap;
*/
*/
public
abstract
class
GeneratedMessage
extends
AbstractMessage
public
abstract
class
GeneratedMessage
extends
AbstractMessage
implements
Serializable
{
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
final
UnknownFieldSet
unknownFields
;
private
final
UnknownFieldSet
unknownFields
;
...
...
java/src/main/java/com/google/protobuf/GeneratedMessageLite.java
View file @
5d8d2b05
...
@@ -47,6 +47,7 @@ import java.util.Map;
...
@@ -47,6 +47,7 @@ import java.util.Map;
*/
*/
public
abstract
class
GeneratedMessageLite
extends
AbstractMessageLite
public
abstract
class
GeneratedMessageLite
extends
AbstractMessageLite
implements
Serializable
{
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
protected
GeneratedMessageLite
()
{
protected
GeneratedMessageLite
()
{
}
}
...
...
src/google/protobuf/io/coded_stream.h
View file @
5d8d2b05
...
@@ -567,7 +567,7 @@ class LIBPROTOBUF_EXPORT CodedInputStream {
...
@@ -567,7 +567,7 @@ class LIBPROTOBUF_EXPORT CodedInputStream {
// char text[] = "Hello world!";
// char text[] = "Hello world!";
//
//
// int coded_size = sizeof(magic_number) +
// int coded_size = sizeof(magic_number) +
// CodedOutputStream::Varint
32Size
(strlen(text)) +
// CodedOutputStream::Varint
Size32
(strlen(text)) +
// strlen(text);
// strlen(text);
//
//
// uint8* buffer =
// uint8* buffer =
...
...
src/google/protobuf/repeated_field.h
View file @
5d8d2b05
...
@@ -616,14 +616,14 @@ inline void RepeatedField<Element>::Truncate(int new_size) {
...
@@ -616,14 +616,14 @@ inline void RepeatedField<Element>::Truncate(int new_size) {
template
<
typename
Element
>
template
<
typename
Element
>
inline
void
RepeatedField
<
Element
>::
MoveArray
(
inline
void
RepeatedField
<
Element
>::
MoveArray
(
Element
to
[],
Element
from
[],
int
size
)
{
Element
to
[],
Element
from
[],
int
array_
size
)
{
memcpy
(
to
,
from
,
size
*
sizeof
(
Element
));
memcpy
(
to
,
from
,
array_
size
*
sizeof
(
Element
));
}
}
template
<
typename
Element
>
template
<
typename
Element
>
inline
void
RepeatedField
<
Element
>::
CopyArray
(
inline
void
RepeatedField
<
Element
>::
CopyArray
(
Element
to
[],
const
Element
from
[],
int
size
)
{
Element
to
[],
const
Element
from
[],
int
array_
size
)
{
memcpy
(
to
,
from
,
size
*
sizeof
(
Element
));
memcpy
(
to
,
from
,
array_
size
*
sizeof
(
Element
));
}
}
...
...
src/google/protobuf/stubs/common.cc
View file @
5d8d2b05
...
@@ -177,6 +177,12 @@ LogMessage::LogMessage(LogLevel level, const char* filename, int line)
...
@@ -177,6 +177,12 @@ LogMessage::LogMessage(LogLevel level, const char* filename, int line)
:
level_
(
level
),
filename_
(
filename
),
line_
(
line
)
{}
:
level_
(
level
),
filename_
(
filename
),
line_
(
line
)
{}
LogMessage
::~
LogMessage
()
{}
LogMessage
::~
LogMessage
()
{}
#if defined(_MSC_VER) && defined(_CPPUNWIND)
#define PROTOBUF_USE_EXCEPTIONS
#elif defined(__EXCEPTIONS)
#define PROTOBUF_USE_EXCEPTIONS
#endif
void
LogMessage
::
Finish
()
{
void
LogMessage
::
Finish
()
{
bool
suppress
=
false
;
bool
suppress
=
false
;
...
@@ -191,10 +197,16 @@ void LogMessage::Finish() {
...
@@ -191,10 +197,16 @@ void LogMessage::Finish() {
}
}
if
(
level_
==
LOGLEVEL_FATAL
)
{
if
(
level_
==
LOGLEVEL_FATAL
)
{
#ifdef PROTOBUF_USE_EXCEPTIONS
throw
-
1
;
#else
abort
();
abort
();
#endif
}
}
}
}
#undef PROTOBUF_USE_EXCEPTIONS
void
LogFinisher
::
operator
=
(
LogMessage
&
other
)
{
void
LogFinisher
::
operator
=
(
LogMessage
&
other
)
{
other
.
Finish
();
other
.
Finish
();
}
}
...
...
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