Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
81b473b
)
allow writing binaries in thrift_binary_protocol
author
David Reiss
<dreiss@apache.org>
Wed, 11 Jun 2008 00:58:48 +0000
(
00:58
+0000)
committer
David Reiss
<dreiss@apache.org>
Wed, 11 Jun 2008 00:58:48 +0000
(
00:58
+0000)
Summary: they come packed in {string, Bin} so pull them out
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666424
13f79535
-47bb-0310-9956-
ffa450edef68
lib/alterl/src/thrift_binary_protocol.erl
patch
|
blob
|
history
diff --git
a/lib/alterl/src/thrift_binary_protocol.erl
b/lib/alterl/src/thrift_binary_protocol.erl
index
0605dc1
..
0525621
100644
(file)
--- a/
lib/alterl/src/thrift_binary_protocol.erl
+++ b/
lib/alterl/src/thrift_binary_protocol.erl
@@
-115,6
+115,10
@@
write(This, {string, Str}) when is_list(Str) ->
write(This, {i32, length(Str)}),
write(This, list_to_binary(Str));
+write(This, {string, Bin}) when is_binary(Bin) ->
+ write(This, {i32, size(Bin)}),
+ write(This, Bin);
+
write(This, Binary) when is_binary(Binary) ->
thrift_transport:write(This#binary_protocol.transport, Binary).
@@
-176,7
+180,7
@@
read(This, set_end) -> ok;
read(This, field_stop) ->
{ok, ?tType_STOP} = read(This, byte),
- ok;
+ ok;
%%