ExecutableFunction.st
branchjv
changeset 20579 9add81aadb7a
parent 19332 9686fae7951b
parent 20511 a23fe67b2d89
child 21024 8734987eb5c7
--- a/ExecutableFunction.st	Mon Oct 03 12:44:41 2016 +0100
+++ b/ExecutableFunction.st	Sun Oct 09 21:28:18 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
 	      All Rights Reserved
@@ -88,21 +90,22 @@
 
 code
     "return the code field. This is not an object but the address of the machine instructions. 
-     Therefore an integer representing the code-address is returned"
+     Therefore an externalAddress representing the code-address is returned"
 
 %{  /* NOCONTEXT */
     unsigned INT addr;
 
     if (__INST(code_) != nil) {
         
-        RETURN (__MKEXTERNALADDRESS(__INST(code_)));
 #ifdef OLD
+        // returned an integer in very old versions.
         addr = (unsigned INT)__INST(code_);
         if (addr <= _MAX_INT) {
             RETURN ( __mkSmallInteger(addr) );
         }
         RETURN ( __MKUINT(addr));
 #endif
+        RETURN (__MKEXTERNALADDRESS(__INST(code_)));
     }
 %}.
     ^ nil