#OTHER by cg
category of:
#postCopy
#postDeepCopy
#postDeepCopyFrom:
--- a/ImmutableByteArray.st Mon May 27 15:01:44 2019 +0200
+++ b/ImmutableByteArray.st Mon May 27 15:01:51 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 2009 by eXept Software AG
All Rights Reserved
@@ -319,6 +317,21 @@
!ImmutableByteArray methodsFor:'copying'!
+shallowCopy
+ "when copying, return a real (mutable) ByteArray"
+
+ |sz|
+
+ sz := self size.
+ ^ (ByteArray new:sz) replaceBytesFrom:1 to:sz with:self startingAt:1
+
+ "
+ #[1 2 3 4] asImmutableByteArray shallowCopy
+ "
+! !
+
+!ImmutableByteArray methodsFor:'copying-private'!
+
postCopy
"when copied, make me a real (mutable) ByteArray"
@@ -335,19 +348,6 @@
#[1 2 3 4] asImmutableByteArray shallowCopy class
#[1 2 3 4] asImmutableByteArray deepCopy class
"
-!
-
-shallowCopy
- "when copying, return a real (mutable) ByteArray"
-
- |sz|
-
- sz := self size.
- ^ (ByteArray new:sz) replaceBytesFrom:1 to:sz with:self startingAt:1
-
- "
- #[1 2 3 4] asImmutableByteArray shallowCopy
- "
! !
!ImmutableByteArray methodsFor:'printing & storing'!