Author: dreiss
Date: Tue Apr 7 23:38:39 2009
New Revision: 763037
URL: http://svn.apache.org/viewvc?rev=763037&view=rev
Log:
smalltalk: Fix TBinaryProtocol readString for empty strings
Modified:
incubator/thrift/trunk/lib/st/thrift.st
Modified: incubator/thrift/trunk/lib/st/thrift.st
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/st/thrift.st?rev=763037&r1=763036&r2=763037&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/st/thrift.st (original)
+++ incubator/thrift/trunk/lib/st/thrift.st Tue Apr 7 23:38:39 2009
@@ -288,9 +288,12 @@
elemType: self readByte;
size: self readI32! !
-!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 10/26/2007 04:48'!
+!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 02/07/2009 19:00'!
readString
- ^ (transport read: self readI32) asString! !
+readString
+ | sz |
+ sz := self readI32.
+ ^ sz > 0 ifTrue: [(transport read: sz) asString] ifFalse: ['']! !
!TBinaryProtocol methodsFor: 'reading' stamp: 'pc 11/1/2007 04:22'!
unsignedInt: val size: size