Add protobuf patch
This commit is contained in:
parent
8af6fa9816
commit
bf336b7227
2 changed files with 13 additions and 14 deletions
|
@ -2,4 +2,4 @@
|
|||
mkdir -p ../src/com
|
||||
cp com/google/protobuf/CodedInputStream.java com/google/protobuf/CodedInputStreamRAF.java
|
||||
cp -Rf com/* ../src/com/
|
||||
git apply -v protobuf-2.3.patch
|
||||
(cd ../ && git apply -v protobuf-src/protobuf-2.3.patch)
|
|
@ -115,11 +115,18 @@ public final class WireFormat {
|
|||
FIXED64 (JavaType.LONG , WIRETYPE_FIXED64 ),
|
||||
FIXED32 (JavaType.INT , WIRETYPE_FIXED32 ),
|
||||
BOOL (JavaType.BOOLEAN , WIRETYPE_VARINT ),
|
||||
// OSMAND FIX no methods override for enum
|
||||
STRING (JavaType.STRING , WIRETYPE_LENGTH_DELIMITED, false),
|
||||
GROUP (JavaType.MESSAGE , WIRETYPE_START_GROUP , false),
|
||||
MESSAGE (JavaType.MESSAGE , WIRETYPE_LENGTH_DELIMITED , false),
|
||||
BYTES (JavaType.BYTE_STRING, WIRETYPE_LENGTH_DELIMITED , false),
|
||||
STRING (JavaType.STRING , WIRETYPE_LENGTH_DELIMITED) {
|
||||
public boolean isPackable() { return false; }
|
||||
},
|
||||
GROUP (JavaType.MESSAGE , WIRETYPE_START_GROUP ) {
|
||||
public boolean isPackable() { return false; }
|
||||
},
|
||||
MESSAGE (JavaType.MESSAGE , WIRETYPE_LENGTH_DELIMITED) {
|
||||
public boolean isPackable() { return false; }
|
||||
},
|
||||
BYTES (JavaType.BYTE_STRING, WIRETYPE_LENGTH_DELIMITED) {
|
||||
public boolean isPackable() { return false; }
|
||||
},
|
||||
UINT32 (JavaType.INT , WIRETYPE_VARINT ),
|
||||
ENUM (JavaType.ENUM , WIRETYPE_VARINT ),
|
||||
SFIXED32(JavaType.INT , WIRETYPE_FIXED32 ),
|
||||
|
@ -130,18 +137,10 @@ public final class WireFormat {
|
|||
FieldType(final JavaType javaType, final int wireType) {
|
||||
this.javaType = javaType;
|
||||
this.wireType = wireType;
|
||||
this.packable = true;
|
||||
}
|
||||
|
||||
FieldType(final JavaType javaType, final int wireType, boolean packable) {
|
||||
this.javaType = javaType;
|
||||
this.wireType = wireType;
|
||||
this.packable = packable;
|
||||
}
|
||||
|
||||
private final JavaType javaType;
|
||||
private final int wireType;
|
||||
private final boolean packable;
|
||||
|
||||
public JavaType getJavaType() { return javaType; }
|
||||
public int getWireType() { return wireType; }
|
||||
|
|
Loading…
Reference in a new issue