ExternalAddress.st
changeset 22915 fe71dca059bf
parent 22902 d9b9356f6117
child 24057 4f47ef98d6ad
--- 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