#REFACTORING
authorClaus Gittinger <cg@exept.de>
Wed, 23 Mar 2016 14:36:17 +0100
changeset 19419 362d601fee24
parent 19418 c019774dce43
child 19420 e2578414e873
#REFACTORING class: ExternalBytes changed: #asExternalAddress #copyUnicodeStringFromHeap (send #unsignedInt16At: instead of #unsignedShortAt:)
ExternalBytes.st
--- a/ExternalBytes.st	Wed Mar 23 14:35:58 2016 +0100
+++ b/ExternalBytes.st	Wed Mar 23 14:36:17 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -9,8 +11,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-'From Smalltalk/X, Version:6.2.5.0 on 18-03-2016 at 10:24:59'                   !
-
 "{ Package: 'stx:libbasic' }"
 
 "{ NameSpace: Smalltalk }"
@@ -854,9 +854,9 @@
 
     idx := 1.
     s := WriteStream on:Unicode16String new.
-    [(word := self unsignedShortAt:idx) ~~ 0] whileTrue:[
-	s nextPut:(Character value:word).
-	idx := idx + 2.
+    [(word := self unsignedInt16At:idx) ~~ 0] whileTrue:[
+        s nextPut:(Character value:word).
+        idx := idx + 2.
     ].
     ^ s contents
 !
@@ -877,6 +877,7 @@
 
     RETURN(__MKEXTERNALADDRESS(__INST(address_)));
 %}.
+    self primitiveFailed
 !
 
 asExternalBytes