comments about obsoleted methods (xxxSize -> sizeofXXX)
authorClaus Gittinger <cg@exept.de>
Sun, 13 May 2018 20:32:55 +0200
changeset 22915 fe71dca059bf
parent 22914 1bb3760b2967
child 22916 ecf1255014d0
comments about obsoleted methods (xxxSize -> sizeofXXX)
ExternalAddress.st
--- a/ExternalAddress.st	Sun May 13 17:52:23 2018 +0200
+++ b/ExternalAddress.st	Sun May 13 20:32:55 2018 +0200
@@ -164,11 +164,15 @@
      therefore, queries like 
         'ExternalAddress pointerSize == 8'
      cost nothing; they are compiled in as a constant 
-     (and even conditionals are eliminated)."
+     (and even conditionals are eliminated).
+
+     obsolete now -> see ExternalBytes"
 
-%{ /* NOCONTEXT */
-    RETURN(__mkSmallInteger(sizeof(void *)));
-%}.
+    ^ ExternalBytes sizeofPointer
+
+"/ %{ /* NOCONTEXT */
+"/     RETURN(__mkSmallInteger(sizeof(void *)));
+"/ %}.
 
     "
      self pointerSize
@@ -190,11 +194,14 @@
 !
 
 uintSize
-    "answer the size in bytes of an unsigned int."
+    "answer the size in bytes of an unsigned int.
+     obsolete now -> see ExternalBytes"
 
-%{ /* NOCONTEXT */
-    RETURN(__mkSmallInteger(sizeof(unsigned int)));
-%}.
+    ^ExternalBytes sizeofInt
+
+"/ %{ /* NOCONTEXT */
+"/     RETURN(__mkSmallInteger(sizeof(unsigned int)));
+"/ %}.
 
     "
      self uintSize
@@ -202,11 +209,14 @@
 !
 
 ulongSize
-    "answer the size in bytes of an unsigned long."
+    "answer the size in bytes of an unsigned long.
+     obsolete now -> see ExternalBytes"
 
-%{ /* NOCONTEXT */
-    RETURN(__mkSmallInteger(sizeof(unsigned long)));
-%}.
+    ^ExternalBytes sizeofLong
+
+"/ %{ /* NOCONTEXT */
+"/     RETURN(__mkSmallInteger(sizeof(unsigned long)));
+"/ %}.
 
     "
      self ulongSize
@@ -214,11 +224,14 @@
 !
 
 ushortSize
-    "answer the size in bytes of an unsigned short."
+    "answer the size in bytes of an unsigned short.
+     obsolete now -> see ExternalBytes"
 
-%{ /* NOCONTEXT */
-    RETURN(__mkSmallInteger(sizeof(unsigned short)));
-%}.
+    ^ExternalBytes sizeofShort
+
+"/ %{ /* NOCONTEXT */
+"/     RETURN(__mkSmallInteger(sizeof(unsigned short)));
+"/ %}.
 
     "
      self ushortSize