#FEATURE by cg
class: ExternalAddress class
added:
#uintSize
#ulongSize
#ushortSize
--- a/ExternalAddress.st Tue May 08 23:05:03 2018 +0200
+++ b/ExternalAddress.st Tue May 08 23:16:38 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
@@ -192,6 +194,42 @@
"
"Created: / 15-11-2016 / 11:40:52 / cg"
+!
+
+uintSize
+ "answer the size in bytes of an unsigned int."
+
+%{ /* NOCONTEXT */
+ RETURN(__mkSmallInteger(sizeof(unsigned int)));
+%}.
+
+ "
+ self uintSize
+ "
+!
+
+ulongSize
+ "answer the size in bytes of an unsigned long."
+
+%{ /* NOCONTEXT */
+ RETURN(__mkSmallInteger(sizeof(unsigned long)));
+%}.
+
+ "
+ self ulongSize
+ "
+!
+
+ushortSize
+ "answer the size in bytes of an unsigned short."
+
+%{ /* NOCONTEXT */
+ RETURN(__mkSmallInteger(sizeof(unsigned short)));
+%}.
+
+ "
+ self ushortSize
+ "
! !
!ExternalAddress methodsFor:'Compatibility-Squeak'!