equal
deleted
inserted
replaced
665 advancePositionAndReturn: ; |
665 advancePositionAndReturn: ; |
666 if ((__readLimit >= 0) && (pos > __readLimit)) { |
666 if ((__readLimit >= 0) && (pos > __readLimit)) { |
667 __INST(readLimit) = __mkSmallInteger(pos); |
667 __INST(readLimit) = __mkSmallInteger(pos); |
668 } |
668 } |
669 __INST(position) = __mkSmallInteger(pos); |
669 __INST(position) = __mkSmallInteger(pos); |
670 RETURN ( anObject ); |
670 RETURN ( self ); |
671 } |
671 } |
672 } else if (cls == @global(ByteArray)) { |
672 } else if (cls == @global(ByteArray)) { |
673 if (pos <= __byteArraySize(coll)) { |
673 if (pos <= __byteArraySize(coll)) { |
674 __ByteArrayInstPtr(coll)->ba_element[pos-1] = ch; |
674 __ByteArrayInstPtr(coll)->ba_element[pos-1] = ch; |
675 goto advancePositionAndReturn; |
675 goto advancePositionAndReturn; |
680 #endif |
680 #endif |
681 %}. |
681 %}. |
682 ((writeLimit isNil or:[(position + 1) <= writeLimit]) |
682 ((writeLimit isNil or:[(position + 1) <= writeLimit]) |
683 and:[position >= collection size]) ifTrue:[ |
683 and:[position >= collection size]) ifTrue:[ |
684 self growCollection. |
684 self growCollection. |
685 ^ self nextPutByte:anObject. "try again" |
685 self nextPutByte:anObject. "try again" |
686 ] ifFalse:[ |
686 ] ifFalse:[ |
687 ^ super nextPutByte:anObject |
687 super nextPutByte:anObject |
688 ]. |
688 ]. |
689 ! |
689 ! |
690 |
690 |
691 nextPutBytes:count from:anObject startingAt:start |
691 nextPutBytes:count from:anObject startingAt:start |
692 "write count bytes from an object starting at index start. |
692 "write count bytes from an object starting at index start. |