Patches for ILU 2.0alpha12

Revised $Date: 1998/09/21 01:15:43 $ GMT

About Patches

Getting the "patch" program

The program "patch" is distributed from a number of places, and odds are you already have it on your system. If not, try ftp://gatekeeper.dec.com/pub/BSD/FreeBSD/FreeBSD-current/src/gnu/usr.bin/patch/ for the sources. On Windows platforms, there appears to be a version in the Win32 distribution of the GNU tools. There are several different UNIX versions of patch. Older versions won't be able to handle raw HTML as input, so you may want to upgrade if you have an old version. To check the version, try typing "patch -v" at a command line. If your patch program doesn't like that, or if the version printed out is less than 2.1, you will probably want to fetch the newer version and build it.

Applying a patch

To patch your sources, copy any patch listed below into a patch file. If you're going to apply more than one, apply them in order, and put each patch in a separate patch file. Then change your working directory to the top of the ILU source tree (ILUSRC), and use the command "patch -p0", (that's a zero) redirecting standard input to come from this file. For example, if you had put the ILU sources in /usr/local/ilu/src, and had put the patch in /usr/local/ilu/src/this-patch, you'd type
  % cd /usr/local/ilu/src
  % patch -p0 < /usr/local/ilu/src/this-patch
  [...various output from the patch program...]
  %
NOTE: On a fresh (unpatched) distribution, it usually works to just feed this entire patches.html file into the patch program, e.g. patch -l -p0 < patches.html
WARNING: copying these files from a browser may produce problems with some patches due to a conversion of tabs to spaces. If you have a patch application fail, try specifying the -l switch to patch. Also, when ftp'ing this page, use binary transfer. On Windows, some patches may be reported as malformed if you transfer the file in ascii mode. On UNIX, some patch versions may object to having carriage returns in the file, so if you observe problems, check to see that some intermediate step did not insert carriage returns.

Actual Patches


  • The default makefile for the GSS library includes an extra file, gss_opaque.c, which is not supplied. This patch removes the requirement to have that file.

    *** 1.3	1996/06/12 23:05:27
    --- GSS/kernel/makefile.default	1997/11/27 03:23:45
    ***************
    *** 1,6 ****
    --- 1,11 ----
      ## This is a hand-edited version of an automatically-generated Makefile.
      ## Edit at your peril!
      ##
    + ##########################################################################
    + #
    + #  The following should be changed to suit your machine and installation
    + #
    + ##########################################################################
      
        DESTDIR = /usr/local/lib
        CDEBUGFLAGS = -g
    ***************
    *** 12,17 ****
    --- 17,28 ----
        RM = rm -f
        SED = sed
      
    + ##########################################################################
    + #
    + #  Nothing below this should need to be changed
    + #
    + ##########################################################################
    + 
      ALL_INCLUDES = -I. $(LOCALINCLUDES) $(INCLUDES)
      ALL_DEFINES = $(STD_DEFINES) $(DEFINES) $(BSDDEFINE) $(POSIXDEFINE)
      CFLAGS = $(COMPILERFLAGS) $(CDEBUGFLAGS) $(ALL_INCLUDES) $(ALL_DEFINES)
    ***************
    *** 37,43 ****
      	$(RM) $@
      	$(ANSI_C_COMPILER) -c $(CFLAGS) $*.c
      
    ! GSSOBJS = gss_impl.o gss_util.o gss_opaque.o gss_oidtbl.o gss_asn1.o gss_debug.o nil_scheme.o gss_x500_ns.o rfc822_ns.o gss_ext.o anon_ns.o
      
      libgss.a:  $(GSSOBJS)
      	$(RM) $@
    --- 48,54 ----
      	$(RM) $@
      	$(ANSI_C_COMPILER) -c $(CFLAGS) $*.c
      
    ! GSSOBJS = gss_impl.o gss_util.o gss_oidtbl.o gss_asn1.o gss_debug.o nil_scheme.o gss_x500_ns.o rfc822_ns.o gss_ext.o anon_ns.o
      
      libgss.a:  $(GSSOBJS)
      	$(RM) $@
    

  • The Python runtime doesn't get comparisons right for iluRt.IluRecord and iluRt.Pickle, which only shows up with Python 1.5. This patch fixes that problem.

    *** 1.50	1997/11/19 05:20:54
    --- runtime/python/iluRt.py	1997/11/27 04:02:21
    ***************
    *** 118,127 ****
              return '<%s:%s>' % (self.__ilu_type_name__, self.__dict__)
      		
          def __cmp__(self, other):
    ! 	if (self.__dict__ < other.__dict__):
    ! 		return -1
    ! 	elif (self.__dict__ == other.__dict__):
    ! 		return 0
      	else:
      		return 1
      
    --- 118,130 ----
              return '<%s:%s>' % (self.__ilu_type_name__, self.__dict__)
      		
          def __cmp__(self, other):
    !         if (type(self) == type(other)):
    ! 		if (self.__dict__ < other.__dict__):
    ! 			return -1
    ! 		elif (self.__dict__ == other.__dict__):
    ! 			return 0
    ! 		else:
    ! 			return 1
      	else:
      		return 1
      
    ***************
    *** 245,254 ****
      				self.__typecode = typecode
      				self.__pickled_value = PickleValue(value[0], typecode.id())
      		def __cmp__(self, other):
    ! 			if (self.__pickled_value < other.__pickled_value):
    ! 				return -1
    ! 			elif (self.__pickled_value == other.__pickled_value):
    ! 				return 0
      			else:
      				return 1
      		def __str__(self):
    --- 248,260 ----
      				self.__typecode = typecode
      				self.__pickled_value = PickleValue(value[0], typecode.id())
      		def __cmp__(self, other):
    ! 			if (type(other) == type(self)):
    ! 				if (self.__pickled_value < other.__pickled_value):
    ! 					return -1
    ! 				elif (self.__pickled_value == other.__pickled_value):
    ! 					return 0
    ! 				else:
    ! 					return 1
      			else:
      				return 1
      		def __str__(self):
    

  • The Python runtime doesn't do RunMainLoop/ExitMainLoop pairs properly in threaded mode.
    Also, Tessa Lau noted that when compiling without DEBUGGING_ENABLED, the wrong error variable is referenced.

    *** 1.224	1997/11/25 22:18:42
    --- runtime/python/iluPrmodule.c	1997/12/12 21:36:21
    ***************
    *** 127,132 ****
    --- 127,135 ----
      
      static bootstrap_rock gc_alarm_rock = { cleanupUninterestingObjects, ILU_NIL };
      
    + static ilu_Mutex ilupython_MainLoopMutex = ILU_NIL;
    + static ilu_Condition ilupython_MainLoopCondition = ILU_NIL;
    + 
      #define current_thread_id() PyInt_FromLong(get_thread_ident())
      #endif /* ILU_PYTHON_THREADS */
      
    ***************
    *** 2571,2581 ****
      #ifdef ILU_PYTHON_THREADS
        if (ilupython_threaded_operation)
          {
    !       indicator->val = 0;
    !       while (!indicator->val)
    ! 	{
    ! 	  CALL_KERNEL(ilupython_threaded_operation, OS_SLEEP(30));
    ! 	}
          }
        else
      #endif /* ILU_PYTHON_THREADS */
    --- 2574,2596 ----
      #ifdef ILU_PYTHON_THREADS
        if (ilupython_threaded_operation)
          {
    !       ilu_AcquireMutex(ilupython_MainLoopMutex);
    !       while (!indicator->val) {
    ! 	CALL_KERNEL(ilupython_threaded_operation,
    ! 		    ilu_CMWait1(ilupython_MainLoopCondition, ilupython_MainLoopMutex, &lerr));
    ! 	if (ILU_ERRNOK(lerr))
    ! 	  {
    ! 	    char msg[256];
    ! 
    ! 	    sprintf(msg, "ILU internal error on "
    ! 		    "ilu_CMWait1(ilupython_MainLoopCondition, ilupython_MainLoopMutex):  %s",
    ! 		    ILU_ERR_NAME(lerr));
    ! 	    ILU_HANDLED(lerr);
    ! 	    PyErr_SetString(_ilupython_GeneralError, msg);
    ! 	    return 0;
    ! 	  }
    !       }
    !       ilu_ReleaseMutex(ilupython_MainLoopMutex);
          }
        else
      #endif /* ILU_PYTHON_THREADS */
    ***************
    *** 2604,2609 ****
    --- 2619,2625 ----
        ilumod_ExitMainLoop(PyObject *self, PyObject *args)
      {
        IlulpObject *indicator;
    +   ilu_Error lerr;
      
        if (!PyArg_Parse(args, "O", &indicator))
          return 0;
    ***************
    *** 2612,2618 ****
            PyErr_SetString(PyExc_TypeError, "arg1 should be ILU loop handle");
            return 0;
          }
    !   ilu_ExitMainLoop(&indicator->val);
        Py_INCREF(Py_None);
        return Py_None;
      }
    --- 2628,2648 ----
            PyErr_SetString(PyExc_TypeError, "arg1 should be ILU loop handle");
            return 0;
          }
    ! #ifdef ILU_PYTHON_THREADS
    !   if (ilupython_threaded_operation) {
    !     ilu_AcquireMutex(ilupython_MainLoopMutex);
    !     indicator->val = 1;
    !     ilu_ReleaseMutex(ilupython_MainLoopMutex);
    !     ilu_CondNotify (ilupython_MainLoopCondition, &lerr);
    !     if (ILU_ERRNOK(lerr)) {
    !       char buf[1000];
    !       _ilupython_formErrDescription (buf, &lerr);
    !       ilu_DebugPrintf ("ilu: Problem notifying main loop condition variable:  %s\n", buf);
    !       ILU_HANDLED(lerr);
    !     }
    !   } else
    ! #endif /* ILU_PYTHON_THREADS */
    !     ilu_ExitMainLoop(&indicator->val);
        Py_INCREF(Py_None);
        return Py_None;
      }
    ***************
    *** 7419,7429 ****
        PyDict_SetItemString(reset, "MaxSimultaneousConnections", PyInt_FromLong(MaxSimultaneousConnections));
        return reset;
      #else /* def ENABLE_DEBUGGING */
    !   PyErr_SetString(IluGeneralError, "Compiled without support for debugging");
        return 0;
      #endif /* def ENABLE_DEBUGGING */
      #else /* def TCPIP_TRANSPORT */
    !   PyErr_SetString(IluGeneralError, "TCP/IP support not configured in");
        return 0;  
      #endif /* TCPIP_TRANSPORT */
      }
    --- 7449,7459 ----
        PyDict_SetItemString(reset, "MaxSimultaneousConnections", PyInt_FromLong(MaxSimultaneousConnections));
        return reset;
      #else /* def ENABLE_DEBUGGING */
    !   PyErr_SetString(_ilupython_GeneralError, "Compiled without support for debugging");
        return 0;
      #endif /* def ENABLE_DEBUGGING */
      #else /* def TCPIP_TRANSPORT */
    !   PyErr_SetString(_ilupython_GeneralError, "TCP/IP support not configured in");
        return 0;  
      #endif /* TCPIP_TRANSPORT */
      }
    ***************
    *** 7439,7445 ****
        oldsize = ilu_tcp_SetDefaultBuffersize(size);
        return PyInt_FromLong(oldsize);
      #else
    !   PyErr_SetString(IluGeneralError, "TCP/IP support not configured in");
        return 0;  
      #endif /* TCPIP_TRANSPORT */
      }
    --- 7469,7475 ----
        oldsize = ilu_tcp_SetDefaultBuffersize(size);
        return PyInt_FromLong(oldsize);
      #else
    !   PyErr_SetString(_ilupython_GeneralError, "TCP/IP support not configured in");
        return 0;  
      #endif /* TCPIP_TRANSPORT */
      }
    ***************
    *** 8043,8048 ****
    --- 8073,8093 ----
            sprintf(msg, "failed to initialize kernel threads: %s", ILU_ERR_NAME(err));
            ILU_HANDLED(err);
            
    +       PyErr_SetString(_ilupython_GeneralError, msg);
    +       return 0;
    +     }
    + 
    +   if ((ilupython_MainLoopMutex = ilu_CreateMutex("Python", "main loop")) == ILU_NIL)
    +     {
    +       PyErr_SetString(_ilupython_GeneralError, "failed to create ilupython_MainLoopMutex");
    +       return 0;
    +     }
    +   if (ilupython_MainLoopCondition = ilu_CreateCondition("Python", "main loop", &err), ILU_ERRNOK(err))
    +     {
    +       char msg[1000];
    +       strcpy (msg, "failed to create ilupython_MainLoopCondition:  ");
    +       _ilupython_formErrDescription(msg + strlen(msg), &err);
    +       ILU_HANDLED(err);
            PyErr_SetString(_ilupython_GeneralError, msg);
            return 0;
          }
    

  • This patch covers two things. First, an internal consistency check in call.c was wrong, leading to bogus internal errors and consistency check failures. Second, several foul-ups in the way errors are propagated within the kernel, and through the C runtime, to the application were discovered and fixed.

    *** 1.18	1997/11/26 20:00:50
    --- runtime/c/ilucstub.h	1997/12/03 07:07:30
    ***************
    *** 274,281 ****
      ILU_RUNTIME_PUBLIC void * _ILU_C_Enumeration__Input (ilu_Call, void *, ilu_Error *);
      ILU_RUNTIME_PUBLIC void _ILU_C_Enumeration__Output (ilu_Call, void *, ilu_Error *);
      
      /* Main invariant holds */
    ! ILU_RUNTIME_PUBLIC void		_ILU_C_SetProtocolError (CORBA_Environment *, ilu_ProtocolException, ilu_Error *);
      
      /* Main invariant holds */
      ILU_RUNTIME_PUBLIC ilu_boolean	_ILU_C_CheckSibling (ILU_C_Object *disc,
    --- 274,296 ----
      ILU_RUNTIME_PUBLIC void * _ILU_C_Enumeration__Input (ilu_Call, void *, ilu_Error *);
      ILU_RUNTIME_PUBLIC void _ILU_C_Enumeration__Output (ilu_Call, void *, ilu_Error *);
      
    + ILU_RUNTIME_PUBLIC ilu_cardinal _ILU_C_SizeExtensibleRecord (ilu_Call, void *, ilu_Error *);
    + ILU_RUNTIME_PUBLIC void _ILU_C_OutputExtensibleRecord (ilu_Call, void *, ilu_Error *);
    + ILU_RUNTIME_PUBLIC void _ILU_C_InputExtensibleRecord (ilu_Call, void **, ilu_Error *);
    + 
      /* Main invariant holds */
    ! ILU_RUNTIME_PUBLIC void 
    ! _ILU_C_SetProtocolError(CORBA_Environment *,
    ! 			ilu_ProtocolException);
    ! /*
    !  * Set the given CORBA_Environment to indicate the system exception
    !  * corresponding to the given ilu_ProtocolException, if appropriate.
    !  * It's not appropriate exactly when the given ilu_ProtocolException
    !  * is either ilu_ProtocolException_Success or
    !  * ilu_ProtocolException_Not; in the latter case it's the caller's
    !  * responsiblity to get the information from the corresponding
    !  * ilu_Error into the CORBA_Environment.
    !  */
      
      /* Main invariant holds */
      ILU_RUNTIME_PUBLIC ilu_boolean	_ILU_C_CheckSibling (ILU_C_Object *disc,
    *** 1.206	1997/11/26 20:00:50
    --- runtime/c/ilu.c	1997/12/03 07:07:28
    ***************
    *** 3066,3071 ****
    --- 3066,3077 ----
        return (p-str);
      }
      
    + /*
    +  * (*status) and (*err) are OUT parameters.  Returns with (*status)
    +  * ready for a call on CORBA_exception_free.  When (*err) indicates
    +  * an error, it's local and (*status) isn't all the thrower wanted
    +  * it to be.
    +  */
      /*Main Invariant, Call-IHi(call)*/
      static          ilu_boolean
      _ILU_C_CatchException(ilu_Call call, ilu_Method method,
    ***************
    *** 3092,3097 ****
    --- 3098,3104 ----
          status->_major = ILU_C_USER_EXCEPTION;
          status->returnCode = ((ILU_C_ExceptionCode)
      		   method->me_exceptionVector[exceptionIndex - 1]);
    +     status->freeRoutine = 0;
          valsize = evec[exceptionIndex - 1].size;
          if (valsize > 0) {
            status->ptr = (void *) ilu_MallocE(valsize, err);
    ***************
    *** 3108,3113 ****
    --- 3115,3123 ----
            if (ILU_ERRNOK(*err))
      	return ilu_FALSE;
            status->freeRoutine = evec[exceptionIndex - 1].freeFn;
    +     } else {
    +       status->ptr = ILU_NIL;
    +       ILU_CLER(*err);
          }
        }
        return ilu_TRUE;
    ***************
    *** 3314,3322 ****
        ILU_C_ImplicitArgs	ia;
        ILU_C_InterruptHandle intH = ILU_NIL;
        ILU_C_COMPLETIONSTATUS completed = CORBA_COMPLETED_NO;
    !   ilu_ProtocolException protocolErr;
      
    !   ILU_CLER(err);
      
        if ((ia = _ILU_C_CurrentContext()) != ILU_NIL) {
          si = ia->ilu_serializer;
    --- 3324,3332 ----
        ILU_C_ImplicitArgs	ia;
        ILU_C_InterruptHandle intH = ILU_NIL;
        ILU_C_COMPLETIONSTATUS completed = CORBA_COMPLETED_NO;
    !   ilu_ProtocolException protocolErr = ilu_ProtocolException_Success;
      
    !   ILU_C_SET_SUCCESSFUL(status);
      
        if ((ia = _ILU_C_CurrentContext()) != ILU_NIL) {
          si = ia->ilu_serializer;
    ***************
    *** 3325,3331 ****
        };
          
        (void) ilu_FullStartCall(call, discriminant->server->ilucs_ks, class,
    ! 			   method, MyLangIdx(), pp, si, pl, &newconn, &err);
        if (newconn != ILU_NIL)
          (*Fork) (MonitorOutgoingConnection, newconn);
        if (ILU_ERRNOK(err))
    --- 3335,3342 ----
        };
          
        (void) ilu_FullStartCall(call, discriminant->server->ilucs_ks, class,
    ! 			   method, MyLangIdx(), pp, si, pl, &newconn,
    ! 			   &err);
        if (newconn != ILU_NIL)
          (*Fork) (MonitorOutgoingConnection, newconn);
        if (ILU_ERRNOK(err))
    ***************
    *** 3334,3343 ****
        if (intH != ILU_NIL)
          if (!AddCallToIH(call, intH)) {
            ILU_C_RAISE_SYSTEM(status, NO_MEMORY, 0, NO);
    !       goto cerr;
          }
      
        do { /* call until we don't get a transient/retry error */
      
          needs_sizing = ilu_CallNeedsSizing(call);
      
    --- 3345,3355 ----
        if (intH != ILU_NIL)
          if (!AddCallToIH(call, intH)) {
            ILU_C_RAISE_SYSTEM(status, NO_MEMORY, 0, NO);
    !       goto SErr;
          }
      
        do { /* call until we don't get a transient/retry error */
    +     /* (*status) is success, (err) is success, (p..Err) is Success */
      
          needs_sizing = ilu_CallNeedsSizing(call);
      
    ***************
    *** 3347,3359 ****
          else {
            if ((kobj = _ILU_C_KernelObjOfObj(discriminant)) == ILU_NIL) {
      	ILU_C_RAISE_SYSTEM(status, INV_OBJREF, 0, NO);
    ! 	goto cerr;
            }
            size = ilu_SizeOfObjectID(call, kobj, ilu_TRUE, class, &err);
            ilu_ExitServer(discriminant->server->ilucs_ks,
      		     ilu_ClassOfObject(kobj));
            if (ILU_ERRNOK(err))
    ! 	goto kerr;
          }
      
          if (needs_sizing) {
    --- 3359,3371 ----
          else {
            if ((kobj = _ILU_C_KernelObjOfObj(discriminant)) == ILU_NIL) {
      	ILU_C_RAISE_SYSTEM(status, INV_OBJREF, 0, NO);
    ! 	goto SErr;
            }
            size = ilu_SizeOfObjectID(call, kobj, ilu_TRUE, class, &err);
            ilu_ExitServer(discriminant->server->ilucs_ks,
      		     ilu_ClassOfObject(kobj));
            if (ILU_ERRNOK(err))
    ! 	goto KErr;
          }
      
          if (needs_sizing) {
    ***************
    *** 3361,3377 ****
      	if (parms[i].parm_in) {
      	  if (parms[i].parm_needs_dereference)
      	    size += _ILU_C_SizeOfValue (parms[i].parm_type, call,
    ! 					*((void **) parms[i].parm_val), &err);
      	  else
      	    size += _ILU_C_SizeOfValue (parms[i].parm_type, call,
      					parms[i].parm_val, &err);
    ! 	  if (ILU_ERRNOK(err)) goto kerr;
      	}
            }
          }
      
          if (!ilu_StartRequest(call, size, &err))
    !       goto kerr;
      
          /* marshall discriminant */
      
    --- 3373,3390 ----
      	if (parms[i].parm_in) {
      	  if (parms[i].parm_needs_dereference)
      	    size += _ILU_C_SizeOfValue (parms[i].parm_type, call,
    ! 					*((void **) parms[i].parm_val),
    ! 					&err);
      	  else
      	    size += _ILU_C_SizeOfValue (parms[i].parm_type, call,
      					parms[i].parm_val, &err);
    ! 	  if (ILU_ERRNOK(err)) goto KErr;
      	}
            }
          }
      
          if (!ilu_StartRequest(call, size, &err))
    !       goto KErr;
      
          /* marshall discriminant */
      
    ***************
    *** 3380,3390 ****
      	if ((kobj = _ILU_C_KernelObjOfObj (discriminant)) == ILU_NIL)
      	  {
      	    ILU_C_RAISE_SYSTEM(status, INV_OBJREF, 0, NO);
    ! 	    goto cerr;
      	  }
      	ilu_OutputObjectID(call, kobj, ilu_TRUE, class, &err);
      	if (ILU_ERRNOK(err))
    ! 	  goto kerr;
            }
        
          /* marshall other arguments */
    --- 3393,3403 ----
      	if ((kobj = _ILU_C_KernelObjOfObj (discriminant)) == ILU_NIL)
      	  {
      	    ILU_C_RAISE_SYSTEM(status, INV_OBJREF, 0, NO);
    ! 	    goto SErr;
      	  }
      	ilu_OutputObjectID(call, kobj, ilu_TRUE, class, &err);
      	if (ILU_ERRNOK(err))
    ! 	  goto KErr;
            }
        
          /* marshall other arguments */
    ***************
    *** 3397,3410 ****
      	else
      	  _ILU_C_OutputValue (parms[i].parm_type, call,
      			      parms[i].parm_val, &err);
    ! 	if (ILU_ERRNOK(err)) goto kerr;
            }
          }
      
          /* finish the request */
      
          completed = CORBA_COMPLETED_MAYBE;
    !     if (!ilu_FinishRequest (call, &err)) goto kerr;
      
          /* is there a reply? */
      
    --- 3410,3423 ----
      	else
      	  _ILU_C_OutputValue (parms[i].parm_type, call,
      			      parms[i].parm_val, &err);
    ! 	if (ILU_ERRNOK(err)) goto KErr;
            }
          }
      
          /* finish the request */
      
          completed = CORBA_COMPLETED_MAYBE;
    !     if (!ilu_FinishRequest (call, &err)) goto KErr;
      
          /* is there a reply? */
      
    ***************
    *** 3418,3482 ****
      	   (err.ilu_type == ILU_ERRTYP(transient)) &&
      	   (ILU_ERRSEL(transient,err).minor == ilu_tm_retry));
      
    !   if (! method->me_asynchronous) {
    !     if (protocolErr == ilu_ProtocolException_Success)
    !       {
    ! 	completed = CORBA_COMPLETED_YES;
    ! 	/* check to see if the user signalled Success (exceptionIndex == 0) */
    ! 	if (i == 0)		/* i is the exception index.  A value of 0 means "no exception". */
    ! 	  {
    ! 	    status->returnCode = ILU_NIL;
    ! 	    status->_major = ILU_C_NO_EXCEPTION;
    ! 
    ! 	    /* read in any return results */
    ! 
    ! 	    for (i = 0;  i < nparms;  i++) {
    ! 	      if (parms[i].parm_out) {
    ! 		if (parms[i].parm_in && (parms[i].parm_type->freeFn != 0)) {
    ! 		  (*parms[i].parm_type->freeFn)(parms[i].parm_val);
    ! 		}
    ! 		if (parms[i].parm_needs_assignment)
    ! 		  *((void **)(parms[i].parm_val)) =
    ! 		    _ILU_C_InputValue (parms[i].parm_type, call,
    ! 				       ILU_NIL, &err);
    ! 		else
    ! 		  _ILU_C_InputValue (parms[i].parm_type, call,
    ! 				     parms[i].parm_val, &err);
    ! 		if (ILU_ERRNOK(err)) goto kerr;
    ! 	      }
      	    }
    ! 	  }
    ! 
    ! 	else
    ! 	  /* indicates user signalled an expected exception */
    ! 	  {
    ! 	    if (!_ILU_C_CatchException(call, method, evec, status, i, &err))
    ! 	      goto kerr;
      	  }
    ! 	if (!ilu_ReplyRead (call, &err))
    ! 	  goto kerr;
    !       }
    !     else
            {
    ! 	_ILU_C_SetProtocolError (status, protocolErr, &err);
    ! 	goto cerr;
            }
    !   };
      
    !  cerr:	/* used for errors signalled via "status" */
      
        ilu_FinishCall(call, &err);
        goto the_end;
      
    !  kerr:		/* used for errors signalled via "err" */
    ! 
    !   {
    !     ilu_Error lerr = err;
    !     ilu_FinishCall (call, &lerr);
    !     ILU_HANDLED(lerr);
    !     if (ILU_ERROK(err))
    !       goto the_end;
    !   }
      
       kerrWithoutCall:
      
    --- 3431,3509 ----
      	   (err.ilu_type == ILU_ERRTYP(transient)) &&
      	   (ILU_ERRSEL(transient,err).minor == ilu_tm_retry));
      
    !   /** (*status) is success;
    !       (err) is failure iff (p..Err) is .._Not;
    !       asynch => ((err) is success && (p..Err) is Success) */
    !   if (!method->me_asynchronous) {
    !     if (protocolErr == ilu_ProtocolException_Success) {
    !       completed = CORBA_COMPLETED_YES;
    !       /*
    !        * check to see if the user signalled Success (exceptionIndex
    !        * == 0)
    !        */
    !       if (i == 0) {		/* i is the exception index.  A
    ! 				 * value of 0 means "no exception". */
    ! 	status->returnCode = ILU_NIL;
    ! 	status->_major = ILU_C_NO_EXCEPTION;
    ! 
    ! 	/* read in any return results */
    ! 
    ! 	for (i = 0; i < nparms; i++) {
    ! 	  if (parms[i].parm_out) {
    ! 	    if (parms[i].parm_in && (parms[i].parm_type->freeFn != 0)) {
    ! 	      (*parms[i].parm_type->freeFn) (parms[i].parm_val);
      	    }
    ! 	    if (parms[i].parm_needs_assignment)
    ! 	      *((void **) (parms[i].parm_val)) =
    ! 		_ILU_C_InputValue(parms[i].parm_type, call,
    ! 				  ILU_NIL, &err);
    ! 	    else
    ! 	      _ILU_C_InputValue(parms[i].parm_type, call,
    ! 				parms[i].parm_val, &err);
    ! 	    if (ILU_ERRNOK(err))
    ! 	      goto KErr;
      	  }
    ! 	}
    !       } else
    ! 	/* indicates user signalled an expected exception */
            {
    ! 	if (!_ILU_C_CatchException(call, method, evec, status, i, &err))
    ! 	  goto KSErr;
            }
    !       /* (*status) is from callee; err is success; p..Err is Success */
    !       if (!ilu_ReplyRead(call, &err))
    ! 	goto KSErr;
    !     } else {
    !       /** (*status) is success;
    ! 	  protocolErr is not .._Success;
    ! 	  (err) is local failure iff protocolErr is .._Not */
    !       _ILU_C_SetProtocolError(status, protocolErr);
    !       /* (*status) is callee's; (err) is local; p..Err is irrelevant */
    !       goto KSErr;
    !     }
    !   } else {
    !     /* (*status) is success; (err) is success; (p..Err) is Success */
    !   }
    !   goto KSErr;
      
    !  KErr: /* (*status) is success; err is local exn; p..Err is irrelevant */
    !  KSErr: /* (*status) is from callee; err is local; p..Err is irrelevant */
      
        ilu_FinishCall(call, &err);
    +   if (ILU_ERRNOK(err)) {
    +     CORBA_exception_free(status);
    +     _ILU_C_ConvertError(status, &err, completed);
    +   }
        goto the_end;
      
    !  SErr: /* (*status) is local exn; err is success; p..Err is irrelevant */
    !  
    !   ilu_FinishCall(call, &err);
    !   if (ILU_C_SUCCESSFUL(status))
    !     _ILU_C_ConvertError(status, &err, completed);
    !   else
    !     ILU_HANDLED(err);
    !   goto the_end;
      
       kerrWithoutCall:
      
    ***************
    *** 3528,3538 ****
      		      ilu_Error *err)
      {
        ilu_string type_id;
    !   CORBA_TypeCode tc;
      
    !   type_id = ilu_PickleType (p, err);
    !   if (ILU_ERRNOK(*err)) return ILU_NIL;
    !   tc = _ILU_C_LookupIoFns(type_id);
        if (tc == ILU_NIL) {	/* this type unknown in this LSR */
          ILU_CLER(*err);
          any->_type = ILU_NIL;
    --- 3555,3588 ----
      		      ilu_Error *err)
      {
        ilu_string type_id;
    !   CORBA_TypeCode tc = ILU_NIL;
    !   ilu_TypeKind tk;
    !   ilu_string *types = ILU_NIL;
    !   ilu_cardinal ntypes, i;
      
    !   tk = ilu_PickleTypeKind(p, err);
    !   if (ILU_ERRNOK(*err)) {
    !     ILU_HANDLED(*err);
    !     tk = ilu_byte_tk;
    !   };
    !   if ((tk == ilu_record_tk) || (tk == ilu_object_tk)) {
    !     if (!ilu_PickleTypes (p, &types, &ntypes, err))
    !       return ILU_NIL;
    !   } else {
    !     type_id = ilu_PickleType (p, err);
    !     if (ILU_ERRNOK(*err)) return ILU_NIL;
    !     types = &type_id;
    !     ntypes = 1;
    !   }
    !   for (i = 0;  i < ntypes;  i++) {
    !     if ((tc = _ILU_C_LookupIoFns(types[i])) != ILU_NIL)
    !       break;
    !   };
    !   if ((tk == ilu_record_tk) || (tk == ilu_object_tk)) {
    !     for (i = 0;  i < ntypes;  i++)
    !       ilu_free(types[i]);
    !     ilu_free(types);
    !   }
        if (tc == ILU_NIL) {	/* this type unknown in this LSR */
          ILU_CLER(*err);
          any->_type = ILU_NIL;
    ***************
    *** 3810,3815 ****
    --- 3860,3924 ----
      CORBA_any* CORBA_any_alloc ()
      {
        return ((CORBA_any*) CORBA_sequence_CORBA_any_allocbuf(1));
    + }
    + 
    + ilu_cardinal
    +   _ILU_C_SizeExtensibleRecord (ilu_Call call, void *val, ilu_Error *err)
    + {
    + #ifndef ADD_TYPE_REGISTRATION_SUPPORT
    +   ilu_DebugPrintf("** Use of extensible records requires configuration of support for type registration,\n"
    + 		  "** which this ILU C LSR library doesn't have!\n");
    + #else
    +   struct dummy { ILU_C_IoFnsRegistration __type; };
    +   CORBA_any temp;
    +   temp._type = (CORBA_TypeCode) ((struct dummy *) val)->__type;
    +   temp._value = val;
    +   return (_CORBA_any__SizeOf(call, &temp, err));
    + #endif /* ndef ADD_TYPE_REGISTRATION_SUPPORT */
    + }
    + 
    + void
    +   _ILU_C_OutputExtensibleRecord (ilu_Call call, void *val, ilu_Error *err)
    + {
    + #ifndef ADD_TYPE_REGISTRATION_SUPPORT
    +   ilu_DebugPrintf("** Use of extensible records requires configuration of support for type registration,\n"
    + 		  "** which this ILU C LSR library doesn't have!\n");
    + #else
    +   struct dummy { ILU_C_IoFnsRegistration __type; };
    +   CORBA_any temp;
    +   temp._type = (CORBA_TypeCode) ((struct dummy *) val)->__type;
    +   temp._value = val;
    +   _CORBA_any__Output(call, &temp, err);
    + #endif /* ndef ADD_TYPE_REGISTRATION_SUPPORT */
    + }
    + 
    + void
    +   _ILU_C_InputExtensibleRecord (ilu_Call call, void **val, ilu_Error *err)
    + {
    + #ifndef ADD_TYPE_REGISTRATION_SUPPORT
    +   ilu_DebugPrintf("** Use of extensible records requires configuration of support for type registration,\n"
    + 		  "** which this ILU C LSR library doesn't have!\n");
    + #else
    +   CORBA_any temp;
    +   ilu_string *type_ids = ILU_NIL;
    +   ilu_cardinal n_type_ids, i;
    +   void *tempval;
    + 
    +   ilu_boolean autounpickling;
    +   autounpickling = ILU_C_AutomaticUnpickling;
    +   ILU_C_AutomaticUnpickling = ilu_FALSE;
    +   _CORBA_any__Input(call, &temp, err);
    +   ILU_C_AutomaticUnpickling = autounpickling;
    +   if (ILU_ERRNOK(*err)) return;
    +   /* Check subtype relationship... */
    +   _ILU_C_PickleToAny (temp._pickle, &temp, err);
    +   if (ILU_ERRNOK(*err)) {
    +     CORBA_any__Free(&temp);
    +     return;
    +   };
    +   *val = temp._value;
    +   ILU_CLER(*err);
    + #endif /* ndef ADD_TYPE_REGISTRATION_SUPPORT */
      }
      
      #endif /* ADD_VARIANT_SUPPORT */
    *** 1.40	1997/11/21 03:14:28
    --- runtime/c/orb.c	1997/12/03 07:03:55
    ***************
    *** 19,27 ****
      
      #include 
      
      #include "ilucpvt.h"
      
    ! void _ILU_C_SetProtocolError (CORBA_Environment *status, ilu_ProtocolException perror, ilu_Error * err)
      {
        CORBA_ex_body *eb = ilu_must_malloc(sizeof(CORBA_ex_body));
        status->_major = CORBA_SYSTEM_EXCEPTION;
    --- 19,27 ----
      
      #include 
      
      #include "ilucpvt.h"
      
    ! void _ILU_C_SetProtocolError (CORBA_Environment *status, ilu_ProtocolException perror)
      {
        CORBA_ex_body *eb = ilu_must_malloc(sizeof(CORBA_ex_body));
        status->_major = CORBA_SYSTEM_EXCEPTION;
    ***************
    *** 64,92 ****
            ((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE;
            break;
      
    ! 	case ilu_ProtocolException_Not:
    ! 		/* xxx should really cover more cases here */
    ! 		ILU_ERR_SWITCH(*err) {
    ! 			ILU_SUCCESS_CASE {
    ! 				/* hmmm very strange */
    ! 				status->returnCode = ex_CORBA_UNKNOWN;
    ! 				((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE;
    ! 			}
    ! 			ILU_ERR_CASE(inv_objref, v) {
    ! 				status->returnCode = ex_CORBA_INV_OBJREF;
    ! 				eb->minor = (ILU_ERRSEL(inv_objref, *err).minor);
    ! 			}
    ! 			ILU_ERR_ELSE {
    ! 				status->returnCode = ex_CORBA_UNKNOWN;
    ! 				((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE;
    ! 			}
    ! 		}
    ! 		ILU_ERR_ENDSWITCH;
    ! 		ILU_HANDLED(*err);
    ! 		ILU_CLER(*err);
    ! 		break;
      
          default:
            break;
      
          }
    --- 64,75 ----
            ((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE;
            break;
      
    !     case ilu_ProtocolException_Not:
    !       break;
      
          default:
    +       status->returnCode = ex_CORBA_UNKNOWN;
    +       ((CORBA_ex_body *)(status->ptr))->completed = CORBA_COMPLETED_MAYBE;
            break;
      
          }
    *** 1.230	1997/11/25 04:50:05
    --- runtime/kernel/call.c	1997/12/03 06:55:03
    ***************
    *** 32,43 ****
    --- 32,57 ----
      #include "server.h"
      #include "type.h"
      
    + #if 1
    + 
    + #define ILU_WaitRem(call)					\
    +   (call->ca_disownWait						\
    +    ? (call->ca_connection && call->ca_connection->co_waiting	\
    +       && call->ca_connection->co_waiting != call)		\
    +    : ((call->ca_ms==ilu_cmsHi && call->ca_msInput && !call->ca_dontWait)\
    +       == (call->ca_connection					\
    + 	  && call->ca_connection->co_waiting == call)))
    + 
    + #else
    + 
      #define ILU_WaitRem(call) \
        ((call->ca_connection && call->ca_connection->co_waiting==call) \
         == \
         (call->ca_disownWait || \
          (call->ca_ms==ilu_cmsHi && call->ca_msInput && !call->ca_dontWait)))
      
    + #endif
    + 
      /*L1, L2 unconstrained*/
      
      const char     *const ilu_PENames[ilu_ProtocolException_Not + 1] = {
    ***************
    *** 654,660 ****
          ILU_ERR_ELSE
            0 /* statement with no effect */ ;
        } ILU_ERR_ENDSWITCH;
    !   _ilu_Assert(ILU_WaitRem(call), "ilu_FinishCall locking wrt wait");
        s = call_server(call);
        conn = call_connection(call);
        proto = conn ? connection_protocol(conn) : NIL;
    --- 668,676 ----
          ILU_ERR_ELSE
            0 /* statement with no effect */ ;
        } ILU_ERR_ENDSWITCH;
    !   /* (*err) may indicate incoming error; lerr = success */
    !   _ilu_Assert(closeconn || ILU_WaitRem(call),
    ! 	      "ilu_FinishCall locking wrt wait");
        s = call_server(call);
        conn = call_connection(call);
        proto = conn ? connection_protocol(conn) : NIL;
    ***************
    *** 695,702 ****
        }
        /** L2 >= {call's conn's callmu, iomu};
            L2 >= {waitmu} iff ca_disownWait || ca_msInput && !ca_dontWait */
        if (closeconn)
    !     _ilu_CloseIoingConnection(conn, TRUE, ilu_ConnShutdownReason_LostProtocolSync);
        else {
          if (call->ca_ios == ilu_ciosNone &&
      	(!call_incoming(call) ||
    --- 711,720 ----
        }
        /** L2 >= {call's conn's callmu, iomu};
            L2 >= {waitmu} iff ca_disownWait || ca_msInput && !ca_dontWait */
    +   /* (*err) may indicate incoming error; lerr = success */
        if (closeconn)
    !     _ilu_CloseIoingConnection(conn, TRUE,
    ! 			  ilu_ConnShutdownReason_LostProtocolSync);
        else {
          if (call->ca_ios == ilu_ciosNone &&
      	(!call_incoming(call) ||
    ***************
    *** 722,727 ****
    --- 740,746 ----
            if (!ilu_Check(FALSE, &lerr))
      	goto dunX;
          }
    +     /* (*err) may indicate incoming error; lerr = success */
          if (call_incoming(call) &&
      	(call->ca_pe != ilu_ProtocolException_Success ||
      	 ILU_ERRNOK(*err))) {
    ***************
    *** 749,754 ****
    --- 768,774 ----
      	goto dunX;
          }
      dunX:
    +     /* (*err) and lerr may each have error; (*err) has priority. */
          if (!ilu_ReEnterMutex(ilu_cmu, err))
            return;
          if (!_ilu_EnterServerMutex(s, TRUE, err))
    ***************
    *** 758,787 ****
            *err = lerr;
          else
            ILU_HANDLED(lerr);
          ILU_ERR_SWITCH(*err) {
            ILU_SUCCESS_CASE
      	0 /* no effect */ ;
            ILU_ERR_CASE(comm_failure, v)
    ! 	_ilu_CloseIoingConnection(conn, TRUE, ilu_ConnShutdownReason_LostProtocolSync);
            ILU_ERR_ELSE
      	0 /* no effect */ ;
          } ILU_ERR_ENDSWITCH;
        }
        if (proto != NIL && proto->pr_prefinish_call != NULLFN)
          (void) (*proto->pr_prefinish_call) (call, &lerr);
        if (!_ilu_ReleaseConnIO(conn, FALSE, &lerr))
          goto dun2;
      dun4:
        (void) _ilu_ReleaseConnCall(conn, call, FALSE, &lerr);
      dun3:
        if (call->ca_msInput && !call->ca_dontWait && !call->ca_disownWait)
          (void) _ilu_ReleaseConnWait(conn, call, FALSE, &lerr);
      dun2:
        si = call->ca_si;
        if (si) {
    !     if (ilu_Check(si->si_nCalls > 0, err))
            si->si_nCalls -= 1;
        }
        _ilu_MaybeFreeSerializer(si);
        if (call->ca_pl) {
          call->ca_pl->pl_nCalls -= 1;
    --- 778,821 ----
            *err = lerr;
          else
            ILU_HANDLED(lerr);
    +     /* (*err) may have error; lerr holds trash */
          ILU_ERR_SWITCH(*err) {
            ILU_SUCCESS_CASE
      	0 /* no effect */ ;
            ILU_ERR_CASE(comm_failure, v)
    ! 	_ilu_CloseIoingConnection(conn, TRUE,
    ! 			  ilu_ConnShutdownReason_LostProtocolSync);
            ILU_ERR_ELSE
      	0 /* no effect */ ;
          } ILU_ERR_ENDSWITCH;
        }
    +   /* (*err) may have error; lerr holds trash */
        if (proto != NIL && proto->pr_prefinish_call != NULLFN)
          (void) (*proto->pr_prefinish_call) (call, &lerr);
    +   /* (*err) and lerr may each have error; (*err) has priority. */
        if (!_ilu_ReleaseConnIO(conn, FALSE, &lerr))
          goto dun2;
      dun4:
    +   /* (*err) and lerr may each have error; (*err) has priority. */
        (void) _ilu_ReleaseConnCall(conn, call, FALSE, &lerr);
      dun3:
    +   /* (*err) and lerr may each have error; (*err) has priority. */
        if (call->ca_msInput && !call->ca_dontWait && !call->ca_disownWait)
          (void) _ilu_ReleaseConnWait(conn, call, FALSE, &lerr);
      dun2:
    +   /* (*err) and lerr may each have error; (*err) has priority. */
    +   if (ILU_ERROK(*err))
    +     *err = lerr;
    +   else
    +     ILU_HANDLED(lerr);
    +   ILU_CLER(lerr);
    +   /* (*err) may have error; lerr = success */
        si = call->ca_si;
        if (si) {
    !     if (ilu_Check(si->si_nCalls > 0, &lerr))
            si->si_nCalls -= 1;
        }
    +   /* (*err) and lerr may each have error; (*err) has priority. */
        _ilu_MaybeFreeSerializer(si);
        if (call->ca_pl) {
          call->ca_pl->pl_nCalls -= 1;
    ***************
    *** 792,799 ****
          conn->co_nCalls -= 1;
          if (conn->co_nCalls == 0)
            conn->co_pipeline = NIL;
    !     if (conn->co_doomed && conn->co_nCalls == 0 && ILU_ERROK(lerr)) {
    !       lerr = _ilu_CloseConnection(conn, ilu_ConnShutdownReason_Relocating);
          }
          rewatch = (!connection_closed(conn) && !connection_incoming(conn)
      	       && !_ilu_CanCondition() && conn->co_nOuts == 0);
    --- 826,834 ----
          conn->co_nCalls -= 1;
          if (conn->co_nCalls == 0)
            conn->co_pipeline = NIL;
    !     if (conn->co_doomed && conn->co_nCalls == 0 && ILU_ERROK(*err)) {
    !       lerr = _ilu_CloseConnection(conn,
    ! 				ilu_ConnShutdownReason_Relocating);
          }
          rewatch = (!connection_closed(conn) && !connection_incoming(conn)
      	       && !_ilu_CanCondition() && conn->co_nOuts == 0);
    ***************
    *** 801,818 ****
    --- 836,857 ----
        }
        (void) _ilu_ExitServerMutex(s, TRUE, &lerr);
      dun1:
    +   /* (*err) and lerr may each have error; (*err) has priority. */
        (void) ilu_ExitMutex(ilu_cmu, TRUE, &lerr);
      dun0:
    +   /* (*err) and lerr may each have error; (*err) has priority. */
        if (ILU_ERROK(*err))
          *err = lerr;
        else
          ILU_HANDLED(lerr);
    +   /* (*err) may have error; lerr holds trash */
        if (proto != NIL && proto->pr_finish_call != NULLFN)
          (void) (*proto->pr_finish_call) (call, &lerr);
        if (ILU_ERROK(*err))
          *err = lerr;
        else
          ILU_HANDLED(lerr);
    +   /* (*err) may have error; lerr holds trash */
        if (rewatch) {
          (void) ilu_SetConnectionInputHandler(conn, ReadExtraMsg, conn, &lerr);
          if (ILU_ERROK(*err))
    ***************
    *** 820,825 ****
    --- 859,865 ----
          else
            ILU_HANDLED(lerr);
        }
    +   /* (*err) may have error; lerr holds trash */
        if (call->ca_incoming && (call->ca_caller != NIL)) {
          ilu_DestroyPassport(call->ca_caller, &lerr);
          call->ca_caller = NIL;
    ***************
    *** 828,833 ****
    --- 868,874 ----
          else
            ILU_HANDLED(lerr);
        }
    +   /* (*err) may have error; lerr holds trash */
        return;
      }
      
    ***************
    *** 1336,1341 ****
    --- 1377,1383 ----
      		    server->sr_id, v->minor));
      	    closeit = TRUE;
      	    closeit_reason = ilu_ConnShutdownReason_LostProtocolSync;
    + 	    ILU_HANDLED(*err);
      	  }
      	  ILU_ERR_ELSE
      	    0 /* statement with no effect */ ;
    *** 1.98	1997/11/25 23:11:54
    --- runtime/kernel/connect.c	1997/12/03 06:56:56
    ***************
    *** 599,605 ****
      {
        ILU_ERRS((WrongLocks)) err;
        ilu_cardinal    ans;
    ! #ifdef HAVE_GETRLIMITo
        struct rlimit resourcelimit;
        /* restrict to no more than the processes current resource limit */
        if (! getrlimit(RLIMIT_NOFILE, &resourcelimit))
    --- 599,605 ----
      {
        ILU_ERRS((WrongLocks)) err;
        ilu_cardinal    ans;
    ! #ifdef HAVE_GETRLIMIT
        struct rlimit resourcelimit;
        /* restrict to no more than the processes current resource limit */
        if (! getrlimit(RLIMIT_NOFILE, &resourcelimit))
    ***************
    *** 809,829 ****
      {
        _ilu_HoldMutex(server_lock(conn->co_server));
        _ilu_HoldMutex(ilu_cmu);
    !   while (conn->co_ioing) {
          /*
           * We shouldn't actually get here unless the I/O mutex is held
           * by another thread, in which case the runtime should have
           * provided a wait-on-condition operation.  We could also get
           * here if the caller mistakenly holds the I/O mutex.
           */
    !     ILU_NOTE(LOCK_DEBUG,
    ! 	     ("EnterConnIO(%p) waiting.\n", conn));
    !     (void) ilu_CMWait2(conn->co_cc, server_lock(conn->co_server),
    ! 		       ilu_cmu, err);
    !     ILU_NOTE(LOCK_DEBUG,
    ! 	     ("EnterConnIO(%p) resuming.\n", conn));
    !     if (ILU_ERRNOK(*err))
    !       return FALSE;
        }
        ILU_NOTE(LOCK_DEBUG,
      	   ("EnterConnIO(%p) succeeds.\n", conn));
    --- 809,837 ----
      {
        _ilu_HoldMutex(server_lock(conn->co_server));
        _ilu_HoldMutex(ilu_cmu);
    !   if (conn->co_ioing) {
          /*
           * We shouldn't actually get here unless the I/O mutex is held
           * by another thread, in which case the runtime should have
           * provided a wait-on-condition operation.  We could also get
           * here if the caller mistakenly holds the I/O mutex.
           */
    !     if (!_ilu_CanCondition()) {
    !       if (hard)
    ! 	return ILU_ERR_CONS0(broken_locks, err, FALSE);
    !       else
    ! 	return ILU_ERR_CONS0(bad_locks, err, FALSE);
    !     }
    !     while (conn->co_ioing) {
    !       ILU_NOTE(LOCK_DEBUG,
    ! 	       ("EnterConnIO(%p) waiting.\n", conn));
    !       (void) ilu_CMWait2(conn->co_cc, server_lock(conn->co_server),
    ! 			 ilu_cmu, err);
    !       ILU_NOTE(LOCK_DEBUG,
    ! 	       ("EnterConnIO(%p) resuming.\n", conn));
    !       if (ILU_ERRNOK(*err))
    ! 	return FALSE;
    !     }
        }
        ILU_NOTE(LOCK_DEBUG,
      	   ("EnterConnIO(%p) succeeds.\n", conn));
    ***************
    *** 870,889 ****
      		  ILU_ERRS((bad_locks, broken_locks)) * err)
      {
        _ilu_HoldMutex(server_lock(conn->co_server));
    !   if (conn->co_mucall == call) {
          if (hard)
            return ILU_ERR_CONS0(broken_locks, err, FALSE);
          else
            return ILU_ERR_CONS0(bad_locks, err, FALSE);
        }
        while (conn->co_mucall) {
    -     /*
    -      * We shouldn't actually get here unless the call mutex is held
    -      * by another thread, in which case the runtime should have
    -      * provided a wait-on-condition operation.  We could also get
    -      * here if the caller mistakenly holds the call mutex on behalf
    -      * of a different call.
    -      */
          ILU_NOTE(LOCK_DEBUG,
      	     ("EnterConnCall(%p, %p) waits for %p\n",
      	      conn, call, conn->co_mucall));
    --- 878,891 ----
      		  ILU_ERRS((bad_locks, broken_locks)) * err)
      {
        _ilu_HoldMutex(server_lock(conn->co_server));
    !   if (conn->co_mucall == call ||
    !       (conn->co_mucall && !_ilu_CanCondition())) {
          if (hard)
            return ILU_ERR_CONS0(broken_locks, err, FALSE);
          else
            return ILU_ERR_CONS0(bad_locks, err, FALSE);
        }
        while (conn->co_mucall) {
          ILU_NOTE(LOCK_DEBUG,
      	     ("EnterConnCall(%p, %p) waits for %p\n",
      	      conn, call, conn->co_mucall));
    *** 1.6	1997/11/13 23:13:41
    --- runtime/kernel/batching.c	1997/12/02 00:37:29
    ***************
    *** 438,444 ****
      
        if (!si || !(server = si->si_server))
          return ILU_ERR_CONS1(bad_param, err, minor, ilu_bpm_duh, FALSE);
    !   if (!ilu_EnterServerMutex(server, TRUE, err))
          return FALSE;
        self = connection_transport(si->si_conn);
        if (transport_class(self) == &myclass) {
    --- 438,444 ----
      
        if (!si || !(server = si->si_server))
          return ILU_ERR_CONS1(bad_param, err, minor, ilu_bpm_duh, FALSE);
    !   if (!ilu_EnterServerMutex(server, FALSE, err))
          return FALSE;
        self = connection_transport(si->si_conn);
        if (transport_class(self) == &myclass) {
    *** 1.44	1997/08/29 16:15:01
    --- runtime/kernel/error.c	1997/12/02 21:42:29
    ***************
    *** 166,172 ****
       * Modifications to TransportClass to allow this.
       * Note that tr_flush_buffer now serves as end-of-message marker.
       * */
    ! /* Last edited by Mike Spreitzer August 29, 1997 9:05 am PDT */
      
      /* Standard error machinery, and defs of standard errors */
      
    --- 169,175 ----
       * Modifications to TransportClass to allow this.
       * Note that tr_flush_buffer now serves as end-of-message marker.
       * */
    ! /* Last edited by Mike Spreitzer December 2, 1997 1:41 pm PST */
      
      /* Standard error machinery, and defs of standard errors */
      
    ***************
    *** 241,247 ****
          }
          ILU_ERR_CASE(broken_locks, v) {
            *major = ILU_ERRTYP(internal) - ILU_ERRTYP(unknown);
    !       minor = ilu_im_broken + v->ignoreme * 0;
          }
          ILU_ERR_CASE(interrupted, v) {
            *major = ILU_ERRTYP(no_response) - ILU_ERRTYP(unknown);
    --- 244,250 ----
          }
          ILU_ERR_CASE(broken_locks, v) {
            *major = ILU_ERRTYP(internal) - ILU_ERRTYP(unknown);
    !       minor = ilu_im_brokenLocks + v->ignoreme * 0;
          }
          ILU_ERR_CASE(interrupted, v) {
            *major = ILU_ERRTYP(no_response) - ILU_ERRTYP(unknown);
    *** 1.213	1997/11/25 22:23:11
    --- runtime/kernel/iluntrnl.h	1997/12/02 22:39:47
    ***************
    *** 967,976 ****
      /*Main Invariant, L2 >= {conn's iomu}*/
      extern ilu_boolean 
      _ilu_CloseConnWithIo(ilu_Connection conn, ilu_boolean set_cfails,
    ! 		     ilu_ConnShutdownReason, ILU_ERRS((IoErrs)) *);
      /*
       * ... where kernel code guarantees that cmu, conn's server mutexes
    !  * not held.
       */
      
      /* L1 >= {conn's server}; L2 disjoint {conn's callmu, iomu} */
    --- 967,977 ----
      /*Main Invariant, L2 >= {conn's iomu}*/
      extern ilu_boolean 
      _ilu_CloseConnWithIo(ilu_Connection conn, ilu_boolean set_cfails,
    ! 		     ilu_ConnShutdownReason, ILU_ERRS((IoErrs)) *err);
      /*
       * ... where kernel code guarantees that cmu, conn's server mutexes
    !  * not held.  (*err) is left untouched on success, set on failure if
    !  * the failure is more pressing than (*err) indicated upon entry.
       */
      
      /* L1 >= {conn's server}; L2 disjoint {conn's callmu, iomu} */
    *** 1.302	1997/11/25 22:18:31
    --- runtime/kernel/iluxport.h	1997/12/02 01:11:24
    ***************
    *** 620,627 ****
      	ilu_EnterMutexWork(m,ilu_TRUE,err,__FILE__,__LINE__)
      /*
       * Blocks until acquisition succeeds or an error is raised.  On
    !  * success, returns TRUE without setting *err.  On failure returns
    !  * FALSE and raises broken_locks.
       */
      
      /* L1.sup < m before, L1.sup = m after */
    --- 620,628 ----
      	ilu_EnterMutexWork(m,ilu_TRUE,err,__FILE__,__LINE__)
      /*
       * Blocks until acquisition succeeds or an error is raised.  On
    !  * success, returns TRUE without touching (*err).  On failure returns
    !  * FALSE after calling ILU_HANDLED on the incoming (*err) and then
    !  * setting (*err) to broken_locks.
       */
      
      /* L1.sup < m before, L1.sup = m after */
    ***************
    *** 647,658 ****
    --- 648,672 ----
      
      #define ilu_EnterServerMutex(s,h,e) \
      	ilu_EnterServerMutexFull(s,h,e,__FILE__,__LINE__)
    + /* See comment below on err setting behavior. */
      
      ILU_PUBLIC      ilu_boolean
      ilu_EnterServerMutexFull(ilu_Server server, ilu_boolean hard,
      			 ILU_ERRS((bad_locks, broken_locks,
      				   internal)) * err,
      			 char *filename, int lineno);
    + /*
    +  * Blocks until acquisition succeeds or an error is raised.  Returns
    +  * TRUE upon success, FALSE upon failure.  (*err) is an INOUT
    +  * parameter if (hard), an OUT parameter if (!hard).  If (!hard),
    +  * (*err) is always set apropriately for a kernel call.  If (hard),
    +  * (*err) is left untouched in the success case, and in the failure
    +  * case either: (a) (*err) indicated success upon entry and this
    +  * proc sets it to indicate failure upon return, (b) this proc calls
    +  * ILU_HANDLED(*err) and then sets (*err) to broken_locks, or (c)
    +  * (*err) indicated a problem upon entry and this proc leaves it
    +  * unchanged.
    +  */
      
      #define ilu_ExitServerMutex(s,h,e) \
      	ilu_ExitServerMutexFull(s,h,e,__FILE__,__LINE__)
    *** 1.47	1997/11/25 01:00:30
    --- runtime/kernel/locks.c	1997/12/02 01:11:16
    ***************
    *** 270,278 ****
            ILU_CLER(*err);
          return TRUE;
        }
    !   if (hard)
          ILU_ERR_FULLCONS0(broken_locks, err, 0, file, line);
    !   else
          ILU_ERR_SWITCH(lerr) {
          ILU_ERR_CASE(bad_param, v)
            ILU_ERR_FULLCONS1(internal, err, minor, ilu_im_inv_mutex, 0,
    --- 270,279 ----
            ILU_CLER(*err);
          return TRUE;
        }
    !   if (hard) {
    !     ILU_HANDLED(*err);
          ILU_ERR_FULLCONS0(broken_locks, err, 0, file, line);
    !   } else
          ILU_ERR_SWITCH(lerr) {
          ILU_ERR_CASE(bad_param, v)
            ILU_ERR_FULLCONS1(internal, err, minor, ilu_im_inv_mutex, 0,
    *** 1.88	1997/11/26 02:22:43
    --- runtime/kernel/server.c	1997/12/02 01:11:18
    ***************
    *** 766,783 ****
      			 char *filename, int lineno)
      {
        ilu_boolean     ans;
    !   if (!ilu_Check(server &&
    ! 		 ((server->sr_true
    ! 		   && (server_ports(server) || server->sr_local_port
    ! 		       || server->sr_closedPorts.pl_next))
    ! 		  || server->sr_connHead.next
    ! 		  || server->sr_closedConns.next
    ! 		  || server->sr_holds
    ! 		  || (server->sr_objs &&
    ! 		      ilu_hash_PairsInTable(server->sr_objs))
    ! 		  || HasLSS(server)),
    ! 		 err))
          return FALSE;
        ans = ilu_EnterMutexWork(server_lock(server), hard, err,
      			   filename, lineno);
        if (ans && ilu_check_PortsStayClosed && server->sr_true) {
    --- 766,785 ----
      			 char *filename, int lineno)
      {
        ilu_boolean     ans;
    !   if (!(server &&
    ! 	((server->sr_true
    ! 	  && (server_ports(server) || server->sr_local_port
    ! 	      || server->sr_closedPorts.pl_next))
    ! 	 || server->sr_connHead.next
    ! 	 || server->sr_closedConns.next
    ! 	 || server->sr_holds
    ! 	 || (server->sr_objs &&
    ! 	     ilu_hash_PairsInTable(server->sr_objs))
    ! 	 || HasLSS(server)))) {
    !     if (ILU_ERROK(*err))
    !       (void) ilu_Check(FALSE, err);
          return FALSE;
    +   }
        ans = ilu_EnterMutexWork(server_lock(server), hard, err,
      			   filename, lineno);
        if (ans && ilu_check_PortsStayClosed && server->sr_true) {
    

  • The java stubber didn't implement union branches which were pickles. This patch implements that feature.

    *** 1.17	1997/11/10 21:35:33
    --- stubbers/java/genopt.c	1997/12/04 01:22:22
    ***************
    *** 200,205 ****
    --- 200,206 ----
              case record_Type:
              case sequence_Type:
              case union_Type:
    +         case pickle_Type:
                  return cat5( "((", typeDeclarator(t), ")", name, ")");
                   
              case invalid_Type:
    ***************
    *** 207,213 ****
              case void_Type:
                  fatal("bad type in fromObject"); break;
      
    -         case pickle_Type:
              case pipe_Type:
              default:
                  break;
    --- 208,213 ----
    ***************
    *** 253,258 ****
    --- 253,259 ----
              case record_Type:
              case sequence_Type:
              case union_Type:
    +         case pickle_Type:
                  return name;
                   
              case invalid_Type:
    ***************
    *** 261,267 ****
                  fatal("bad type in toObject"); 
                  break;
                  
    -         case pickle_Type:
              case pipe_Type:
              default:
                  break;
    --- 262,267 ----
    
    

  • In the Guile runtime, sbh-to-object called the wrong internal procedure.

    *** 1.4	1997/11/25 21:43:14
    --- runtime/guile/ilu-scm.c	1997/12/04 20:35:44
    ***************
    *** 786,806 ****
        ILU_ERRS((bad_locks, broken_locks, inv_objref, no_memory, internal)) lerr;
        ilu_string sbh = iluguile_scheme_to_value(string, _sbh);  /* tmp_string */
        ilu_Class c = iluguile_scheme_to_ptr(ilu_Class, _c);
    !   ilu_Object obj;
        SCM o;
      
    !   obj = ilu_ObjectOfSBH(sbh, c, &lerr);
        iluguile_prefer_success(&lerr);
    !   if (obj == NULL)
          return scheme_False;
      
        /* now Inside(obj->server, c) */
    !   o = (SCM)ilu_GetLanguageSpecificObject(obj, iluguile_scheme_lang_idx());
      
    !   if (o == scheme_False)
    !     o = iluguile_object_create_from_registry(ilu_ClassOfObject(obj), obj);
    ! 
    !   ilu_ExitServer(ilu_ServerOfObject(obj), c);
      
        return o;
      }
    --- 786,804 ----
        ILU_ERRS((bad_locks, broken_locks, inv_objref, no_memory, internal)) lerr;
        ilu_string sbh = iluguile_scheme_to_value(string, _sbh);  /* tmp_string */
        ilu_Class c = iluguile_scheme_to_ptr(ilu_Class, _c);
    !   ilu_Object kobj;
        SCM o;
      
    !   kobj = ilu_ObjectOfSBH(sbh, c, &lerr);
        iluguile_prefer_success(&lerr);
    !   if (kobj == NULL)
          return scheme_False;
      
        /* now Inside(obj->server, c) */
    !   if ((o = iluguile_get_language_specific_object(kobj)) == scheme_False)
    !     o = iluguile_object_create_from_registry(ilu_ClassOfObject(kobj), kobj);
      
    !   ilu_ExitServer(ilu_ServerOfObject(kobj), c);
      
        return o;
      }
    

  • Thanks to Jody Winston for a fix to the Python stubber which properly quotes the Python form of single quote characters appearing in ISL brands and doc strings.

    *** 1.81	1997/11/01 03:56:17
    --- stubbers/python/genstub.c	1997/12/06 01:43:27
    ***************
    *** 340,348 ****
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', (",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  type_uid(t));
        for (i = 0;  i < list_size(fields);  i++) {
          field = list_ref(fields, i);
    --- 340,348 ----
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', (",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  type_uid(t));
        for (i = 0;  i < list_size(fields);  i++) {
          field = list_ref(fields, i);
    ***************
    *** 507,515 ****
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', (",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  type_uid(t));
        for (i = 0;  i < list_size(fields);  i++) {
          field = list_ref(fields, i);
    --- 507,515 ----
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', (",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  type_uid(t));
        for (i = 0;  i < list_size(fields);  i++) {
          field = list_ref(fields, i);
    ***************
    *** 732,740 ****
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf(", %s%s%s, '%s', ",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  type_uid(t));
        printf ("'%s', %s.TypeKind_%s, %lu, %d, (",
      	  type_uid(type_description(t)->structuredDes.uniond.discriminator_type),
    --- 732,740 ----
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf(", %s%s%s, '%s', ",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  type_uid(t));
        printf ("'%s', %s.TypeKind_%s, %lu, %d, (",
      	  type_uid(type_description(t)->structuredDes.uniond.discriminator_type),
    ***************
    *** 932,940 ****
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', ",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  type_uid(t));
        printf ("'%s', (",
      	  type_uid(type_description(t)->structuredDes.array.type));
    --- 932,940 ----
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', ",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  type_uid(t));
        printf ("'%s', (",
      	  type_uid(type_description(t)->structuredDes.array.type));
    ***************
    *** 1042,1050 ****
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', ",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  type_uid(t));
        printf ("'%s', %lu)\n",
      	  type_uid(type_description(t)->structuredDes.sequence.type),
    --- 1042,1050 ----
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', ",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  type_uid(t));
        printf ("'%s', %lu)\n",
      	  type_uid(type_description(t)->structuredDes.sequence.type),
    ***************
    *** 1083,1091 ****
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', ",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  type_uid(t));
        printf ("'%s')\n", type_uid(ur_type(t)));
      #endif /* IIOP_PROTOCOL */
    --- 1083,1091 ----
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', ",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  type_uid(t));
        printf ("'%s')\n", type_uid(ur_type(t)));
      #endif /* IIOP_PROTOCOL */
    ***************
    *** 1159,1167 ****
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', '%s')\n",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "'",
      	  type_uid(t), type_uid(type_description(t)->structuredDes.optional));
      #endif /* IIOP_PROTOCOL */
        stRegisterIoFuncs(t);
    --- 1159,1167 ----
      	  getTypeName(t), nameModuleIlu);
        printNameScopes(t->scoping);
        printf (", %s%s%s, '%s', '%s')\n",
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	  (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	  type_uid(t), type_uid(type_description(t)->structuredDes.optional));
      #endif /* IIOP_PROTOCOL */
        stRegisterIoFuncs(t);
    ***************
    *** 1565,1576 ****
        printf(", ");
        printNameScopes(t->scoping);
        printf(", %s%s%s, %s%s%s)\n",
    ! 	 (type_interface(t)->brand == NULL) ? "" : "'",
      	 (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	 (type_interface(t)->brand == NULL) ? "" : "'",
    ! 	 (co->doc_string == NULL) ? "" : "'",
      	 (co->doc_string == NULL) ? "None" : co->doc_string,
    ! 	 (co->doc_string == NULL) ? "" : "'");
      }
      
      static void
    --- 1565,1576 ----
        printf(", ");
        printNameScopes(t->scoping);
        printf(", %s%s%s, %s%s%s)\n",
    ! 	 (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
      	 (type_interface(t)->brand == NULL) ? "None" : type_interface(t)->brand,
    ! 	 (type_interface(t)->brand == NULL) ? "" : "\"\"\"",
    ! 	 (co->doc_string == NULL) ? "" : "\"\"\"",
      	 (co->doc_string == NULL) ? "None" : co->doc_string,
    ! 	 (co->doc_string == NULL) ? "" : "\"\"\"");
      }
      
      static void
    

  • There's a problem with the names of the pickle marshalling routines used in the Lisp macro expansion of constructed types which have pickle-valued fields, noted by Joachim Achtzehnter. This patch fixes that problem, and also adds Lisp support for ILU custom surrogates.

    *** 1.107	1997/11/08 03:21:35
    --- runtime/lisp/ilu.lisp	1997/12/06 01:52:31
    ***************
    *** 167,173 ****
    --- 167,177 ----
      (defvar *ilu-to-lisp-class-table* (make-hash-table) "KEY is kernel class record, VALUE is CLOS class")
      (defvar *lisp-to-ilu-class-table* (make-hash-table) "KEY is CLOS class, VALUE is ILU kernel class record")
      (defvar *exception-repository-ids* (make-hash-table :test 'equal) "KEY is CORBA repository ID string, VALUE is lisp condition name")
    + (defvar *custom-surrogate-table* (make-hash-table) "KEY is standard CLOS class, VALUE is custom CLOS class")
      
    + (defun register-custom-surrogate (standard-class custom-class)
    +   (setf (gethash (find-class standard-class) *custom-surrogate-table*) custom-class))
    + 
      (defvar *ilu-initialized* nil "t if the ILU kernel has been initialized")
      
      (defvar *version* nil "set to string determining the current version of ILU")
    ***************
    *** 318,326 ****
      ;; before: Inside(server,class)
      ;; after:  Main invariant holds
      (defun ilu-object->instance (class kernel-obj class-record)
    !   (let ((lisp-obj (language-specific-object kernel-obj)))
          (unless lisp-obj
    !       (setq lisp-obj (make-instance class)) 
            (setf (language-specific-object kernel-obj) lisp-obj)
            (setf (ilu-server lisp-obj) (ilu_ilu-server kernel-obj))
            (setf (ilu-class lisp-obj) (ilu_ilu-class kernel-obj))
    --- 322,331 ----
      ;; before: Inside(server,class)
      ;; after:  Main invariant holds
      (defun ilu-object->instance (class kernel-obj class-record)
    !   (let ((lisp-obj (language-specific-object kernel-obj))
    ! 	(class-to-use (or (gethash class *custom-surrogate-table*) class)))
          (unless lisp-obj
    !       (setq lisp-obj (make-instance class-to-use))
            (setf (language-specific-object kernel-obj) lisp-obj)
            (setf (ilu-server lisp-obj) (ilu_ilu-server kernel-obj))
            (setf (ilu-class lisp-obj) (ilu_ilu-class kernel-obj))
    ***************
    *** 700,720 ****
      	  value)))))
      
      #+ilu-pickle
    ! (defun |PICKLE-size| (call value)
        (byte-sequence-size call (pickle-bytes value) 0))
      
      #+ilu-pickle
    ! (defun |PICKLE-write| (call value)
        (byte-sequence-write call (pickle-bytes value) 0))
      
      #+ilu-pickle
    ! (defun |PICKLE-read| (call)
        (let ((bytes (byte-sequence-read call 0)))
          (make-instance 'pickle :bytes bytes)))
      
      #+ilu-pickle
      (add-type (ilulisp_get-primitive-type-uid "pickle")
    ! 	  'pickle #'|PICKLE-size| #'|PICKLE-write| #'|PICKLE-read|)
      
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;;
    --- 705,725 ----
      	  value)))))
      
      #+ilu-pickle
    ! (defun pickle-size (call value)
        (byte-sequence-size call (pickle-bytes value) 0))
      
      #+ilu-pickle
    ! (defun pickle-write (call value)
        (byte-sequence-write call (pickle-bytes value) 0))
      
      #+ilu-pickle
    ! (defun pickle-read (call)
        (let ((bytes (byte-sequence-read call 0)))
          (make-instance 'pickle :bytes bytes)))
      
      #+ilu-pickle
      (add-type (ilulisp_get-primitive-type-uid "pickle")
    ! 	  'pickle #'pickle-size #'pickle-write #'pickle-read)
      
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;;
    *** 1.24	1997/07/11 02:03:02
    --- runtime/lisp/ilu-def-package.lisp	1997/12/04 04:35:10
    ***************
    *** 68,73 ****
    --- 68,74 ----
         :find-ilu-class-name
         :find-ilu-class-id
         :*caller-identity*
    +    :register-custom-surrogate
         
         :language-specific-object	;; (ilu-object) => lisp-object (setf-able)
         :object-of-sbh		;; (string-binding-handle) => ilu-object
    

  • The Java stubber used to generated multiple identical methods for mixins. This patch fixes that problem.

    *** 1.63	1997/11/12 00:54:34
    --- stubbers/java/genobj.c	1997/12/06 01:03:26
    ***************
    *** 44,49 ****
    --- 44,115 ----
      }
      
      
    + PRIVATE boolean list_insert_onceonly(
    +     list l, 
    +     refany new_element
    +     )
    + /* inserts new_element into list, only if it is not yet included.
    +  * returns TRUE if newly inserted.
    +  */
    + {
    +     refany old = list_find(l, matchPointer, new_element);
    +     if (old) {
    +         return FALSE;
    +     } else {
    +         list_insert(l, new_element);
    +         return TRUE;
    +     } 
    + }
    + 
    + typedef struct {
    +     refany clientrock;
    +     iluparser_EnumProc clientproc;
    +     list classesSeen;
    + } RockType_enumerateSuperClasses;
    + 
    + 
    + PRIVATE void 
    + enumProc_enumerateSuperClasses(Type t, RockType_enumerateSuperClasses* myRock)
    + {
    +     Class c = class_object(t);
    +     if (list_insert_onceonly(myRock->classesSeen, c)) {
    +         list_enumerate(c->superclasses, 
    +             (EnumProc) enumProc_enumerateSuperClasses, myRock);
    +         myRock->clientproc(t, myRock->clientrock);
    +     }
    + }
    + 
    + PRIVATE void 
    + enumerateSuperClasses(
    +     Type t, 
    +     iluparser_EnumProc proc, /*where element=superclass, is a Type*/
    +     refany rock,
    +     boolean recurse,
    +     boolean self
    +     )
    + {
    +     Class c = class_object(t);
    +     if (self) {
    +         proc(t, rock);
    +     }
    +     if (c->superclasses==0) {
    +         return;
    +     } else if (recurse) {
    +         RockType_enumerateSuperClasses* myRock;
    +         myRock = iluparser_Malloc(sizeof(RockType_enumerateSuperClasses));
    +         myRock->clientrock = rock;
    +         myRock->clientproc = proc;
    +         myRock->classesSeen = new_list();
    +         list_enumerate(c->superclasses, 
    +             (iluparser_EnumProc) enumProc_enumerateSuperClasses, 
    +             myRock
    +             );
    +     } else {
    +         list_enumerate(c->superclasses, proc, rock);
    +     }
    + }
    + 
    + 
      PUBLIC boolean obj_is_a(Type t) {
          TypeKind kind;
          t = myUrType(t);
    ***************
    *** 727,744 ****
      
      
      PRIVATE void
    ! printSuperClassMethodStubs(Type t, void * x)
    ! /* Defines the class methods for all the superclasses
    !  * t is the type of the object whose superclasses are being
    !  * considered. 
       * Reuses static stub from superclass.
       */
      {
          Class c = class_object(t);
    !     list_enumerate(c->superclasses, 
    !         (EnumProc) printSuperClassMethodStubs, 0);
    !     list_enumerate(c->methods, 
    !         (EnumProc) printSuperClassMethodStub1, 0);
      }
      
      
    --- 793,805 ----
      
      
      PRIVATE void
    ! printSuperClassMethodStubs1(Type t, ObjRockType* rock)
    ! /* Defines the class methods for this particular superclasses
       * Reuses static stub from superclass.
       */
      {
          Class c = class_object(t);
    !     list_enumerate(c->methods, (EnumProc) printSuperClassMethodStub1, 0);
      }
      
      
    ***************
    *** 818,832 ****
      
      
      PRIVATE void
    ! printSuperClassRefs(Type t, void *refany)
      /* for the reference class definition */
      {
    -     Class c = class_object(t);
    -     /* There is no real need to recurse, except that
    -      * it makes the generated java code easier to read
    -      */
    -     list_enumerate(c->superclasses, 
    -             (EnumProc) printSuperClassRefs, refany);
          printf(", %s", obj_typeDeclarator(t));
      }
      
    --- 879,890 ----
      
      
      PRIVATE void
    ! printSuperClassRef(Type t, void* x)
      /* for the reference class definition */
    + /* There is no real need to include all classes recursively, except that
    +  * it makes the generated java code easier to read
    +  */
      {
          printf(", %s", obj_typeDeclarator(t));
      }
      
    ***************
    *** 842,849 ****
          if (c->doc_string) printDocString("", c->doc_string);
          printf("public interface %s ", refTypeName);
          printf("extends xerox.ilu.IluObject");
    !     list_enumerate(c->superclasses,
    !             (EnumProc) printSuperClassRefs, 0);
          printf(" {\n");
          generateNestedConstants(ih, easyShortTypeNameCleaned(t));
          list_enumerate(c->methods, (EnumProc) printSignatureForOperations, 0);
    --- 900,906 ----
          if (c->doc_string) printDocString("", c->doc_string);
          printf("public interface %s ", refTypeName);
          printf("extends xerox.ilu.IluObject");
    !     enumerateSuperClasses(t, (EnumProc) printSuperClassRef, 0, TRUE, FALSE);
          printf(" {\n");
          generateNestedConstants(ih, easyShortTypeNameCleaned(t));
          list_enumerate(c->methods, (EnumProc) printSignatureForOperations, 0);
    ***************
    *** 860,877 ****
      
      
      PRIVATE void
    ! printSuperDelegationStubs(Type t, void * x)
    ! /* Defines the class methods for all the superclasses
    !  * t is the type of the object whose superclasses are being
    !  * considered. 
       * Reuses static stub from superclass.
       */
      {
          Class c = class_object(t);
    !     list_enumerate(c->superclasses, 
    !         (EnumProc) printSuperDelegationStubs, 0);
    !     list_enumerate(c->methods, 
    !         (EnumProc) printDelegationStub, 0);
      }
      
      
    --- 917,929 ----
      
      
      PRIVATE void
    ! printSuperDelegationStub1(Type t, ObjRockType* rock)
    ! /* Defines the class methods for this class (superclass)
       * Reuses static stub from superclass.
       */
      {
          Class c = class_object(t);
    !     list_enumerate(c->methods, (EnumProc) printDelegationStub, 0);
      }
      
      
    ***************
    *** 909,916 ****
              printf("        this._internal = _internal;\n");
              printf("    }\n\n");
          }
    !     list_enumerate(c->methods, (EnumProc) printDelegationStub, rock);
    !     list_enumerate(c->superclasses, (EnumProc) printSuperDelegationStubs, t);
          printf("} //%s\n\n", classShortName);
      }
      
    --- 961,969 ----
              printf("        this._internal = _internal;\n");
              printf("    }\n\n");
          }
    !     enumerateSuperClasses(t, 
    !         (EnumProc) printSuperDelegationStub1, rock, TRUE, TRUE
    !         );
          printf("} //%s\n\n", classShortName);
      }
      
    ***************
    *** 1048,1054 ****
          printf("  }//static\n\n");
      
          list_enumerate(c->methods, (EnumProc) printMethodStub, rock);
    !     list_enumerate(c->superclasses, (EnumProc) printSuperClassMethodStubs, t);
          printf("    public static void registerTrueObject(\n");
          printf("        java.lang.String _ih,\n");
          printf("        %s%s _tob,\n", 
    --- 1101,1109 ----
          printf("  }//static\n\n");
      
          list_enumerate(c->methods, (EnumProc) printMethodStub, rock);
    !     enumerateSuperClasses(t, 
    !         (EnumProc) printSuperClassMethodStubs1, rock, TRUE, FALSE
    !         );
          printf("    public static void registerTrueObject(\n");
          printf("        java.lang.String _ih,\n");
          printf("        %s%s _tob,\n", 
     
    

  • The tutorial examples break when generating code from the IDL instead of the ISL, because the IDL isn't garbage-collected. The following patch for the C tutorial checks to see which of the two was used, and compensates. Note that this still allows leaks of the calculator objects, in the IDL case.

    *** 1.1	1995/01/31 06:31:23
    --- examples/tutorial/Factory-impl.c	1997/12/09 00:16:02
    ***************
    *** 4,9 ****
    --- 4,12 ----
       * types and function prototypes.
       */
      
    + #include 
    + #include 
    + 
      #include 
      
      /* Code for the Factory object type */
    ***************
    *** 15,19 ****
        Tutorial_Factory self,
        ILU_C_ENVIRONMENT *env)
      {
    !   return (Create_Tutorial_Calculator());
      }
    --- 18,55 ----
        Tutorial_Factory self,
        ILU_C_ENVIRONMENT *env)
      {
    !   Tutorial_Calculator newcalc;
    ! 
    !   /* We want this to `work' either with non-GC'ed OMG IDL, or with GC'ed
    !      ILU ISL.  To do that, we look at the class to see whether we used
    !      OMG IDL, in which case we inherited from ilu.CORBA-Object, and can't
    !      use GC, or used ILU ISL, in which case we didn't inherit from
    !      ilu.CORBA-Object, and can use GC to clean up after ourselves.
    !      We only need to make this check once, so we use a Static boolean
    !      flag to tell us whether we need to make the check. */
    ! 
    !   static ilu_boolean initialized = ilu_FALSE;
    !   static ilu_boolean using_omg_idl = ilu_FALSE;
    ! 
    !   if (! initialized) {
    !     using_omg_idl = ilu_IsSubObjectType(Tutorial_Calculator__MSType, ilu_CORBA_Object__MSType);
    !     initialized = ilu_TRUE;
    !   }
    ! 
    !   newcalc = Create_Tutorial_Calculator();
    ! 
    !   if (using_omg_idl) {
    !     /* Not using normal ILU GC.  So increment the reference count
    !        so that the object will still be around later... */
    !     CORBA_Environment status;
    !     CORBA_Object_duplicate(newcalc, &status);
    !     if (!ILU_C_SUCCESSFUL(&status)) {
    !       fprintf (stderr, "Couldn't duplicate Tutorial.Calculator instance!  Error %s.\n",
    ! 	       CORBA_exception_id(&status));
    !       CORBA_exception_free(&status);
    !       exit(1);
    !     }
    !   }
    ! 
    !   return (newcalc);
      }
    *** 1.1	1995/02/07 02:18:23
    --- examples/tutorial/Factory2-impl.c	1997/12/09 00:39:44
    ***************
    *** 4,22 ****
       * types and function prototypes.
       */
      
      #include 
      
      /* Code for the Factory object type */
      
      extern Tutorial2_TapeCalculator Create_Tutorial2_TapeCalculator(void);
      
      Tutorial_Calculator server_Tutorial2_Factory_CreateCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env)
      {
    !   return ((Tutorial_Calculator) Create_Tutorial2_TapeCalculator());
      }
      
      Tutorial2_TapeCalculator server_Tutorial2_Factory_CreateTapeCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env)
      {
    !   return (Create_Tutorial2_TapeCalculator());
      }
      
    --- 4,64 ----
       * types and function prototypes.
       */
      
    + #include 
    + #include 
    + 
      #include 
      
      /* Code for the Factory object type */
      
      extern Tutorial2_TapeCalculator Create_Tutorial2_TapeCalculator(void);
      
    + static Tutorial2_TapeCalculator
    +   NewTapeCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env)
    + {
    +   Tutorial2_TapeCalculator newcalc;
    + 
    +   /* We want this to `work' either with non-GC'ed OMG IDL, or with GC'ed
    +      ILU ISL.  To do that, we look at the class to see whether we used
    +      OMG IDL, in which case we inherited from ilu.CORBA-Object, and can't
    +      use GC, or used ILU ISL, in which case we didn't inherit from
    +      ilu.CORBA-Object, and can use GC to clean up after ourselves.
    +      We only need to make this check once, so we use a Static boolean
    +      flag to tell us whether we need to make the check. */
    + 
    +   static ilu_boolean initialized = ilu_FALSE;
    +   static ilu_boolean using_omg_idl = ilu_FALSE;
    + 
    +   if (! initialized) {
    +     using_omg_idl = ilu_IsSubObjectType(Tutorial2_TapeCalculator__MSType, ilu_CORBA_Object__MSType);
    +     initialized = ilu_TRUE;
    +   }
    + 
    +   newcalc = Create_Tutorial2_TapeCalculator();
    + 
    +   if (using_omg_idl) {
    +     /* Not using normal ILU GC.  So increment the reference count
    +        so that the object will still be around later... */
    +     CORBA_Environment status;
    +     CORBA_Object_duplicate(newcalc, &status);
    +     if (!ILU_C_SUCCESSFUL(&status)) {
    +       fprintf (stderr, "Couldn't duplicate Tutorial2.TapeCalculator instance!  Error %s.\n",
    + 	       CORBA_exception_id(&status));
    +       CORBA_exception_free(&status);
    +       exit(1);
    +     }
    +   }
    + 
    +   return (newcalc);
    + }
    + 
      Tutorial_Calculator server_Tutorial2_Factory_CreateCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env)
      {
    !   return ((Tutorial_Calculator) NewTapeCalculator(f, env));
      }
      
      Tutorial2_TapeCalculator server_Tutorial2_Factory_CreateTapeCalculator (Tutorial2_Factory f, ILU_C_ENVIRONMENT *env)
      {
    !   return (NewTapeCalculator(f, env));
      }
      
    

  • An error in InputObjectID in the IIOP implementation isn't propogated properly.

    *** 1.167	1997/11/25 22:19:10
    --- runtime/kernel/iiop.c	1997/12/10 03:23:31
    ***************
    *** 1959,1968 ****
      	    foundclass = ilu_FindClassFromID(mstid);
      	  if (h == NIL)
      	    h = _ilu_FindOrCreateObject (ih, s, foundclass,
    ! 					 static_type, mstid, NIL, &lerr);
      	  ilu_free(ih);
      	  ilu_free(mstid);
    ! 	  if (ILU_ERRNOK(lerr))
      	    return NIL;
      	}
            if (h == NIL)
    --- 1959,1968 ----
      	    foundclass = ilu_FindClassFromID(mstid);
      	  if (h == NIL)
      	    h = _ilu_FindOrCreateObject (ih, s, foundclass,
    ! 					 static_type, mstid, NIL, err);
      	  ilu_free(ih);
      	  ilu_free(mstid);
    ! 	  if (ILU_ERRNOK(*err))
      	    return NIL;
      	}
            if (h == NIL)
    

  • The java stubber did generate wrong package names for certain standard types when parsing idl. There was a disagreement between parser and stubber how to designate absence of scoping information. This patch to the stubber makes it recognize both schemes used in the two parsers, the isl parser and the idl parser.
    It also fixes a bad initialization of context information for the global context.
    Furthermore, there was a problem with anonymous types (in IDL) where the generated class name and the package name were the same. This is not allowed in Java.
    The patch is a workaround rather then a real fix: The patch generates functional Java stubs; packages for types local to idl structs are renamed analogous to packages for idl types local to idl interfaces. However the stubs do not completely comply to the omg standard as it generates extra files which are not standard. Client code does not need to be aware of the extra files, so at least source compatibility with the standard is achieved.

    *** 1.68        1997/11/12 23:09:17
    --- stubbers/java/name.c        1997/12/18 02:35:28
    ***************
    *** 390,399 ****
      {
          string s;
          if (scoping) {
    !         s = javaizeString((char *) list_last(scoping));
    !     } else {
    !         s = unscopedNameFromName(n);
    !     }
          return s;
      }
      
    --- 390,399 ----
      {
          string s;
          if (scoping) {
    !         s = (char *) list_last(scoping);
    !         if (s) {return javaizeString(s);} 
    !     } 
    !     s = unscopedNameFromName(n);
          return s;
      }
      
    *** 1.18        1997/11/12 23:09:17
    --- stubbers/java/context.c     1997/12/18 02:35:27
    ***************
    *** 132,138 ****
      {
          IHandle ih = getContextRoot();
          listElement *ptr;
    !     if (scoping==0) {
              if (ifc==0) {
                  return getContextC(0);
              }
    --- 132,138 ----
      {
          IHandle ih = getContextRoot();
          listElement *ptr;
    !     if ((scoping==0) || (scoping->head==0)) {
              if (ifc==0) {
                  return getContextC(0);
              }
    ***************
    *** 179,185 ****
          IHandle ih = getContextRoot();
          if (name==0) {
              if (emptyNameContext==0) {
    !             ih = newChild(ih);
              }
              return emptyNameContext;
          }
    --- 179,185 ----
          IHandle ih = getContextRoot();
          if (name==0) {
              if (emptyNameContext==0) {
    !             emptyNameContext = newChild(ih);
              }
              return emptyNameContext;
          }
    *** 1.55        1997/11/12 00:54:34
    --- stubbers/java/isl2java.c    1997/12/18 02:35:28
    ***************
    *** 180,185 ****
    --- 180,186 ----
          LOOP_BEGIN(ifc->types, Type, t, temp)
              if (t->description) {
                  switch (t->description->type) {
    +                 case record_Type: 
                      case object_Type:
                          {
                              char* baseName = easyShortTypeNameCleaned(t);
    

  • Two fixes to the java runtime to support linux on RedHat. (Contributed by Daniel Veillard.)

    *** 1.20	1997/09/11 18:02:58
    --- runtime/java/IluJava_IluInit.c	1997/12/20 18:26:25
    ***************
    *** 87,93 ****
           * because we trust that in ilu all read and write are 
           * non blocking 
           */
    ! #if (defined(__sgi) || defined(__SGI) || defined(__FreeBSD__))
      
      #include 
      
    --- 87,93 ----
           * because we trust that in ilu all read and write are 
           * non blocking 
           */
    ! #if (defined(__sgi) || defined(__SGI) || defined(__FreeBSD__) || defined(linux))
      
      #include 
      
    ***************
    *** 117,124 ****
    --- 117,130 ----
          #else
          void *handle = dlopen("libc.so", RTLD_LAZY);
          #endif
    +   #if (defined(linux))
    +     /* as reported for RedHat 4.2 based on libc version 5 */
    +     _ilujava_read = (My_ReadProc) dlsym(handle, "__libc_read");
    +     _ilujava_write = (My_WriteProc) dlsym(handle, "__libc_write");
    +   #else
          _ilujava_read = (My_ReadProc) dlsym(handle, "_read");
          _ilujava_write = (My_WriteProc) dlsym(handle, "_write");
    +   #endif
          ilu_SetRecvSendProcs(&_ilujava_recv, &_ilujava_send);
      }
      
    *** 1.13	1997/11/07 17:07:17
    --- runtime/java/IluJava_JTypes.h	1997/12/20 18:27:40
    ***************
    *** 59,69 ****
        
      #else
      
    !   #define Jint long
    !       /* surprize... but javah says long */ 
        #define Jshort short
    !   #define Jboolean long
            /* surprize... but javah says long */ 
        #define Jbyte char
        #define Jlong int64_t
        #define Jfloat float
    --- 59,80 ----
        
      #else
      
    !  #if (defined(linux))
    !    #define Jint int32_t
    !  #else
    !    #define Jint long
    !        /* surprize... but javah says long */ 
    !  #endif
    !  
        #define Jshort short
    !   
    !  #if (defined(linux))
    !    #define Jboolean int32_t
    !  #else
    !    #define Jboolean long
            /* surprize... but javah says long */ 
    +  #endif
    +  
        #define Jbyte char
        #define Jlong int64_t
        #define Jfloat float
    
    

  • The function "do_test" is called with the wrong arguments in examples/black-widow-bank/bankClient.py. Thanks to Martin von Löwis for pointing this out.

    *** 1.2	1997/07/09 05:50:00
    --- examples/black-widow-bank/bankClient.py	1997/12/31 22:37:08
    ***************
    *** 11,17 ****
      		print 'Usage:  %s ACCOUNT-MANAGER-SBH ACCOUNT-NAME'
      		sys.exit(1)
      	orb = CORBA.ORB_init(argv, '')
    ! 	do_test(argv[1], argv[2])
      
      if __name__ == '__main__':
      	main(sys.argv)
    --- 11,17 ----
      		print 'Usage:  %s ACCOUNT-MANAGER-SBH ACCOUNT-NAME'
      		sys.exit(1)
      	orb = CORBA.ORB_init(argv, '')
    ! 	do_test(orb, argv[1], argv[2])
      
      if __name__ == '__main__':
      	main(sys.argv)
    

  • A reversed test causes incorrect code to be generated for "BindExceptionValue" in the C stubber.

    *** 1.147	1997/11/08 02:59:26
    --- stubbers/c/code.c	1998/01/02 20:40:54
    ***************
    *** 165,174 ****
        }
        else {
          if (t == enumeration_Type)
    !       fprintf(f, "    stat->ptr = (void *) ilu_must_malloc (sizeof (%s));\n",
      	      c_type_name(ut));
          else
    !       fprintf(f, "    stat->ptr = (void *) ilu_must_malloc (sizeof (ilu_cardinal));\n",
      	      c_type_name(ut));
          if (t == array_Type) {
            char           *rtn = c_return_type(ut);
    --- 165,174 ----
        }
        else {
          if (t == enumeration_Type)
    !       fprintf(f, "    stat->ptr = (void *) ilu_must_malloc (sizeof (ilu_cardinal));\n",
      	      c_type_name(ut));
          else
    !       fprintf(f, "    stat->ptr = (void *) ilu_must_malloc (sizeof (%s));\n",
      	      c_type_name(ut));
          if (t == array_Type) {
            char           *rtn = c_return_type(ut);
    

  • A reversed subtraction can cause negative lengths in listing bound objects in CosNaming. Thanks to Owen Taylor.

    *** 1.19	1997/11/26 00:42:09
    --- etc/CosNaming/NamingImpl.c	1998/01/10 21:58:01
    ***************
    *** 389,397 ****
    --- 389,402 ----
          RaiseInvalidName(_status);
        } else if (strlen(n->_buffer[0].id) == 0) {
          RaiseInvalidName(_status);
    +   } else if (obj == ILU_NIL) {
    +     /* we don't allow binding of the NIL object */
    +     ilu_DebugPrintf("CosNaming:  attempt to bind the NIL object -- raising IMP_LIMIT\n");
    +     ILU_C_RAISE_SYSTEM(_status, IMP_LIMIT, 0, NO);
        } else if (LocalObject((CosNaming_NamingContext) obj) &&
      	     (ILU_C_ClassRecordOfInstance(obj) != CosNaming_NamingContext__MSType)) {
          /* we don't allow binding of the bindingiterators exported from this server */
    +     ilu_DebugPrintf("CosNaming:  attempt to bind local binding iterator -- raising IMP_LIMIT\n");
          ILU_C_RAISE_SYSTEM(_status, IMP_LIMIT, 0, NO);
        } else if (size == 1) {
          if ((nv = ilu_hash_FindInTable(ht, n->_buffer[0].id)) != ILU_NIL) {
    ***************
    *** 672,678 ****
      	return;
            iteratorlist->_buffer[i].binding_type = bv->kind;
          }
    !     iteratorlist->_length = limit - count;
          bidata->index = 0;
          bidata->list = iteratorlist;
          if ((iterator = CosNaming_BindingIterator__CreateTrue(ILU_NIL, ILU_NIL, (ilu_refany) bidata)) == ILU_NIL) {
    --- 677,683 ----
      	return;
            iteratorlist->_buffer[i].binding_type = bv->kind;
          }
    !     iteratorlist->_length = count - limit;
          bidata->index = 0;
          bidata->list = iteratorlist;
          if ((iterator = CosNaming_BindingIterator__CreateTrue(ILU_NIL, ILU_NIL, (ilu_refany) bidata)) == ILU_NIL) {
    

  • Handle case where call to iluparser_GetProgramName() returns NULL in search for value for "programName" by just using argv[0].

    *** 1.55	1997/11/12 00:54:34
    --- stubbers/java/isl2java.c	1998/01/12 23:32:25
    ***************
    *** 676,682 ****
          initName();
          defineDefaultContext();
          defineIluContext();
    !     programName = iluparser_GetProgramName(argv[0]);
          while (optind < argc && argv[optind][0] == '-') {
      	char *opt = (argv[optind++])+1;
      	int tabIndex = getOptionTabIndex(opt);
    --- 677,685 ----
          initName();
          defineDefaultContext();
          defineIluContext();
    !     if ((programName = iluparser_GetProgramName(argv[0])) == NULL) {
    !       programName = argv[0];
    !     };
          while (optind < argc && argv[optind][0] == '-') {
      	char *opt = (argv[optind++])+1;
      	int tabIndex = getOptionTabIndex(opt);
    

  • Fix bug in IIOP code which causes problems when creating an IOR from an object ref from another ORB.

    *** 1.167	1997/11/25 22:19:10
    --- runtime/kernel/iiop.c	1998/01/05 20:50:47
    ***************
    *** 1045,1051 ****
      
        sid = server_id(server);
      
    !   if ((strcmp(pinfo, "iiop_1_0_1") != 0) &&
            (strcmp(pinfo, "iiop_") != 0) &&
            (strcmp(pinfo, "iiop") != 0))
          return ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_ps, ilu_FALSE);
    --- 1045,1051 ----
      
        sid = server_id(server);
      
    !   if ((strncmp(pinfo, "iiop_1_0_1", 10) != 0) &&
            (strcmp(pinfo, "iiop_") != 0) &&
            (strcmp(pinfo, "iiop") != 0))
          return ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_ps, ilu_FALSE);
    

  • Usefull for Java runtime on Linux: With some version of linux the type fd_set is not a struct but an array. This patch fixes variable definitions in IluJava_selectwt.c to remove the syntax error on those Linux systems.
    Contributed by Daniel Veillard. Daniel further has contributed nice instruction for building ILU Java under Linux at http://rufus.w3.org/linux/ILU/

    *** 1.18	1997/08/16 01:31:53
    --- runtime/java/IluJava_selectwt.c	1998/01/30 02:11:39
    ***************
    *** 76,89 ****
             ilu_boolean input,
             ILU_ERRS((interrupt)) * err)
      {
    !     struct fd_set   read_fds; 
    !     struct fd_set   write_fds; 
    !     struct fd_set   excn_fds;
          struct timeval* timeoutPtr = 0;
          struct timeval  timeout = {0, 0};
          int             res; 
    !     struct fd_set*  read_fdsPtr = 0;
    !     struct fd_set*  write_fdsPtr = 0;
          {
      #ifndef WIN32
              if (fd >= FD_SETSIZE) {
    --- 76,89 ----
             ilu_boolean input,
             ILU_ERRS((interrupt)) * err)
      {
    !     fd_set   read_fds; 
    !     fd_set   write_fds; 
    !     fd_set   excn_fds;
          struct timeval* timeoutPtr = 0;
          struct timeval  timeout = {0, 0};
          int             res; 
    !     fd_set*  read_fdsPtr = 0;
    !     fd_set*  write_fdsPtr = 0;
          {
      #ifndef WIN32
              if (fd >= FD_SETSIZE) {
    
    

  • In the Python runtime, the handler for DoSoon was incorrectly DECREF'ing a null return result when the function being called raised an exception. This patch fixes that.

    *** 1.230	1998/02/03 01:21:36
    --- runtime/python/iluPrmodule.c	1998/02/03 21:06:34
    ***************
    *** 2673,2685 ****
      
        result = PyEval_CallObject(cbdata->function, cbdata->argsTuple);
        Py_DECREF(cbdata->argsTuple);
    !   if (result == 0)
    !     {
    !       char	culprit[1000];
    !       sprintf(culprit, "%s DoSoon callback", cbdata->what);
    !       _ilupython_handleCalloutException(culprit, ILU_NIL);
    !     }
    !   Py_DECREF(result);
      }
      
      static PyObject *
    --- 2673,2685 ----
      
        result = PyEval_CallObject(cbdata->function, cbdata->argsTuple);
        Py_DECREF(cbdata->argsTuple);
    !   if (result == 0) {
    !     char	culprit[1000];
    !     sprintf(culprit, "%s DoSoon callback", cbdata->what);
    !     _ilupython_handleCalloutException(culprit, ILU_NIL);
    !   } else {
    !     Py_DECREF(result);
    !   }
      }
      
      static PyObject *
    

  • In the Python runtime, the handler for alarms was never releasing its reference to the arguments to the alarm proc.

    *** 1.11	1996/06/19 22:47:06
    --- runtime/python/ilualobject.c	1998/02/04 03:53:17
    ***************
    *** 98,106 ****
      {
      	IlualObject *	p	= (IlualObject *) rock;
      	PyObject *	result;
      
      	NEW_THREAD_ENTER;
    ! 	result = PyEval_CallObject(p->proc, p->argTuple);
      	FINISHED_THREAD_EXIT;
      	Py_XDECREF(result);
      }
    --- 98,118 ----
      {
      	IlualObject *	p	= (IlualObject *) rock;
      	PyObject *	result;
    + 	PyObject * proc = ((IlualObject *) rock)->proc;
    + 	PyObject * args = ((IlualObject *) rock)->argTuple;
      
    + /*
    + 	if ((proc == 0) || (args == 0))
    + 	  return;
    + */
    + 	_ilu_Assert((proc != 0) && (args != 0),
    + 		    "bad alarm data structure in Python runtime");
    + 	p->proc = 0;
    + 	p->argTuple = 0;
      	NEW_THREAD_ENTER;
    ! 	result = PyEval_CallObject(proc, args);
    ! 	Py_DECREF(proc);
    ! 	Py_DECREF(args);
      	FINISHED_THREAD_EXIT;
      	Py_XDECREF(result);
      }
    

  • In the w3ng protocol, session termination messages indicating normal termination were being erroneously processed as COMM_FAILURE errors. This patch changes things so that session termination for the "ResourceManagement" and "ProcessTermination" reasons are reflected as EOF, rather than COMM_FAILURE.

    *** 1.27	1997/11/25 22:18:21
    --- runtime/kernel/w3ng.c	1998/02/04 04:05:49
    ***************
    *** 1465,1477 ****
      	  ilu_cardinal serial_no = (packet & 0x00FFFFFF);
      	  switch (cause) {
      	  case ResourceManagement:
    ! 	    ILU_ERR_CONS1(comm_failure, err, minor, ilu_cfm_resource_mgmt, 0);
      	    break;
      	  case InvalidServerID:
      	    ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_sid, 0);
      	    break;
      	  case ProcessTermination:
    ! 	    ILU_ERR_CONS1(comm_failure, err, minor, ilu_cfm_eof, 0);
      	    break;
      	  case InvalidProtocolID:
      	    ILU_ERR_CONS1(marshal, err, minor, ilu_mm_versionMismatch, 0);
    --- 1465,1477 ----
      	  ilu_cardinal serial_no = (packet & 0x00FFFFFF);
      	  switch (cause) {
      	  case ResourceManagement:
    ! 	    ILU_CLER(*err);
      	    break;
      	  case InvalidServerID:
      	    ILU_ERR_CONS1(inv_objref, err, minor, ilu_iom_sid, 0);
      	    break;
      	  case ProcessTermination:
    ! 	    ILU_CLER(*err);
      	    break;
      	  case InvalidProtocolID:
      	    ILU_ERR_CONS1(marshal, err, minor, ilu_mm_versionMismatch, 0);
    ***************
    *** 1482,1488 ****
      	  }
      	  transport_end_message(bs, ilu_FALSE, NIL, &lerr);
      	  ILU_HANDLED(lerr);
    ! 	  return ilu_rhrc_error;
      	}
            default:
      	/* bad message type */
    --- 1482,1489 ----
      	  }
      	  transport_end_message(bs, ilu_FALSE, NIL, &lerr);
      	  ILU_HANDLED(lerr);
    ! 	  id->connection_closed = ilu_TRUE;
    ! 	  return (ILU_ERROK(*err) ? ilu_rhrc_eof : ilu_rhrc_error);
      	}
            default:
      	/* bad message type */
    

  • The endless loop in $ILUSRC/runtime/kernel/debug.c, which is what's invoked by default when the ILU runtime kernel detects an internal inconsistency, has an error in its printf statement as expanded when kernel-supplied-thread support is configured into ILU.

    *** runtime/kernel/debug.c.orig	Fri Feb  6 11:36:09 1998
    --- runtime/kernel/debug.c	Fri Feb  6 11:51:38 1998
    ***************
    *** 719,731 ****
      
      void     _ilu_ConsumeByLoop(const char *f, int l)
      {
    !   ILU_ERRPRINTF(
    ! 	  "Entering endless sleep loop (at line %d of %s)",
    ! 	  __LINE__ + 4, __FILE__);
      #ifdef ILU_OS_THREADED
    !     ILU_ERRPRINTF(", Thread ID = 0x%x,", GET_CURRENT_THREAD());
      #endif
    !   ILU_ERRPRINTF(" for debugging purposes...\n");
        while (1)
      #ifdef WIN16
          Yield();
    --- 719,729 ----
      
      void     _ilu_ConsumeByLoop(const char *f, int l)
      {
    !   ILU_ERRPRINTF("Entering endless sleep loop (at line %d of %s)"
      #ifdef ILU_OS_THREADED
    ! 		", Thread ID = 0x%x\n", GET_CURRENT_THREAD()
      #endif
    ! 		,__LINE__ + 4, __FILE__);
        while (1)
      #ifdef WIN16
          Yield();
    

  • The ILU runtime kernel routines to input CHARACTER (as opposed to SHORT CHARACTER) strings and arrays were leaking memory (a temporary buffer used to hold the UTF-8 encoded byte sequence that was input).
    *** runtime/kernel/call.c.orig	Fri Feb  6 11:35:56 1998
    --- runtime/kernel/call.c	Fri Feb  6 11:49:32 1998
    ***************
    *** 2933,2943 ****
    --- 2933,2945 ----
        if (ubuf == NIL)
          return;
        if (!UTF2Decode(ubuf, buf, len, len2, err)) {
    +     ilu_free(buf);
          ilu_free(ubuf);
          *s = NIL;
          *l = 0;
          return;
        }
    +   ilu_free(buf);
        ubuf[len] = 0;
        *s = ubuf;
        *l = len;
    ***************
    *** 3046,3054 ****
    --- 3048,3058 ----
            return;
        }
        if (!UTF2Decode(*s, buf, len, len2, err) && isnew) {
    +     ilu_free(buf);
          ilu_free(*s);
          *s = NIL;
        }
    +   ilu_free(buf);
        return;
      }
      
    

  • The argument parsing for ilu.RegisterCustomSurrogate() in Python is wrong.
    *** 1.232	1998/02/06 02:19:33
    --- runtime/python/iluPrmodule.c	1998/02/18 22:10:16
    ***************
    *** 734,740 ****
        ilu_Class		kclass;
        CrNode *		n;
      
    !   if (!PyArg_Parse(args, "(O)", &pycl))
          return 0;
        if (!PyClass_Check(pycl))
          {
    --- 734,740 ----
        ilu_Class		kclass;
        CrNode *		n;
      
    !   if (!PyArg_Parse(args, "O", &pycl))
          return 0;
        if (!PyClass_Check(pycl))
          {
    

  • Joachim Achtzehnter points out some problems with pickle marshalling in Lisp, and Charles Sitter points out a problem with marshalling of exceptions across size-sensitive RPC protocols like IIOP. This patch fixes both problems.
    *** 1.37	1997/11/21 02:22:37
    --- runtime/lisp/ilu-kernel.lisp	1998/02/18 22:54:10
    ***************
    *** 570,576 ****
      (define-c-function ilu_pickle-type-uid
          "Find the type UID of a pickle from its bytes"
        "ilulisp_PickleTypeUID"
    !   (:bytes :ilu-kerr) :string)
      
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;;
    --- 570,576 ----
      (define-c-function ilu_pickle-type-uid
          "Find the type UID of a pickle from its bytes"
        "ilulisp_PickleTypeUID"
    !   (:bytes :ilu-kerr) :constant-string)
      
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;;
    ***************
    *** 671,676 ****
    --- 671,682 ----
      (define-c-function ilu_no-reply
          "Used by server to end asynchronous call arg unmarshalling"
        "ilu_NoReply" (:ilu-call :ilu-kerr) :boolean :inline t)
    + 
    + ;; Main Invariant holds, L2 otherwise unconstrained
    + (define-c-function begin-sizing-exception
    +     "Start an exception"
    +   "ilu_BeginSizingException" (:ilu-call :integer :ilu-kerr)
    +   :cardinal :inline t)
      
      ;;  before: L2 not >=   {call's conn's iomu},
      ;;	  L2     >=   {call's conn's callmu} iff protocol not concurrent;
    *** 1.107	1997/11/08 03:21:35
    --- runtime/lisp/ilu.lisp	1998/02/18 22:55:31
    ***************
    *** 752,758 ****
            (exception-value-read call exception))))
      
      (defun signal-exception (call position e)
    !   (begin-exception call position (exception-value-size call e))
        (exception-value-write call e)
        (finish-exception call))
      
    --- 757,765 ----
            (exception-value-read call exception))))
      
      (defun signal-exception (call position e)
    !   (begin-exception call position
    ! 		   (+ (begin-sizing-exception call position)
    ! 		      (exception-value-size call e)))
        (exception-value-write call e)
        (finish-exception call))
      
    *** 1.13	1997/11/25 05:33:08
    --- runtime/lisp/ilu-lisp-skin.c	1998/02/17 05:37:05
    ***************
    *** 881,888 ****
        ilulisp_ReadPickle (ilu_Call call, ByteVector *bytes, ilu_Error *err)
      {
        ilu_Pickle p;
    -   p.pi_bytes = bytes->data;
        p.pi_len = bytes->len;
        (void) ilu_ReadPickle(call, p, err);
      }
      
    --- 881,890 ----
        ilulisp_ReadPickle (ilu_Call call, ByteVector *bytes, ilu_Error *err)
      {
        ilu_Pickle p;
        p.pi_len = bytes->len;
    +   p.pi_bytes = ilu_MallocE(bytes->len, err);
    +   if (ILU_ERRNOK(*err)) return;
    +   memcpy (p.pi_bytes, bytes->data, bytes->len);
        (void) ilu_ReadPickle(call, p, err);
      }
      
    

  • Joachim Achtzehnter points out some problems with pickle marshalling in Lisp, and Charles Sitter points out a problem with marshalling of exceptions across size-sensitive RPC protocols like IIOP. This patch fixes both problems.
    *** 1.233	1998/02/18 22:10:15
    --- runtime/python/iluPrmodule.c	1998/02/19 00:36:39
    ***************
    *** 2922,2935 ****
        /* return stat; */
      }
      
    ! static PyObject *cbDoEvent;
    ! static PyObject *cbRegInp;
    ! static PyObject *cbCanInp;
    ! static PyObject *cbRegOut;
    ! static PyObject *cbCanOut;
    ! static PyObject *cbCreateAlarm;
    ! static PyObject *cbSetAlarm;
    ! static PyObject *cbCanAlarm;
      
      static void
        Run(int *stop)
    --- 2922,2935 ----
        /* return stat; */
      }
      
    ! static PyObject *cbDoEvent = ILU_NIL;
    ! static PyObject *cbRegInp = ILU_NIL;
    ! static PyObject *cbCanInp = ILU_NIL;
    ! static PyObject *cbRegOut = ILU_NIL;
    ! static PyObject *cbCanOut = ILU_NIL;
    ! static PyObject *cbCreateAlarm = ILU_NIL;
    ! static PyObject *cbSetAlarm = ILU_NIL;
    ! static PyObject *cbCanAlarm = ILU_NIL;
      
      static void
        Run(int *stop)
    ***************
    *** 3186,3192 ****
            return 0;
          }
      
    !   /* DM:  Why don't we need to INCREF these objects? */
      
        cbDoEvent = DoEvent;
        cbRegInp = regInp;
    --- 3186,3199 ----
            return 0;
          }
      
    !   Py_XDECREF(cbDoEvent);
    !   Py_XDECREF(cbRegInp);
    !   Py_XDECREF(cbCanInp);
    !   Py_XDECREF(cbRegOut);
    !   Py_XDECREF(cbCanOut);
    !   Py_XDECREF(cbCreateAlarm);
    !   Py_XDECREF(cbSetAlarm);
    !   Py_XDECREF(cbCanAlarm);
      
        cbDoEvent = DoEvent;
        cbRegInp = regInp;
    ***************
    *** 3196,3201 ****
    --- 3203,3218 ----
        cbCreateAlarm = createAlarm;
        cbSetAlarm = setAlarm;
        cbCanAlarm = cancelAlarm;
    + 
    +   Py_INCREF(cbDoEvent);
    +   Py_INCREF(cbRegInp);
    +   Py_INCREF(cbCanInp);
    +   Py_INCREF(cbRegOut);
    +   Py_INCREF(cbCanOut);
    +   Py_INCREF(cbCreateAlarm);
    +   Py_INCREF(cbSetAlarm);
    +   Py_INCREF(cbCanAlarm);
    + 
        if (!initialized)
          {
            ilu_SetMainLoop (&synth);
    

  • This patch fixes the C++ CORBA 2.0 stubber to properly delete the old storage (as opposed to the new!) in sequence length changes.
    *** 1.26	1997/09/19 01:57:55
    --- stubbers/cpp2/cppgencommon.cpp	1998/03/05 20:17:57
    ***************
    *** 4218,4228 ****
                  ofs << "_varBuffer[_index] = _oldVarBuffer[_index];" << endl;
              ofs.indent--;
              ofs << "};" << endl;
    !         ofs << "if (_buffer != NULL && _oldRelease) {" << endl;
              ofs.indent++;
              ofs << "freebuf(_oldBuffer);" << endl;
              if (needVarBuffer())
    !             ofs << "delete [] _varBuffer;" << endl;
              ofs.indent--;
              ofs << "};" << endl;
              ofs.indent--;
    --- 4218,4228 ----
                  ofs << "_varBuffer[_index] = _oldVarBuffer[_index];" << endl;
              ofs.indent--;
              ofs << "};" << endl;
    !         ofs << "if (_oldBuffer != NULL && _oldRelease) {" << endl;
              ofs.indent++;
              ofs << "freebuf(_oldBuffer);" << endl;
              if (needVarBuffer())
    !             ofs << "delete [] _oldVarBuffer;" << endl;
              ofs.indent--;
              ofs << "};" << endl;
              ofs.indent--;
    

  • Thanks to Ken Pier, for reporting an odd core dump in Python when trying to raise an exception because a call to ilu_BeginReply() returned success! Turned out to be other code clobbering the real error return value.
    *** 1.239	1998/03/24 02:28:22
    --- runtime/python/iluPrmodule.c	1998/03/24 03:37:27
    ***************
    *** 793,837 ****
      }
      
      static ilu_boolean
    !   enableRequestsOnConn(ilu_Connection conn, ilu_Error *err)
      {
        ILUPY_ILLEGAL_IN_THREADED(ilu_ThreadPerRequest(conn));
      
        CALL_KERNEL(ilupython_threaded_operation,
      	      ilu_SetConnectionInputHandler (conn,
      					     singleThreadedReadServiceRequest,
      					     (ilu_refany) conn,
    ! 					     err));
    !   if (ILU_ERRNOK(*err))
          {
            char buf[1000];
    !       _ilupython_formErrDescription (buf, err);
    !       ilu_DebugPrintf ("ilu: ilu_SetConnectionInputHandler() signals <%s>.\n",
    ! 	      buf);
    !       ILU_HANDLED(*err);
            return ilu_FALSE;
          }
        return ilu_TRUE;
      }
      
      static ilu_boolean
    !   disableRequestsOnConn(ilu_Connection conn, ilu_Error *err)
      {
        ILUPY_ILLEGAL_IN_THREADED(ilu_ThreadPerRequest(conn));
      
        CALL_KERNEL(ilupython_threaded_operation,
      	      ilu_SetConnectionInputHandler (conn,
      					     (ilu_TransportInputHandler) 0,
      					     ILU_NIL,
    ! 					     err));
      
    !   if (ILU_ERRNOK(*err))
          {
            char buf[1000];
    !       _ilupython_formErrDescription (buf, err);
    !       ilu_DebugPrintf ("ilu: ilu_SetConnectionInputHandler() signals <%s>.\n",
    ! 	      buf);
    !       ILU_HANDLED(*err);
            return ilu_FALSE;
          }
        return ilu_TRUE;
    --- 793,837 ----
      }
      
      static ilu_boolean
    !   enableRequestsOnConn(ilu_Connection conn)
      {
    +   ilu_Error lerr;
        ILUPY_ILLEGAL_IN_THREADED(ilu_ThreadPerRequest(conn));
      
        CALL_KERNEL(ilupython_threaded_operation,
      	      ilu_SetConnectionInputHandler (conn,
      					     singleThreadedReadServiceRequest,
      					     (ilu_refany) conn,
    ! 					     &lerr));
    !   if (ILU_ERRNOK(lerr))
          {
            char buf[1000];
    !       _ilupython_formErrDescription (buf, &lerr);
    !       ilu_DebugPrintf ("ilu: ilu_SetConnectionInputHandler() signals <%s>.\n", buf);
    !       ILU_HANDLED(lerr);
            return ilu_FALSE;
          }
        return ilu_TRUE;
      }
      
      static ilu_boolean
    !   disableRequestsOnConn(ilu_Connection conn)
      {
    +   ilu_Error lerr;
        ILUPY_ILLEGAL_IN_THREADED(ilu_ThreadPerRequest(conn));
      
        CALL_KERNEL(ilupython_threaded_operation,
      	      ilu_SetConnectionInputHandler (conn,
      					     (ilu_TransportInputHandler) 0,
      					     ILU_NIL,
    ! 					     &lerr));
      
    !   if (ILU_ERRNOK(lerr))
          {
            char buf[1000];
    !       _ilupython_formErrDescription (buf, &lerr);
    !       ilu_DebugPrintf ("ilu: ilu_SetConnectionInputHandler() signals <%s>.\n", buf);
    !       ILU_HANDLED(lerr);
            return ilu_FALSE;
          }
        return ilu_TRUE;
    ***************
    *** 842,849 ****
      {
        ilu_boolean status;
      
    !   if (status = enableRequestsOnConn(ilu_ConnectionOfCall(ca->call),
    ! 				    &ca->err))
          ca->conn_disabled = ilu_FALSE;
        return status;
      }
    --- 842,848 ----
      {
        ilu_boolean status;
      
    !   if (status = enableRequestsOnConn(ilu_ConnectionOfCall(ca->call)))
          ca->conn_disabled = ilu_FALSE;
        return status;
      }
    ***************
    *** 854,861 ****
        ilu_Connection conn = ilu_ConnectionOfCall(ca->call);
        ilu_boolean status;
      
    !   if (status = disableRequestsOnConn(ilu_ConnectionOfCall(ca->call),
    ! 				     &ca->err))
          ca->conn_disabled = ilu_TRUE;
        return status;
      }
    --- 853,859 ----
        ilu_Connection conn = ilu_ConnectionOfCall(ca->call);
        ilu_boolean status;
      
    !   if (status = disableRequestsOnConn(ilu_ConnectionOfCall(ca->call)))
          ca->conn_disabled = ilu_TRUE;
        return status;
      }
    ***************
    *** 1002,1008 ****
      	      CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (ca->call, &ca->err));
      	      ILU_HANDLED(ca->err);
      	      if (!ilupython_threaded_operation && ca->conn_disabled)
    ! 		enableRequestsOnConn(conn, &lerr);
      	      Py_DECREF(ca);
      	      return;
      	    }
    --- 1000,1006 ----
      	      CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (ca->call, &ca->err));
      	      ILU_HANDLED(ca->err);
      	      if (!ilupython_threaded_operation && ca->conn_disabled)
    ! 		enableRequestsOnConn(conn);
      	      Py_DECREF(ca);
      	      return;
      	    }
    ***************
    *** 1010,1016 ****
          }
      
        if (!ilupython_threaded_operation)
    !     enableRequestsOnConn(conn, &lerr);
        CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (call, &lerr));
        ilu_free(call);
        ILU_HANDLED(lerr);
    --- 1008,1014 ----
          }
      
        if (!ilupython_threaded_operation)
    !     enableRequestsOnConn(conn);
        CALL_KERNEL(ilupython_threaded_operation, ilu_FinishCall (call, &lerr));
        ilu_free(call);
        ILU_HANDLED(lerr);
    ***************
    *** 1033,1039 ****
        ilu_boolean			initted;
      
        if (single_threaded)
    !     disableRequestsOnConn(conn, &err);
      
        CALL_KERNEL(ilupython_threaded_operation,
      	      stat = ilu_ReceiveRequest(&call, &initted, conn, &kclass, &meth, &serialNo, &err));
    --- 1031,1037 ----
        ilu_boolean			initted;
      
        if (single_threaded)
    !     disableRequestsOnConn(conn);
      
        CALL_KERNEL(ilupython_threaded_operation,
      	      stat = ilu_ReceiveRequest(&call, &initted, conn, &kclass, &meth, &serialNo, &err));
    ***************
    *** 1077,1083 ****
         /* stat must be ilu_RcvReqStat_noop */
        if (single_threaded) 
            /* call skeleton does this for ilu_RcvReqStat_request case */
    !       enableRequestsOnConn(conn, &err);
        return ilu_FALSE;
      }
      
    --- 1075,1081 ----
         /* stat must be ilu_RcvReqStat_noop */
        if (single_threaded) 
            /* call skeleton does this for ilu_RcvReqStat_request case */
    !       enableRequestsOnConn(conn);
        return ilu_FALSE;
      }
      
    ***************
    *** 1104,1110 ****
          }
      
        if (!ilupython_threaded_operation && conn)
    !     enableRequestsOnConn(conn, &err);
      }
      
      OWNED(PyObject *)
    --- 1102,1108 ----
          }
      
        if (!ilupython_threaded_operation && conn)
    !     enableRequestsOnConn(conn);
      }
      
      OWNED(PyObject *)
    

  • Thanks to Chuck Sitter at Rockwell, who pointed out that when discarding input (as for an unrecognized message), the IIOP code got some arithmetic wrong. Here's a corrected version:
    *** 1.167	1997/11/25 22:19:10
    --- runtime/kernel/iiop.c	1998/03/24 03:52:59
    ***************
    *** 6461,6472 ****
          } ILU_ERR_ENDSWITCH;
        } else {
          ilu_bytes b = NIL;
    !     ilu_cardinal len = iiop_size(call) - ((ilu_cardinal) iiop_vop(call));
    !     if (len > 0) {
    !       _IIOP_InputOpaque(call, &b, len, err);
    !       if (ILU_ERROK(*err)) ilu_free(b);
    !     } else {
    !       ILU_CLER(*err);
          }
          return ILU_ERROK(*err);
        }
    --- 6490,6506 ----
          } ILU_ERR_ENDSWITCH;
        } else {
          ilu_bytes b = NIL;
    !     ilu_cardinal len;
    !     if ((iiop_size(call) + 12) < ((ilu_cardinal) iiop_vop(call)))
    !       ILU_ERR_CONS1(marshal, err, minor, ilu_mm_eom, 0);
    !     else {
    !       len = (iiop_size(call) + 12) - ((ilu_cardinal) iiop_vop(call));
    !       if (len > 0) {
    ! 	_IIOP_InputOpaque(call, &b, len, err);
    ! 	if (ILU_ERROK(*err)) ilu_free(b);
    !       } else {
    ! 	ILU_CLER(*err);
    !       }
          }
          return ILU_ERROK(*err);
        }
    

  • Java interprets backslashes as escape characters. Stubs on win32 might write backslashes as part of file names within comments. This patch fixes the first half of this problem (the half in the java stubber).
    *** 1.62	1997/11/10 21:35:33
    --- stubbers/java/util.c	1998/04/02 18:56:15
    ***************
    *** 56,61 ****
    --- 56,84 ----
          return value ? "true" : "false";
      }
      
    + static char* replaceBackslashes(char* x)
    + {
    +     /* We need to replace backslashes with forward slashes
    +      * because in java backslashes cause character substitutions
    +      * even if found in comments.
    +      *
    +      * The only place where this is used is in file names in comments.
    +      */
    +     char backslash = '\\';
    +     char* p;
    +     p = strchr(x, backslash);
    +     if (p) {
    +         x = ilu_strdup(x);
    +         p = strchr(x, backslash);
    +         while (p) {
    +             *p = '/';
    +             p++;
    +             p = strchr(p, backslash);
    +         }
    +     }
    +     return x;
    + } /*replaceBackslashes*/
    + 
      
      static list allfiles = 0;
      static void reportFile(char* fn) 
    ***************
    *** 86,92 ****
      {
          static char *prefixes[2] = {"//", "//"};
      
    !     printf("// %s for \"%s\"\n//\n", part, packagePrefix(ih));
          if (ifc) {
              iluparser_GenerateBoilerplate(stdout, ifc, programName, prefixes);
          }
    --- 109,117 ----
      {
          static char *prefixes[2] = {"//", "//"};
      
    !     printf("// %s for \"%s\"\n//\n", 
    !         replaceBackslashes((char*)part), replaceBackslashes(packagePrefix(ih))
    !         );
          if (ifc) {
              iluparser_GenerateBoilerplate(stdout, ifc, programName, prefixes);
          }
    ***************
    *** 215,221 ****
      PrintFileHeader(const char * path, Interface interface, IHandle ih)
      {
          char * pp = packagePrefix(ih);
    !     printf("// "); printf(path); printf("\n");
          printBanner("Stubs", interface, ih);
          printf("\n\n");
          if (pp) {
    --- 240,246 ----
      PrintFileHeader(const char * path, Interface interface, IHandle ih)
      {
          char * pp = packagePrefix(ih);
    !     printf("// "); printf(replaceBackslashes((char*)path)); printf("\n");
          printBanner("Stubs", interface, ih);
          printf("\n\n");
          if (pp) {
    
    

  • Java interprets backslashes as escape characters. Stubs on win32 might write backslashes as part of file names within comments. This patch fixes the second half of this problem (the half in the parser).
    *** 1.17	1997/11/12 02:17:15
    --- stubbers/parser/util.c	1998/04/02 18:56:54
    ***************
    *** 33,38 ****
    --- 33,64 ----
      
      #include 	/* for stat() */
      
    + 
    + static char* replaceBackslashes(char* x)
    + {
    +     /* We need to replace backslashes with forward slashes
    +      * because in java backslashes cause character substitutions
    +      * even if found in comments.
    +      *
    +      * The only place where this is used is in file names in comments.
    +      */
    +     char backslash = '\\';
    +     char* p;
    +     p = strchr(x, backslash);
    +     if (p) {
    +         x = ilu_strdup(x);
    +         p = strchr(x, backslash);
    +         while (p) {
    +             *p = '/';
    +             p++;
    +             p = strchr(p, backslash);
    +         }
    +     }
    +     return x;
    + } /*replaceBackslashes*/
    + 
    + 
    + 
      /* MED: Windows doesn't have pwd.h (or getpwuid()) */
      #ifdef _IS_POSIX
      #include 	/* for getpwuid() */
    ***************
    *** 83,89 ****
          }
        filename = (s->filename && *s->filename) ? s->filename : i->filename;
        if (filename)
    !     fprintf (info->file, ",\n%s and \"%s\" of %s", info->prefix, filename, ModTime(filename));
      }
      
      void iluparser_GenerateBoilerplate (FILE *file, Interface parse, char *programName, char *prefixes[2])
    --- 109,115 ----
          }
        filename = (s->filename && *s->filename) ? s->filename : i->filename;
        if (filename)
    !     fprintf (info->file, ",\n%s and \"%s\" of %s", info->prefix, replaceBackslashes(filename), ModTime(filename));
      }
      
      void iluparser_GenerateBoilerplate (FILE *file, Interface parse, char *programName, char *prefixes[2])
    ***************
    *** 101,111 ****
        fprintf (file, "%s This file was automatically generated with ILU (version %s) tools\n",
      	   prefixes[0], ILU_VERSION_STRING);
        fprintf (file, "%s at %s by `%s'\n%s running \"%s\" of %s\n",
    ! 	   prefixes[1], now, GoodGetLogin(), prefixes[1], programName, ModTime(programName));
    !   fprintf (file, "%s on \"%s\" of %s", prefixes[1], parse->filename, ModTime(parse->filename));
        if (list_size(parse->imports) > 0)
          list_enumerate (parse->imports, (iluparser_EnumProc) PrintImportedFileInfo, &info);
    !   fprintf (file, ".\n%s\n%s ILU is Copyright 1991-1997 Xerox Corporation, All Rights Reserved.\n",
      	   prefixes[1], prefixes[1]);
        fprintf (file, "%s ILU information:  ftp://ftp.parc.xerox.com/pub/ilu/ilu.html.\n",
      	   prefixes[1]);
    --- 127,137 ----
        fprintf (file, "%s This file was automatically generated with ILU (version %s) tools\n",
      	   prefixes[0], ILU_VERSION_STRING);
        fprintf (file, "%s at %s by `%s'\n%s running \"%s\" of %s\n",
    ! 	   prefixes[1], now, GoodGetLogin(), prefixes[1], replaceBackslashes(programName), ModTime(programName));
    !   fprintf (file, "%s on \"%s\" of %s", prefixes[1], replaceBackslashes(parse->filename), ModTime(parse->filename));
        if (list_size(parse->imports) > 0)
          list_enumerate (parse->imports, (iluparser_EnumProc) PrintImportedFileInfo, &info);
    !   fprintf (file, ".\n%s\n%s ILU is Copyright 1991-1998 Xerox Corporation, All Rights Reserved.\n",
      	   prefixes[1], prefixes[1]);
        fprintf (file, "%s ILU information:  ftp://ftp.parc.xerox.com/pub/ilu/ilu.html.\n",
      	   prefixes[1]);
    ***************
    *** 113,119 ****
      
      static void PrintInterfaceInfo (Interface parse, PrintInfo *info)
      {
    !   fprintf (info->file, "%s on \"%s\" of %s", info->prefix, parse->filename, ModTime(parse->filename));
        if (list_size(parse->imports) > 0)
          list_enumerate (parse->imports, (iluparser_EnumProc) PrintImportedFileInfo, info);
        fprintf (info->file, "\n");
    --- 139,145 ----
      
      static void PrintInterfaceInfo (Interface parse, PrintInfo *info)
      {
    !   fprintf (info->file, "%s on \"%s\" of %s", info->prefix, replaceBackslashes(parse->filename), ModTime(parse->filename));
        if (list_size(parse->imports) > 0)
          list_enumerate (parse->imports, (iluparser_EnumProc) PrintImportedFileInfo, info);
        fprintf (info->file, "\n");
    ***************
    *** 134,140 ****
        fprintf (file, "%s This file was automatically generated with ILU (version %s) tools\n",
      	   prefixes[0], ILU_VERSION_STRING);
        fprintf (file, "%s at %s by `%s'\n%s running \"%s\" of %s\n",
    ! 	   prefixes[1], now, GoodGetLogin(), prefixes[1], programName, ModTime(programName));
        list_enumerate (interfaces, (iluparser_EnumProc) PrintInterfaceInfo, &info);
        fprintf (file, "%s\n%s ILU is Copyright 1991-1997 Xerox Corporation, All Rights Reserved.\n",
      	   prefixes[1], prefixes[1]);
    --- 160,166 ----
        fprintf (file, "%s This file was automatically generated with ILU (version %s) tools\n",
      	   prefixes[0], ILU_VERSION_STRING);
        fprintf (file, "%s at %s by `%s'\n%s running \"%s\" of %s\n",
    ! 	   prefixes[1], now, GoodGetLogin(), prefixes[1], replaceBackslashes(programName), ModTime(programName));
        list_enumerate (interfaces, (iluparser_EnumProc) PrintInterfaceInfo, &info);
        fprintf (file, "%s\n%s ILU is Copyright 1991-1997 Xerox Corporation, All Rights Reserved.\n",
      	   prefixes[1], prefixes[1]);
    

  • Java stubs sometimes have circular dependencies. Sometimes this causes errors. To make things worse, the jdk used to ommit class name and line number when reporting this error. Here is a fix for the stubber.
    *** stubbers/java/genobj.c	1997/12/06 01:03:26
    --- stubbers/java/genobj.c	1998/05/01 12:49:01
    ***************
    *** 969,974 ****
    --- 969,994 ----
      
      
      PRIVATE void
    + printFinishTryIluSystemException(char* otName)
    + /* code which catches an IluSystemException and re-throws it
    +  * as an IluRuntimeError to make sure it can be thrown in 
    +  * static initializers
    +  */
    + {
    +     printf("    } catch (xerox.ilu.IluSystemException e) {\n");
    +     /* Java reports this error very poorly; 
    +      * so we will print it ourself first.
    +      */
    +     printf("        System.err.println(\"**error registering %s: \" + e);\n",
    +         otName
    +         );
    +     printf("        e.printStackTrace(System.err);\n");
    +     printf("        throw new xerox.ilu.IluRuntimeError(\"error registering %s\", e);\n", otName);
    +     printf("    }\n");
    + } /*printFinishTryIluSystemException*/
    + 
    + 
    + PRIVATE void
      printStubClass(ObjRockType* rock)
      {
          Type t = rock->t;
    ***************
    *** 1082,1094 ****
                      qoString(currentIfc->brand)
                      );
              }
    -         printf("        %s.id(); //makes sure helper class is loaded\n", 
    -             helperClassShortName(t));
          }
          
    !     printf("    } catch (xerox.ilu.IluSystemException e) {\n");
    !     printf("        throw new xerox.ilu.IluRuntimeError(\"error 1 registering %s\", e);\n", otName);
    !     printf("    }\n");
      
          rock->methodidx = 0;
          list_enumerate(c->methods, (EnumProc) printMethodRegistration, rock);
    --- 1102,1110 ----
                      qoString(currentIfc->brand)
                      );
              }
          }
          
    !     printFinishTryIluSystemException(otName);
      
          rock->methodidx = 0;
          list_enumerate(c->methods, (EnumProc) printMethodRegistration, rock);
    ***************
    *** 1095,1103 ****
      
          printf("    try {\n");
          printf("        %s.finishClass();\n", iluClassRepField);
    !     printf("    } catch (xerox.ilu.IluSystemException e) {\n");
    !     printf("        throw new xerox.ilu.IluRuntimeError(\"error 2 registering %s\", e);\n", otName);
    !     printf("    }\n");
          printf("  }//static\n\n");
      
          list_enumerate(c->methods, (EnumProc) printMethodStub, rock);
    --- 1111,1122 ----
      
          printf("    try {\n");
          printf("        %s.finishClass();\n", iluClassRepField);
    !     if (ih->p.genHlp) {
    !         printf("        %s.id(); //makes sure helper class is loaded\n", 
    !             helperClassShortName(t)
    !             );
    !     }
    !     printFinishTryIluSystemException(otName);
          printf("  }//static\n\n");
      
          list_enumerate(c->methods, (EnumProc) printMethodStub, rock);
    

  • Added methods to query and set ilu's file descriptor budget to the java lsr.
    *** 1.43	1997/10/21 23:46:44
    --- runtime/java/IluRT0.java	1998/06/01 06:17:40
    ***************
    *** 425,430 ****
    --- 425,452 ----
              if (oi1.yServer == 0) return false;
              return (oi1.yServer == oi2.yServer);
          } //objectsAreSiblings
    +     
    +     
    +     /**
    +      * Returns current budget for file descriptors.
    +      * See the ilu kernel documentation.
    +      */ 
    +     public static native int getFDBudget();    
    +     
    +     /**
    +      * Sets the FD budget to n, if possible.
    +      * Stay within bounds of what the operating system allows
    +      * and return new number. 
    +      */ 
    +     /*friendly*/ static native int nSetFDBudget(int n);    
    +     
    +     /**
    +      * Sets the FD budget to n, if possible.
    +      */ 
    +     public static int setFDBudget(int n) {
    +         //disable use from applets
    +         return nSetFDBudget(n);
    +     } //setFDBudget  
          
          
          /**
    *** 1.45	1997/11/06 23:28:17
    --- runtime/java/IluJava_IluRT0.c	1998/06/01 06:27:23
    ***************
    *** 451,456 ****
    --- 451,476 ----
          ilu_free(cstring);
          return jjstring;
      }
    + 
    + JAVAEXPORT(IluRT0_getFDBudget, Jint)
    +     JIluRT0 unused
    +     ENDJAVAEXPORT
    + {
    +     Jint n = -1;
    +     n = (Jint) ilu_GetFDBudget();
    +     return n;
    + }
    + 
    + 
    + JAVAEXPORT(IluRT0_nSetFDBudget, Jint)
    +     JIluRT0 unused,
    +     Jint n
    +     ENDJAVAEXPORT
    + {
    +     n = (Jint) ilu_SetFDBudget((ilu_cardinal) n);
    +     return n;
    + }
    + 
      
      JAVAEXPORT(IluRT0_registerTrue, void)
      	JIluRT0 unused,
    

  • Removed bad and unnecessary call to ILU_HANDLED from parseIOR.
    *** etc/misc/parseior.c	Tue Nov 25 19:42:54 1997
    --- 23	Tue Jun  2 12:31:01 1998
    ***************
    *** 31,37 ****
      
      static ilu_string encode (ilu_bytes key, ilu_cardinal keylen)
      {
    -   ilu_Error err;
        int i;
        ilu_string copy;
        char *p;
    --- 31,36 ----
    ***************
    *** 38,44 ****
        ilu_byte *q;
      
        copy = ilu_must_malloc(3 * keylen);
    -   ILU_HANDLED(err);
        for (p = copy, q = key;  (q - key) < keylen;  q++) {
          if ((*q < 0x20) || (*q > 0x7E)) {
            *p++ = '#';
    --- 37,42 ----
    

  • The Imakefile in stubber/parser is broken if DIRECT_OMG_IDL_SUPPORT is configured out.
    *** 1.1	1998/06/04 21:08:08
    --- stubbers/parser/Imakefile	1998/06/04 21:08:28
    ***************
    *** 35,43 ****
      DISTCLEAN = cd ../idl ; rm -f idlparser.o idlscan.o
      IDLOBJS = ../idl/idlparser.o ../idl/idlscan.o
      #else
    ! DISTMAKE = :
    ! DISTCLEAN = :
    ! IDLOBJS = :
      #endif
      
      $(IDLOBJS) :
    --- 35,43 ----
      DISTCLEAN = cd ../idl ; rm -f idlparser.o idlscan.o
      IDLOBJS = ../idl/idlparser.o ../idl/idlscan.o
      #else
    ! DISTMAKE =
    ! DISTCLEAN =
    ! IDLOBJS =
      #endif
      
      $(IDLOBJS) :
    

  • Thanks to Damian Gilmurray and Vince Law for pointing out that the is-a probing in the IIOP code should start with a base type of "IDL:omg.org/CORBA/Object:1.0" rather than the ILU root object type.
    *** runtime/kernel/iiop.c	Thu Jun  4 14:03:43 1998
    --- 1.188	1998/06/04 22:08:31
    ***************
    *** 53,58 ****
    --- 53,60 ----
      #define CORBA_NATIVE_OBJECT_IH_PREFIX		"ilu--corba-native-object:"
      #define SIZEOF_CORBA_NATIVE_OBJECT_IH_PREFIX	(sizeof(CORBA_NATIVE_OBJECT_IH_PREFIX)-1)
      
    + #define CORBA_OBJECT_TYPE_ID			"IDL:omg.org/CORBA/Object:1.0"
    + 
      static ilu_boolean _IIOP_SendPacket(ilu_Call, ilu_boolean);
      
      static ilu_boolean Initialized = ilu_FALSE;
    ***************
    *** 1821,1826 ****
    --- 1823,1832 ----
        ilu_Class       pclass = object_class(o);
        ILU_ERRS((bad_locks, inv_objref, no_resources, IoErrs)) lerr;
        CheckTypeData	d;
    + 
    +   if ((pclass == ilu_rootClass) &&
    +       ((c = ilu_FindClassFromID (CORBA_OBJECT_TYPE_ID)) != NIL))
    +     pclass = c;
      
        if (class_singleton(pclass)) {
          ILU_NOTE(IIOP_DEBUG | OBJECT_DEBUG,
    

  • Thanks to Ron Frederick for pointing out that the functionality of _ilu_ConsumeByLoop() in debug.c is still broken, if threads are used. Here's a patch which fixes that -- a better fix will be in the next release.
    *** 1.1	1998/06/09 21:59:24
    --- runtime/kernel/debug.c	1998/06/09 22:08:57
    ***************
    *** 719,729 ****
      
      void     _ilu_ConsumeByLoop(const char *f, int l)
      {
    -   ILU_ERRPRINTF("Entering endless sleep loop (at line %d of %s)"
      #ifdef ILU_OS_THREADED
    ! 		", Thread ID = 0x%x\n", GET_CURRENT_THREAD()
      #endif
    ! 		,__LINE__ + 4, __FILE__);
        while (1)
      #ifdef WIN16
          Yield();
    --- 719,732 ----
      
      void     _ilu_ConsumeByLoop(const char *f, int l)
      {
      #ifdef ILU_OS_THREADED
    !   ILU_ERRPRINTF("ILU (thread 0x%x):  Entering endless sleep loop (at line %d of %s)",
    ! 		GET_CURRENT_THREAD(), __LINE__ + 4, __FILE__);
    ! #else
    !   ILU_ERRPRINTF("ILU:  Entering endless sleep loop (at line %d of %s)",
    ! 		__LINE__ + 4, __FILE__);
      #endif
    ! 
        while (1)
      #ifdef WIN16
          Yield();
    

  • java stubber generates bad code for optional enumerations. This patch fixes it.
    *** 1.17	1997/11/10 21:35:33
    --- stubbers/java/genopt.c	1998/06/11 21:33:43
    ***************
    *** 287,293 ****
              case card64_Type:	
              case real32_Type:		
              case real64_Type:		
    !         case enumeration_Type:		
                  return "java.lang.Number";
              default:
                  break;
    --- 287,293 ----
              case card64_Type:	
              case real32_Type:		
              case real64_Type:		
    !         /* removed a case */		
                  return "java.lang.Number";
              default:
                  break;
    

  • java runtime uses wrong type id for org.omg.CORBA.Object. Here is a fix.
    WARNING: This patch has been changed; a bad version of it was here for about 24 hours
    *** 1.2	1997/10/29 21:28:49
    --- runtime/java/CORBA_ObjectStub.java	1998/06/09 01:48:23
    ***************
    *** 40,46 ****
              CORBA_Object_classRep = xerox.ilu.IluClassRep.setupClass(
                  "org.omg.CORBA.Object", //java reference interface
    !             "ilu.org.omg.CORBA.Object", //ilu object type
    !             "IDL:org.omg.CORBA.Object:1.0", //uuid
                  0); //method count
              CORBA_Object_classRep.setOptional();
              CORBA_Object_classRep.setSurrClass(
    --- 40,46 ----
              CORBA_Object_classRep = xerox.ilu.IluClassRep.setupClass(
                  "org.omg.CORBA.Object", //java reference interface
    !             "ilu.CORBA-Object", //ilu object type
    !             "IDL:omg.org/CORBA/Object:1.0", //uuid
                  0); //method count
              CORBA_Object_classRep.setOptional();
              CORBA_Object_classRep.setSurrClass(
    *** 1.1	1997/08/20 20:47:22
    --- runtime/java/CORBA_ObjectHelper.java	1998/06/15 22:29:18
    ***************
    *** 22,29 ****
      package xerox.ilu;
      
      public class CORBA_ObjectHelper implements xerox.ilu.IluIOFunctions  {
          private final static java.lang.String _id = 
    !         "IDL:omg.com/CORBA/Object:1.0";
          
          private static xerox.ilu.IluTypeCode _tc =
              xerox.ilu.IluTypeCode.corba_objref();
    --- 22,29 ----
      package xerox.ilu;
      
      public class CORBA_ObjectHelper implements xerox.ilu.IluIOFunctions  {
          private final static java.lang.String _id = 
    !         "IDL:omg.org/CORBA/Object:1.0";
          
          private static xerox.ilu.IluTypeCode _tc =
              xerox.ilu.IluTypeCode.corba_objref();
    

  • Java runtime can be lured into bad initialization order dependencies. Using the command line argument to load after the rest of ilu puts client originated load request after ilu originated load request and can avoid some circular dependencies. This patch implements such a command line argument.
    *** 1.25	1997/09/29 21:52:05
    --- runtime/java/IluInit2.java	1998/06/25 20:55:04
    ***************
    *** 152,157 ****
    --- 152,165 ----
                          e.printStackTrace();
                          IluDebug.panic("initializing ilu");
                      }
    +                 
    +                 //load client specified classes
    +                 //do not use xerox.basics.Environment.load
    +                 //because ilu.load provides better initialization order
    +                 java.lang.String loadAlso = 
    +                     xerox.basics.Environment.getStringProp("ilu.load");
    +                 xerox.basics.Environment.loadClasses(loadAlso);
    +         
                  }
              }
          } //init
    

  • The parser will sometimes process the same file more than once, which can be a problem when stubbing several ISL files on the same command line. Moreover, due to the way in which the parser records information about what it's already stubbed, the type UIDs can be different depending on the order in which files are encountered! This patch fixes the problem.
    *** stubbers/parser/iluparse.c.dist	1998/07/02 04:13:37
    --- iluparse.c.dist	1998/07/02 04:22:07
    ***************
    *** 1161,1166 ****
    --- 1161,1167 ----
      }
      
      static list KnownInterfaces = NULL;
    + static list ProcessedFiles = NULL;	/* list of struct parse_s * */
      
      static void ClearExcnMark (Exception e, void *junk)
      {
    ***************
    *** 2149,2159 ****
    --- 2150,2167 ----
          return (FALSE);
      }
      
    + static boolean
    +   MatchProcessedFilename (struct parse_s *entry, char *filename)
    + {
    +   return (strcmp(entry->filename, filename) == 0);
    + }
    + 
      list ParseFile (string filename)
      {
        struct parse_s *new;
        int stat;
        list val = NULL;
    +   char *full_filename;
      
        iluparsedebug = ((getenv("ISLDEBUG") != NULL) ? 1 : 0);
      
    ***************
    *** 2163,2177 ****
        if (ActiveInterfaces == NULL)
          ActiveInterfaces = new_list();
      
    !   new = (struct parse_s *) iluparser_Malloc (sizeof(struct parse_s));
    !   new->filename = FigureFilename (filename, ".isl");
    !   new->interfaces = NULL;
    !   new->interface = NULL;
    !   new->input = NULL;
    !   new->line = 0;
    !   new->next = NULL;
    ! 
    !   if (new->filename == NULL)
          {
            list searched_dirs = GetSearchList();
            int i;
    --- 2171,2180 ----
        if (ActiveInterfaces == NULL)
          ActiveInterfaces = new_list();
      
    !   if (ProcessedFiles == NULL)
    !     ProcessedFiles = new_list();
    !   
    !   if ((full_filename = FigureFilename (filename, ".isl")) == NULL)
          {
            list searched_dirs = GetSearchList();
            int i;
    ***************
    *** 2183,2189 ****
            iluparser_Free(new);
            return (NULL);
          }
    !   
        new->next = CurrentParse;
        new->interface = NULL;
        new->line = 1;
    --- 2186,2203 ----
            iluparser_Free(new);
            return (NULL);
          }
    ! 
    !   if ((new = (struct parse_s *) list_find(ProcessedFiles,
    ! 					  (iluparser_FindProc) MatchProcessedFilename,
    ! 					  (void *) full_filename)) != NULL)
    !     return new->interfaces;
    ! 
    !   new = (struct parse_s *) iluparser_Malloc (sizeof(struct parse_s));
    !   new->filename = full_filename;
    !   new->interfaces = NULL;
    !   new->interface = NULL;
    !   new->input = NULL;
    !   new->line = 0;
        new->next = CurrentParse;
        new->interface = NULL;
        new->line = 1;
    ***************
    *** 2252,2265 ****
            while ((invalid_interface = (Interface) list_find (new->interfaces, (boolean (*)(refany, refany)) FixupInterface, new)) != NULL)
      	list_remove (new->interfaces, invalid_interface);      
            if (list_size(new->interfaces) == 0)
    ! 	{
    ! 	  iluparser_Free (new->interfaces);
    ! 	  val = NULL;
    ! 	}
            else
      	val = new->interfaces;
    !       iluparser_Free (new->filename);
    !       iluparser_Free (new);
          }
        else
          {
    --- 2266,2275 ----
            while ((invalid_interface = (Interface) list_find (new->interfaces, (boolean (*)(refany, refany)) FixupInterface, new)) != NULL)
      	list_remove (new->interfaces, invalid_interface);      
            if (list_size(new->interfaces) == 0)
    ! 	val = NULL;
            else
      	val = new->interfaces;
    !       list_insert(ProcessedFiles, new);
          }
        else
          {
    ***************
    *** 2538,2562 ****
      
      #if YYDEBUG != 0
      static const short yyrline[] = { 0,
    !   2339,  2345,  2352,  2356,  2362,  2364,  2369,  2373,  2377,  2381,
    !   2391,  2411,  2415,  2421,  2426,  2434,  2438,  2446,  2453,  2463,
    !   2467,  2473,  2508,  2534,  2556,  2560,  2564,  2568,  2572,  2576,
    !   2580,  2584,  2591,  2597,  2603,  2607,  2611,  2617,  2621,  2625,
    !   2629,  2633,  2637,  2641,  2647,  2695,  2701,  2704,  2737,  2740,
    !   2781,  2785,  2791,  2795,  2799,  2805,  2825,  2835,  2847,  2853,
    !   2860,  2876,  2880,  2886,  2898,  2902,  2908,  2917,  2923,  2931,
    !   2937,  2945,  2952,  2956,  2960,  2966,  2970,  2976,  2986,  2994,
    !   3003,  3007,  3013,  3020,  3027,  3033,  3041,  3045,  3049,  3056,
    !   3060,  3079,  3083,  3089,  3096,  3103,  3109,  3116,  3123,  3132,
    !   3154,  3177,  3181,  3187,  3191,  3198,  3202,  3206,  3213,  3219,
    !   3226,  3230,  3234,  3238,  3244,  3253,  3257,  3263,  3271,  3280,
    !   3311,  3315,  3321,  3327,  3333,  3339,  3345,  3351,  3357,  3363,
    !   3371,  3377,  3383,  3389,  3395,  3401,  3407,  3414,  3420,  3426,
    !   3432,  3436,  3442,  3450,  3457,  3463,  3471,  3500,  3504,  3511,
    !   3515,  3519,  3525,  3529,  3535,  3539,  3543,  3550,  3554,  3560,
    !   3564,  3570,  3573,  3576,  3596,  3600,  3606,  3623,  3630,  3637,
    !   3646,  3656,  3666,  3678,  3684,  3693,  3698,  3702,  3708,  3712,
    !   3716,  3722,  3746
      };
      #endif
      
    --- 2548,2572 ----
      
      #if YYDEBUG != 0
      static const short yyrline[] = { 0,
    !   2349,  2355,  2362,  2366,  2372,  2374,  2379,  2383,  2387,  2391,
    !   2401,  2421,  2425,  2431,  2436,  2444,  2448,  2456,  2463,  2473,
    !   2477,  2483,  2518,  2544,  2566,  2570,  2574,  2578,  2582,  2586,
    !   2590,  2594,  2601,  2607,  2613,  2617,  2621,  2627,  2631,  2635,
    !   2639,  2643,  2647,  2651,  2657,  2705,  2711,  2714,  2747,  2750,
    !   2791,  2795,  2801,  2805,  2809,  2815,  2835,  2845,  2857,  2863,
    !   2870,  2886,  2890,  2896,  2908,  2912,  2918,  2927,  2933,  2941,
    !   2947,  2955,  2962,  2966,  2970,  2976,  2980,  2986,  2996,  3004,
    !   3013,  3017,  3023,  3030,  3037,  3043,  3051,  3055,  3059,  3066,
    !   3070,  3089,  3093,  3099,  3106,  3113,  3119,  3126,  3133,  3142,
    !   3164,  3187,  3191,  3197,  3201,  3208,  3212,  3216,  3223,  3229,
    !   3236,  3240,  3244,  3248,  3254,  3263,  3267,  3273,  3281,  3290,
    !   3321,  3325,  3331,  3337,  3343,  3349,  3355,  3361,  3367,  3373,
    !   3381,  3387,  3393,  3399,  3405,  3411,  3417,  3424,  3430,  3436,
    !   3442,  3446,  3452,  3460,  3467,  3473,  3481,  3510,  3514,  3521,
    !   3525,  3529,  3535,  3539,  3545,  3549,  3553,  3560,  3564,  3570,
    !   3574,  3580,  3583,  3586,  3606,  3610,  3616,  3633,  3640,  3647,
    !   3656,  3666,  3676,  3688,  3694,  3703,  3708,  3712,  3718,  3722,
    !   3726,  3732,  3756
      };
      #endif
      
    ***************
    *** 3291,3297 ****
        switch (yyn) {
      
      case 1:
    ! #line 2340 "ilu.bison"
      {
        CurrentParse->interfaces = new_list();
        list_insert(CurrentParse->interfaces, yyvsp[0]);
    --- 3301,3307 ----
        switch (yyn) {
      
      case 1:
    ! #line 2350 "ilu.bison"
      {
        CurrentParse->interfaces = new_list();
        list_insert(CurrentParse->interfaces, yyvsp[0]);
    ***************
    *** 3299,3343 ****
      ;
          break;}
      case 2:
    ! #line 2346 "ilu.bison"
      {
        list_insert ((list) yyvsp[-1], yyvsp[0]);
        yyval = yyvsp[-1];
      ;
          break;}
      case 3:
    ! #line 2353 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 4:
    ! #line 2357 "ilu.bison"
      {
        iluerror ("Bad interface description.");
        YYABORT;
      ;
          break;}
      case 7:
    ! #line 2370 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 8:
    ! #line 2374 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 9:
    ! #line 2378 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 10:
    ! #line 2382 "ilu.bison"
      {
        iluerror ("Bad statement.");
        yyerrok;
    --- 3309,3353 ----
      ;
          break;}
      case 2:
    ! #line 2356 "ilu.bison"
      {
        list_insert ((list) yyvsp[-1], yyvsp[0]);
        yyval = yyvsp[-1];
      ;
          break;}
      case 3:
    ! #line 2363 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 4:
    ! #line 2367 "ilu.bison"
      {
        iluerror ("Bad interface description.");
        YYABORT;
      ;
          break;}
      case 7:
    ! #line 2380 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 8:
    ! #line 2384 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 9:
    ! #line 2388 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 10:
    ! #line 2392 "ilu.bison"
      {
        iluerror ("Bad statement.");
        yyerrok;
    ***************
    *** 3347,3353 ****
      ;
          break;}
      case 11:
    ! #line 2392 "ilu.bison"
      {
        CurrentParse->interface = new_Interface(yyvsp[-2]);
        CurrentParse->interface->brand = (string) yyvsp[-1];
    --- 3357,3363 ----
      ;
          break;}
      case 11:
    ! #line 2402 "ilu.bison"
      {
        CurrentParse->interface = new_Interface(yyvsp[-2]);
        CurrentParse->interface->brand = (string) yyvsp[-1];
    ***************
    *** 3367,3404 ****
      ;
          break;}
      case 12:
    ! #line 2412 "ilu.bison"
      {
        yyval = NULL;
      ;
          break;}
      case 13:
    ! #line 2416 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 14:
    ! #line 2422 "ilu.bison"
      {
        list new = new_list();
        yyval = (refany) new;
      ;
          break;}
      case 15:
    ! #line 2428 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 16:
    ! #line 2435 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 17:
    ! #line 2439 "ilu.bison"
      {
        iluerror ("Missing END statement in import list.");
        yyerrok;
    --- 3377,3414 ----
      ;
          break;}
      case 12:
    ! #line 2422 "ilu.bison"
      {
        yyval = NULL;
      ;
          break;}
      case 13:
    ! #line 2426 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 14:
    ! #line 2432 "ilu.bison"
      {
        list new = new_list();
        yyval = (refany) new;
      ;
          break;}
      case 15:
    ! #line 2438 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 16:
    ! #line 2445 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 17:
    ! #line 2449 "ilu.bison"
      {
        iluerror ("Missing END statement in import list.");
        yyerrok;
    ***************
    *** 3406,3412 ****
      ;
          break;}
      case 18:
    ! #line 2447 "ilu.bison"
      {
        list new = new_list();
      
    --- 3416,3422 ----
      ;
          break;}
      case 18:
    ! #line 2457 "ilu.bison"
      {
        list new = new_list();
      
    ***************
    *** 3415,3421 ****
      ;
          break;}
      case 19:
    ! #line 2454 "ilu.bison"
      {
        if (!has_imported((list) yyvsp[-2], ((Imported) yyvsp[0])->name))
          list_insert (yyvsp[-2], yyvsp[0]);
    --- 3425,3431 ----
      ;
          break;}
      case 19:
    ! #line 2464 "ilu.bison"
      {
        if (!has_imported((list) yyvsp[-2], ((Imported) yyvsp[0])->name))
          list_insert (yyvsp[-2], yyvsp[0]);
    ***************
    *** 3425,3443 ****
      ;
          break;}
      case 20:
    ! #line 2464 "ilu.bison"
      {
        yyval = (refany) new_Imported (yyvsp[0], NULL);
      ;
          break;}
      case 21:
    ! #line 2468 "ilu.bison"
      {
        yyval = (refany) new_Imported (yyvsp[-2], yyvsp[0]);
      ;
          break;}
      case 22:
    ! #line 2474 "ilu.bison"
      {
        Type            new = FIND_OR_CREATE_TYPE(yyvsp[-4]);
        if (new->def != 0) {
    --- 3435,3453 ----
      ;
          break;}
      case 20:
    ! #line 2474 "ilu.bison"
      {
        yyval = (refany) new_Imported (yyvsp[0], NULL);
      ;
          break;}
      case 21:
    ! #line 2478 "ilu.bison"
      {
        yyval = (refany) new_Imported (yyvsp[-2], yyvsp[0]);
      ;
          break;}
      case 22:
    ! #line 2484 "ilu.bison"
      {
        Type            new = FIND_OR_CREATE_TYPE(yyvsp[-4]);
        if (new->def != 0) {
    ***************
    *** 3474,3480 ****
      ;
          break;}
      case 23:
    ! #line 2509 "ilu.bison"
      {
        Type            new = NULL;
      
    --- 3484,3490 ----
      ;
          break;}
      case 23:
    ! #line 2519 "ilu.bison"
      {
        Type            new = NULL;
      
    ***************
    *** 3502,3508 ****
      ;
          break;}
      case 24:
    ! #line 2535 "ilu.bison"
      {
        Type            new = FIND_OR_CREATE_TYPE(yyvsp[-3]);
        if (new->def != 0) {
    --- 3512,3518 ----
      ;
          break;}
      case 24:
    ! #line 2545 "ilu.bison"
      {
        Type            new = FIND_OR_CREATE_TYPE(yyvsp[-3]);
        if (new->def != 0) {
    ***************
    *** 3523,3571 ****
      ;
          break;}
      case 25:
    ! #line 2557 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 26:
    ! #line 2561 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 27:
    ! #line 2565 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 28:
    ! #line 2569 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 29:
    ! #line 2573 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 30:
    ! #line 2577 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 31:
    ! #line 2581 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 32:
    ! #line 2585 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = optional_Type;
    --- 3533,3581 ----
      ;
          break;}
      case 25:
    ! #line 2567 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 26:
    ! #line 2571 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 27:
    ! #line 2575 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 28:
    ! #line 2579 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 29:
    ! #line 2583 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 30:
    ! #line 2587 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 31:
    ! #line 2591 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 32:
    ! #line 2595 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = optional_Type;
    ***************
    *** 3574,3652 ****
      ;
          break;}
      case 33:
    ! #line 2592 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 34:
    ! #line 2598 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 35:
    ! #line 2604 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 36:
    ! #line 2608 "ilu.bison"
      {
        yyval = (refany) K_LONG;
      ;
          break;}
      case 37:
    ! #line 2612 "ilu.bison"
      {
        yyval = (refany) K_SHORT;
      ;
          break;}
      case 38:
    ! #line 2618 "ilu.bison"
      {
        yyval = (refany) ((((int)yyvsp[-1]) == 0) ? integer_Type : ((((int)yyvsp[-1]) == K_SHORT) ? shortinteger_Type : longinteger_Type));
      ;
          break;}
      case 39:
    ! #line 2622 "ilu.bison"
      {
        yyval = (refany) ((((int)yyvsp[-1]) == 0) ? cardinal_Type : ((((int)yyvsp[-1]) == K_SHORT) ? shortcardinal_Type : longcardinal_Type));
      ;
          break;}
      case 40:
    ! #line 2626 "ilu.bison"
      {
        yyval = (refany) ((((int)yyvsp[-1]) == 0) ? real_Type : ((((int)yyvsp[-1]) == K_SHORT) ? shortreal_Type : longreal_Type));
      ;
          break;}
      case 41:
    ! #line 2630 "ilu.bison"
      {
        yyval = (refany) ((((int)yyvsp[-1]) == 0 || ((int)yyvsp[-1]) == K_LONG) ? character_Type : shortcharacter_Type);
      ;
          break;}
      case 42:
    ! #line 2634 "ilu.bison"
      {
        yyval = (refany) boolean_Type;
      ;
          break;}
      case 43:
    ! #line 2638 "ilu.bison"
      {
        yyval = (refany) byte_Type;
      ;
          break;}
      case 44:
    ! #line 2642 "ilu.bison"
      {
        yyval = (refany) pickle_Type;
      ;
          break;}
      case 45:
    ! #line 2648 "ilu.bison"
      {
        matchname_s s;
      #define BTN(sss,nnn,iii)	((sss).name=(nnn),(sss).interface=(iii),&sss)
    --- 3584,3662 ----
      ;
          break;}
      case 33:
    ! #line 2602 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 34:
    ! #line 2608 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 35:
    ! #line 2614 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 36:
    ! #line 2618 "ilu.bison"
      {
        yyval = (refany) K_LONG;
      ;
          break;}
      case 37:
    ! #line 2622 "ilu.bison"
      {
        yyval = (refany) K_SHORT;
      ;
          break;}
      case 38:
    ! #line 2628 "ilu.bison"
      {
        yyval = (refany) ((((int)yyvsp[-1]) == 0) ? integer_Type : ((((int)yyvsp[-1]) == K_SHORT) ? shortinteger_Type : longinteger_Type));
      ;
          break;}
      case 39:
    ! #line 2632 "ilu.bison"
      {
        yyval = (refany) ((((int)yyvsp[-1]) == 0) ? cardinal_Type : ((((int)yyvsp[-1]) == K_SHORT) ? shortcardinal_Type : longcardinal_Type));
      ;
          break;}
      case 40:
    ! #line 2636 "ilu.bison"
      {
        yyval = (refany) ((((int)yyvsp[-1]) == 0) ? real_Type : ((((int)yyvsp[-1]) == K_SHORT) ? shortreal_Type : longreal_Type));
      ;
          break;}
      case 41:
    ! #line 2640 "ilu.bison"
      {
        yyval = (refany) ((((int)yyvsp[-1]) == 0 || ((int)yyvsp[-1]) == K_LONG) ? character_Type : shortcharacter_Type);
      ;
          break;}
      case 42:
    ! #line 2644 "ilu.bison"
      {
        yyval = (refany) boolean_Type;
      ;
          break;}
      case 43:
    ! #line 2648 "ilu.bison"
      {
        yyval = (refany) byte_Type;
      ;
          break;}
      case 44:
    ! #line 2652 "ilu.bison"
      {
        yyval = (refany) pickle_Type;
      ;
          break;}
      case 45:
    ! #line 2658 "ilu.bison"
      {
        matchname_s s;
      #define BTN(sss,nnn,iii)	((sss).name=(nnn),(sss).interface=(iii),&sss)
    ***************
    *** 3696,3712 ****
      ;
          break;}
      case 46:
    ! #line 2696 "ilu.bison"
      {
        yyval = (refany) FIND_OR_CREATE_TYPE(yyvsp[0]);
      ;
          break;}
      case 47:
    ! #line 2702 "ilu.bison"
      { ParsingConstant = TRUE; ;
          break;}
      case 48:
    ! #line 2705 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        unsigned long limit = (unsigned long) yyvsp[-2];
    --- 3706,3722 ----
      ;
          break;}
      case 46:
    ! #line 2706 "ilu.bison"
      {
        yyval = (refany) FIND_OR_CREATE_TYPE(yyvsp[0]);
      ;
          break;}
      case 47:
    ! #line 2712 "ilu.bison"
      { ParsingConstant = TRUE; ;
          break;}
      case 48:
    ! #line 2715 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        unsigned long limit = (unsigned long) yyvsp[-2];
    ***************
    *** 3739,3749 ****
      ;
          break;}
      case 49:
    ! #line 2738 "ilu.bison"
      { ParsingConstant = TRUE; ;
          break;}
      case 50:
    ! #line 2742 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        IntegerLiteral maxnum = (IntegerLiteral) yyvsp[-2];
    --- 3749,3759 ----
      ;
          break;}
      case 49:
    ! #line 2748 "ilu.bison"
      { ParsingConstant = TRUE; ;
          break;}
      case 50:
    ! #line 2752 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        IntegerLiteral maxnum = (IntegerLiteral) yyvsp[-2];
    ***************
    *** 3783,3819 ****
      ;
          break;}
      case 51:
    ! #line 2782 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 52:
    ! #line 2786 "ilu.bison"
      {
        yyval = (refany) yyval;
      ;
          break;}
      case 53:
    ! #line 2792 "ilu.bison"
      {
        yyval = (refany) ISO_UNICODE_CHARSET;
      ;
          break;}
      case 54:
    ! #line 2796 "ilu.bison"
      {
        yyval = (refany) ISO_8859_1_CHARSET;
      ;
          break;}
      case 55:
    ! #line 2800 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 56:
    ! #line 2806 "ilu.bison"
      {
        unsigned long val;
        int sign;
    --- 3793,3829 ----
      ;
          break;}
      case 51:
    ! #line 2792 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 52:
    ! #line 2796 "ilu.bison"
      {
        yyval = (refany) yyval;
      ;
          break;}
      case 53:
    ! #line 2802 "ilu.bison"
      {
        yyval = (refany) ISO_UNICODE_CHARSET;
      ;
          break;}
      case 54:
    ! #line 2806 "ilu.bison"
      {
        yyval = (refany) ISO_8859_1_CHARSET;
      ;
          break;}
      case 55:
    ! #line 2810 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 56:
    ! #line 2816 "ilu.bison"
      {
        unsigned long val;
        int sign;
    ***************
    *** 3834,3840 ****
      ;
          break;}
      case 57:
    ! #line 2826 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = array_Type;
    --- 3844,3850 ----
      ;
          break;}
      case 57:
    ! #line 2836 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = array_Type;
    ***************
    *** 3846,3852 ****
      ;
          break;}
      case 58:
    ! #line 2836 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = array_Type;
    --- 3856,3862 ----
      ;
          break;}
      case 58:
    ! #line 2846 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = array_Type;
    ***************
    *** 3858,3864 ****
      ;
          break;}
      case 59:
    ! #line 2848 "ilu.bison"
      {
        list new = new_list();
        list_insert (new, (refany) ilu_atoi(yyvsp[0]));
    --- 3868,3874 ----
      ;
          break;}
      case 59:
    ! #line 2858 "ilu.bison"
      {
        list new = new_list();
        list_insert (new, (refany) ilu_atoi(yyvsp[0]));
    ***************
    *** 3866,3879 ****
      ;
          break;}
      case 60:
    ! #line 2854 "ilu.bison"
      {
        list_insert (yyvsp[-2], (refany) ilu_atoi(yyvsp[0]));
        yyval = (refany) yyvsp[-2];
      ;
          break;}
      case 61:
    ! #line 2861 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = sequence_Type;
    --- 3876,3889 ----
      ;
          break;}
      case 60:
    ! #line 2864 "ilu.bison"
      {
        list_insert (yyvsp[-2], (refany) ilu_atoi(yyvsp[0]));
        yyval = (refany) yyvsp[-2];
      ;
          break;}
      case 61:
    ! #line 2871 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = sequence_Type;
    ***************
    *** 3889,3907 ****
      ;
          break;}
      case 62:
    ! #line 2877 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 63:
    ! #line 2881 "ilu.bison"
      {
        yyval = (refany) ilu_atoi(yyvsp[0]);
      ;
          break;}
      case 64:
    ! #line 2887 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = pipe_Type;
    --- 3899,3917 ----
      ;
          break;}
      case 62:
    ! #line 2887 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 63:
    ! #line 2891 "ilu.bison"
      {
        yyval = (refany) ilu_atoi(yyvsp[0]);
      ;
          break;}
      case 64:
    ! #line 2897 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = pipe_Type;
    ***************
    *** 3913,3931 ****
      ;
          break;}
      case 65:
    ! #line 2899 "ilu.bison"
      {
        yyval = (refany) FALSE;
      ;
          break;}
      case 66:
    ! #line 2903 "ilu.bison"
      {
        yyval = (refany) TRUE;
      ;
          break;}
      case 67:
    ! #line 2909 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = record_Type;
    --- 3923,3941 ----
      ;
          break;}
      case 65:
    ! #line 2909 "ilu.bison"
      {
        yyval = (refany) FALSE;
      ;
          break;}
      case 66:
    ! #line 2913 "ilu.bison"
      {
        yyval = (refany) TRUE;
      ;
          break;}
      case 67:
    ! #line 2919 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = record_Type;
    ***************
    *** 3936,3942 ****
      ;
          break;}
      case 68:
    ! #line 2918 "ilu.bison"
      {
        iluerror ("Error on record field definitions.");
        yyerrok;
    --- 3946,3952 ----
      ;
          break;}
      case 68:
    ! #line 2928 "ilu.bison"
      {
        iluerror ("Error on record field definitions.");
        yyerrok;
    ***************
    *** 3944,3950 ****
      ;
          break;}
      case 69:
    ! #line 2924 "ilu.bison"
      {
        iluerror( "Missing 'End' in record definition" );
        yyerrok;
    --- 3954,3960 ----
      ;
          break;}
      case 69:
    ! #line 2934 "ilu.bison"
      {
        iluerror( "Missing 'End' in record definition" );
        yyerrok;
    ***************
    *** 3952,3958 ****
      ;
          break;}
      case 70:
    ! #line 2932 "ilu.bison"
      {
        list new = new_list();
        list_insert (new, yyvsp[0]);
    --- 3962,3968 ----
      ;
          break;}
      case 70:
    ! #line 2942 "ilu.bison"
      {
        list new = new_list();
        list_insert (new, yyvsp[0]);
    ***************
    *** 3960,4010 ****
      ;
          break;}
      case 71:
    ! #line 2939 "ilu.bison"
      {
        list_insert (yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 72:
    ! #line 2946 "ilu.bison"
      {
        list_insert (((Type)yyvsp[0])->refs, (refany) CurrentParse->line);
        yyval = (refany) argument_Create ((string) yyvsp[-2], (Type) yyvsp[0], FALSE, In, CurrentParse->line, NULL);
      ;
          break;}
      case 73:
    ! #line 2953 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 74:
    ! #line 2957 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 75:
    ! #line 2961 "ilu.bison"
      {
        yyval = (refany) 1;
      ;
          break;}
      case 76:
    ! #line 2967 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 77:
    ! #line 2971 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 78:
    ! #line 2977 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = union_Type;
    --- 3970,4020 ----
      ;
          break;}
      case 71:
    ! #line 2949 "ilu.bison"
      {
        list_insert (yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 72:
    ! #line 2956 "ilu.bison"
      {
        list_insert (((Type)yyvsp[0])->refs, (refany) CurrentParse->line);
        yyval = (refany) argument_Create ((string) yyvsp[-2], (Type) yyvsp[0], FALSE, In, CurrentParse->line, NULL);
      ;
          break;}
      case 73:
    ! #line 2963 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 74:
    ! #line 2967 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 75:
    ! #line 2971 "ilu.bison"
      {
        yyval = (refany) 1;
      ;
          break;}
      case 76:
    ! #line 2977 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 77:
    ! #line 2981 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 78:
    ! #line 2987 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = union_Type;
    ***************
    *** 4016,4029 ****
      ;
          break;}
      case 79:
    ! #line 2987 "ilu.bison"
      {
        iluerror ("missing 'END' in Union description.");
        yyerrok;
      ;
          break;}
      case 80:
    ! #line 2995 "ilu.bison"
      {
        if (yyvsp[-1] != NULL)
          yyval = yyvsp[-1];
    --- 4026,4039 ----
      ;
          break;}
      case 79:
    ! #line 2997 "ilu.bison"
      {
        iluerror ("missing 'END' in Union description.");
        yyerrok;
      ;
          break;}
      case 80:
    ! #line 3005 "ilu.bison"
      {
        if (yyvsp[-1] != NULL)
          yyval = yyvsp[-1];
    ***************
    *** 4032,4050 ****
      ;
          break;}
      case 81:
    ! #line 3004 "ilu.bison"
      {
        yyval = NULL;
      ;
          break;}
      case 82:
    ! #line 3008 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 83:
    ! #line 3014 "ilu.bison"
      {
        list new;
        new = new_list();
    --- 4042,4060 ----
      ;
          break;}
      case 81:
    ! #line 3014 "ilu.bison"
      {
        yyval = NULL;
      ;
          break;}
      case 82:
    ! #line 3018 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 83:
    ! #line 3024 "ilu.bison"
      {
        list new;
        new = new_list();
    ***************
    *** 4053,4066 ****
      ;
          break;}
      case 84:
    ! #line 3021 "ilu.bison"
      {
        list_insert((list) yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 85:
    ! #line 3028 "ilu.bison"
      {
        list_insert(((Type) yyvsp[-1])->refs, (refany) CurrentParse->line);
        yyval = argument_Create((string) NULL, (Type) yyvsp[-1], FALSE, In,
    --- 4063,4076 ----
      ;
          break;}
      case 84:
    ! #line 3031 "ilu.bison"
      {
        list_insert((list) yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 85:
    ! #line 3038 "ilu.bison"
      {
        list_insert(((Type) yyvsp[-1])->refs, (refany) CurrentParse->line);
        yyval = argument_Create((string) NULL, (Type) yyvsp[-1], FALSE, In,
    ***************
    *** 4068,4074 ****
      ;
          break;}
      case 86:
    ! #line 3034 "ilu.bison"
      {
        list_insert(((Type) yyvsp[-1])->refs, (refany) CurrentParse->line);
        yyval = argument_Create((string) yyvsp[-3], (Type) yyvsp[-1], FALSE, In, CurrentParse->line,
    --- 4078,4084 ----
      ;
          break;}
      case 86:
    ! #line 3044 "ilu.bison"
      {
        list_insert(((Type) yyvsp[-1])->refs, (refany) CurrentParse->line);
        yyval = argument_Create((string) yyvsp[-3], (Type) yyvsp[-1], FALSE, In, CurrentParse->line,
    ***************
    *** 4076,4093 ****
      ;
          break;}
      case 87:
    ! #line 3042 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 88:
    ! #line 3046 "ilu.bison"
      { ParsingConstant = TRUE;
      			    ParsingNonRealConstant = TRUE; ;
          break;}
      case 89:
    ! #line 3049 "ilu.bison"
      { 
        yyval = yyvsp[0];
        ParsingNonRealConstant = FALSE;
    --- 4086,4103 ----
      ;
          break;}
      case 87:
    ! #line 3052 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 88:
    ! #line 3056 "ilu.bison"
      { ParsingConstant = TRUE;
      			    ParsingNonRealConstant = TRUE; ;
          break;}
      case 89:
    ! #line 3059 "ilu.bison"
      { 
        yyval = yyvsp[0];
        ParsingNonRealConstant = FALSE;
    ***************
    *** 4095,4107 ****
      ;
          break;}
      case 90:
    ! #line 3057 "ilu.bison"
      { 
        yyval = (refany) &iluparser_DefaultUnionArm;
      ;
          break;}
      case 91:
    ! #line 3061 "ilu.bison"
      {
        list values = (list) yyvsp[-1];
        unsigned long i, n;
    --- 4105,4117 ----
      ;
          break;}
      case 90:
    ! #line 3067 "ilu.bison"
      { 
        yyval = (refany) &iluparser_DefaultUnionArm;
      ;
          break;}
      case 91:
    ! #line 3071 "ilu.bison"
      {
        list values = (list) yyvsp[-1];
        unsigned long i, n;
    ***************
    *** 4120,4138 ****
      ;
          break;}
      case 92:
    ! #line 3080 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 93:
    ! #line 3084 "ilu.bison"
      {
        yyval = (refany) 1;
      ;
          break;}
      case 94:
    ! #line 3090 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = enumeration_Type;
    --- 4130,4148 ----
      ;
          break;}
      case 92:
    ! #line 3090 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 93:
    ! #line 3094 "ilu.bison"
      {
        yyval = (refany) 1;
      ;
          break;}
      case 94:
    ! #line 3100 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
        new->type = enumeration_Type;
    ***************
    *** 4141,4154 ****
      ;
          break;}
      case 95:
    ! #line 3097 "ilu.bison"
      {
        iluerror ("Missing 'END' in enumeration element list.");
        yyerrok;
      ;
          break;}
      case 96:
    ! #line 3104 "ilu.bison"
      {
        list new = new_list();
        list_insert (new, yyvsp[0]);
    --- 4151,4164 ----
      ;
          break;}
      case 95:
    ! #line 3107 "ilu.bison"
      {
        iluerror ("Missing 'END' in enumeration element list.");
        yyerrok;
      ;
          break;}
      case 96:
    ! #line 3114 "ilu.bison"
      {
        list new = new_list();
        list_insert (new, yyvsp[0]);
    ***************
    *** 4156,4169 ****
      ;
          break;}
      case 97:
    ! #line 3110 "ilu.bison"
      {
        list_insert ((list) yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 98:
    ! #line 3117 "ilu.bison"
      {
        EnumField new = (EnumField) iluparser_Malloc(sizeof(struct enumerationField_s));
        new->name = yyvsp[0];
    --- 4166,4179 ----
      ;
          break;}
      case 97:
    ! #line 3120 "ilu.bison"
      {
        list_insert ((list) yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 98:
    ! #line 3127 "ilu.bison"
      {
        EnumField new = (EnumField) iluparser_Malloc(sizeof(struct enumerationField_s));
        new->name = yyvsp[0];
    ***************
    *** 4172,4178 ****
      ;
          break;}
      case 99:
    ! #line 3124 "ilu.bison"
      {
        EnumField new = (EnumField) iluparser_Malloc(sizeof(struct enumerationField_s));
        new->name = yyvsp[-2];
    --- 4182,4188 ----
      ;
          break;}
      case 99:
    ! #line 3134 "ilu.bison"
      {
        EnumField new = (EnumField) iluparser_Malloc(sizeof(struct enumerationField_s));
        new->name = yyvsp[-2];
    ***************
    *** 4181,4187 ****
      ;
          break;}
      case 100:
    ! #line 3133 "ilu.bison"
      {
        Exception new = FIND_OR_CREATE_EXCEPTION (yyvsp[-4]);
        if (new->def != 0)
    --- 4191,4197 ----
      ;
          break;}
      case 100:
    ! #line 3143 "ilu.bison"
      {
        Exception new = FIND_OR_CREATE_EXCEPTION (yyvsp[-4]);
        if (new->def != 0)
    ***************
    *** 4203,4209 ****
      ;
          break;}
      case 101:
    ! #line 3155 "ilu.bison"
      {
        char *p = strchr((char *) yyvsp[0], ':');
        if (p == NULL)
    --- 4213,4219 ----
      ;
          break;}
      case 101:
    ! #line 3165 "ilu.bison"
      {
        char *p = strchr((char *) yyvsp[0], ':');
        if (p == NULL)
    ***************
    *** 4226,4276 ****
      ;
          break;}
      case 102:
    ! #line 3178 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 103:
    ! #line 3182 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 104:
    ! #line 3188 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 105:
    ! #line 3192 "ilu.bison"
      {
        list_insert (((Type) yyvsp[0])->refs, (refany) CurrentParse->line);
        yyval = yyvsp[0];
      ;
          break;}
      case 106:
    ! #line 3199 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 107:
    ! #line 3203 "ilu.bison"
      {
        yyval = (refany) new_list();
      ;
          break;}
      case 108:
    ! #line 3207 "ilu.bison"
      {
        yyerrok;
        yyval = (refany) NULL;
      ;
          break;}
      case 109:
    ! #line 3214 "ilu.bison"
      {
        list new = new_list();
        list_insert (new, yyvsp[0]);
    --- 4236,4286 ----
      ;
          break;}
      case 102:
    ! #line 3188 "ilu.bison"
      {
        yyval = (refany) 0;
      ;
          break;}
      case 103:
    ! #line 3192 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 104:
    ! #line 3198 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 105:
    ! #line 3202 "ilu.bison"
      {
        list_insert (((Type) yyvsp[0])->refs, (refany) CurrentParse->line);
        yyval = yyvsp[0];
      ;
          break;}
      case 106:
    ! #line 3209 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 107:
    ! #line 3213 "ilu.bison"
      {
        yyval = (refany) new_list();
      ;
          break;}
      case 108:
    ! #line 3217 "ilu.bison"
      {
        yyerrok;
        yyval = (refany) NULL;
      ;
          break;}
      case 109:
    ! #line 3224 "ilu.bison"
      {
        list new = new_list();
        list_insert (new, yyvsp[0]);
    ***************
    *** 4278,4315 ****
      ;
          break;}
      case 110:
    ! #line 3220 "ilu.bison"
      {
        list_insert (yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 111:
    ! #line 3227 "ilu.bison"
      {
        yyval = (refany) In;
      ;
          break;}
      case 112:
    ! #line 3231 "ilu.bison"
      {
        yyval = (refany) In;
      ;
          break;}
      case 113:
    ! #line 3235 "ilu.bison"
      {
        yyval = (refany) Out;
      ;
          break;}
      case 114:
    ! #line 3239 "ilu.bison"
      {
        yyval = (refany) InOut;
      ;
          break;}
      case 115:
    ! #line 3245 "ilu.bison"
      {
        /* name, type, sibling, direction, line_def */
        Argument new = argument_Create (yyvsp[-3], yyvsp[0], (boolean) yyvsp[-1], (ArgDirection) yyvsp[-4], CurrentParse->line, NULL);
    --- 4288,4325 ----
      ;
          break;}
      case 110:
    ! #line 3230 "ilu.bison"
      {
        list_insert (yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 111:
    ! #line 3237 "ilu.bison"
      {
        yyval = (refany) In;
      ;
          break;}
      case 112:
    ! #line 3241 "ilu.bison"
      {
        yyval = (refany) In;
      ;
          break;}
      case 113:
    ! #line 3245 "ilu.bison"
      {
        yyval = (refany) Out;
      ;
          break;}
      case 114:
    ! #line 3249 "ilu.bison"
      {
        yyval = (refany) InOut;
      ;
          break;}
      case 115:
    ! #line 3255 "ilu.bison"
      {
        /* name, type, sibling, direction, line_def */
        Argument new = argument_Create (yyvsp[-3], yyvsp[0], (boolean) yyvsp[-1], (ArgDirection) yyvsp[-4], CurrentParse->line, NULL);
    ***************
    *** 4318,4336 ****
      ;
          break;}
      case 116:
    ! #line 3254 "ilu.bison"
      {
        yyval = (refany) FALSE;
      ;
          break;}
      case 117:
    ! #line 3258 "ilu.bison"
      {
        yyval = (refany) TRUE;
      ;
          break;}
      case 118:
    ! #line 3264 "ilu.bison"
      {
        list l = new_list();
        Exception new = FIND_OR_CREATE_EXCEPTION (yyvsp[0]);
    --- 4328,4346 ----
      ;
          break;}
      case 116:
    ! #line 3264 "ilu.bison"
      {
        yyval = (refany) FALSE;
      ;
          break;}
      case 117:
    ! #line 3268 "ilu.bison"
      {
        yyval = (refany) TRUE;
      ;
          break;}
      case 118:
    ! #line 3274 "ilu.bison"
      {
        list l = new_list();
        Exception new = FIND_OR_CREATE_EXCEPTION (yyvsp[0]);
    ***************
    *** 4340,4346 ****
      ;
          break;}
      case 119:
    ! #line 3272 "ilu.bison"
      {
        Exception new = FIND_OR_CREATE_EXCEPTION (yyvsp[0]);
        list_insert (yyvsp[-2], new);
    --- 4350,4356 ----
      ;
          break;}
      case 119:
    ! #line 3282 "ilu.bison"
      {
        Exception new = FIND_OR_CREATE_EXCEPTION (yyvsp[0]);
        list_insert (yyvsp[-2], new);
    ***************
    *** 4349,4355 ****
      ;
          break;}
      case 120:
    ! #line 3282 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
      
    --- 4359,4365 ----
      ;
          break;}
      case 120:
    ! #line 3292 "ilu.bison"
      {
        TypeDescription new = new_TypeDescription();
      
    ***************
    *** 4379,4391 ****
      ;
          break;}
      case 121:
    ! #line 3312 "ilu.bison"
      {
        yyval = (refany) new_list();
      ;
          break;}
      case 122:
    ! #line 3316 "ilu.bison"
      {
        O_Brand.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Brand);
    --- 4389,4401 ----
      ;
          break;}
      case 121:
    ! #line 3322 "ilu.bison"
      {
        yyval = (refany) new_list();
      ;
          break;}
      case 122:
    ! #line 3326 "ilu.bison"
      {
        O_Brand.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Brand);
    ***************
    *** 4393,4399 ****
      ;
          break;}
      case 123:
    ! #line 3322 "ilu.bison"
      {
        O_Collectible.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Collectible);
    --- 4403,4409 ----
      ;
          break;}
      case 123:
    ! #line 3332 "ilu.bison"
      {
        O_Collectible.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Collectible);
    ***************
    *** 4401,4407 ****
      ;
          break;}
      case 124:
    ! #line 3328 "ilu.bison"
      {
        O_Optional.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Optional);
    --- 4411,4417 ----
      ;
          break;}
      case 124:
    ! #line 3338 "ilu.bison"
      {
        O_Optional.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Optional);
    ***************
    *** 4409,4415 ****
      ;
          break;}
      case 125:
    ! #line 3334 "ilu.bison"
      {
        O_Singleton.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Singleton);
    --- 4419,4425 ----
      ;
          break;}
      case 125:
    ! #line 3344 "ilu.bison"
      {
        O_Singleton.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Singleton);
    ***************
    *** 4417,4423 ****
      ;
          break;}
      case 126:
    ! #line 3340 "ilu.bison"
      {
        O_Superclasses.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Superclasses);
    --- 4427,4433 ----
      ;
          break;}
      case 126:
    ! #line 3350 "ilu.bison"
      {
        O_Superclasses.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Superclasses);
    ***************
    *** 4425,4431 ****
      ;
          break;}
      case 127:
    ! #line 3346 "ilu.bison"
      {
        O_Authentication.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Authentication);
    --- 4435,4441 ----
      ;
          break;}
      case 127:
    ! #line 3356 "ilu.bison"
      {
        O_Authentication.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Authentication);
    ***************
    *** 4433,4439 ****
      ;
          break;}
      case 128:
    ! #line 3352 "ilu.bison"
      {
        O_RepositoryID.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_RepositoryID);
    --- 4443,4449 ----
      ;
          break;}
      case 128:
    ! #line 3362 "ilu.bison"
      {
        O_RepositoryID.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_RepositoryID);
    ***************
    *** 4441,4447 ****
      ;
          break;}
      case 129:
    ! #line 3358 "ilu.bison"
      {
        O_Methods.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Methods);
    --- 4451,4457 ----
      ;
          break;}
      case 129:
    ! #line 3368 "ilu.bison"
      {
        O_Methods.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Methods);
    ***************
    *** 4449,4455 ****
      ;
          break;}
      case 130:
    ! #line 3364 "ilu.bison"
      {
        O_Documentation.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Documentation);
    --- 4459,4465 ----
      ;
          break;}
      case 130:
    ! #line 3374 "ilu.bison"
      {
        O_Documentation.value = (refany) yyvsp[0];
        list_insert ((list) yyvsp[-1], (refany) &O_Documentation);
    ***************
    *** 4457,4481 ****
      ;
          break;}
      case 131:
    ! #line 3372 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 132:
    ! #line 3378 "ilu.bison"
      {
        yyval = (refany) TRUE;
      ;
          break;}
      case 133:
    ! #line 3384 "ilu.bison"
      {
        yyval = (refany) TRUE;
      ;
          break;}
      case 134:
    ! #line 3390 "ilu.bison"
      {
        list l = new_list();
        list_insert(l, FIND_OR_CREATE_TYPE(yyvsp[0]));
    --- 4467,4491 ----
      ;
          break;}
      case 131:
    ! #line 3382 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 132:
    ! #line 3388 "ilu.bison"
      {
        yyval = (refany) TRUE;
      ;
          break;}
      case 133:
    ! #line 3394 "ilu.bison"
      {
        yyval = (refany) TRUE;
      ;
          break;}
      case 134:
    ! #line 3400 "ilu.bison"
      {
        list l = new_list();
        list_insert(l, FIND_OR_CREATE_TYPE(yyvsp[0]));
    ***************
    *** 4483,4495 ****
      ;
          break;}
      case 135:
    ! #line 3396 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 136:
    ! #line 3402 "ilu.bison"
      {
        list l = new_list();
        list_insert(l, (Type) yyvsp[0]);
    --- 4493,4505 ----
      ;
          break;}
      case 135:
    ! #line 3406 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 136:
    ! #line 3412 "ilu.bison"
      {
        list l = new_list();
        list_insert(l, (Type) yyvsp[0]);
    ***************
    *** 4497,4534 ****
      ;
          break;}
      case 137:
    ! #line 3408 "ilu.bison"
      {
        list_insert((list) yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 138:
    ! #line 3415 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 139:
    ! #line 3421 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 140:
    ! #line 3427 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 141:
    ! #line 3433 "ilu.bison"
      {
        yyval = (refany) yyvsp[-1];
      ;
          break;}
      case 142:
    ! #line 3437 "ilu.bison"
      {
        iluerror ("Trailing comma in list of methods.");
        yyerrok;
    --- 4507,4544 ----
      ;
          break;}
      case 137:
    ! #line 3418 "ilu.bison"
      {
        list_insert((list) yyvsp[-2], yyvsp[0]);
        yyval = yyvsp[-2];
      ;
          break;}
      case 138:
    ! #line 3425 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 139:
    ! #line 3431 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 140:
    ! #line 3437 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 141:
    ! #line 3443 "ilu.bison"
      {
        yyval = (refany) yyvsp[-1];
      ;
          break;}
      case 142:
    ! #line 3447 "ilu.bison"
      {
        iluerror ("Trailing comma in list of methods.");
        yyerrok;
    ***************
    *** 4536,4542 ****
      ;
          break;}
      case 143:
    ! #line 3443 "ilu.bison"
      {
        iluerror ("Bad method definition.");
        yyerrok;
    --- 4546,4552 ----
      ;
          break;}
      case 143:
    ! #line 3453 "ilu.bison"
      {
        iluerror ("Bad method definition.");
        yyerrok;
    ***************
    *** 4544,4550 ****
      ;
          break;}
      case 144:
    ! #line 3451 "ilu.bison"
      {
        list new = new_list();
        if (yyvsp[0] != NULL)
    --- 4554,4560 ----
      ;
          break;}
      case 144:
    ! #line 3461 "ilu.bison"
      {
        list new = new_list();
        if (yyvsp[0] != NULL)
    ***************
    *** 4553,4559 ****
      ;
          break;}
      case 145:
    ! #line 3458 "ilu.bison"
      {
        if (yyvsp[0] != NULL)
          list_insert (yyvsp[-2], yyvsp[0]);
    --- 4563,4569 ----
      ;
          break;}
      case 145:
    ! #line 3468 "ilu.bison"
      {
        if (yyvsp[0] != NULL)
          list_insert (yyvsp[-2], yyvsp[0]);
    ***************
    *** 4561,4567 ****
      ;
          break;}
      case 146:
    ! #line 3464 "ilu.bison"
      {
        iluerror ("Bad method definition, possible missing comma.");
        yyerrok;
    --- 4571,4577 ----
      ;
          break;}
      case 146:
    ! #line 3474 "ilu.bison"
      {
        iluerror ("Bad method definition, possible missing comma.");
        yyerrok;
    ***************
    *** 4569,4575 ****
      ;
          break;}
      case 147:
    ! #line 3472 "ilu.bison"
      {
        if ((((char *) yyvsp[-7]) == m_Asynchronous) && (yyvsp[-4] != NULL || yyvsp[-3] != NULL))
          {
    --- 4579,4585 ----
      ;
          break;}
      case 147:
    ! #line 3482 "ilu.bison"
      {
        if ((((char *) yyvsp[-7]) == m_Asynchronous) && (yyvsp[-4] != NULL || yyvsp[-3] != NULL))
          {
    ***************
    *** 4598,4698 ****
      ;
          break;}
      case 148:
    ! #line 3501 "ilu.bison"
      {
        yyval = NULL;
      ;
          break;}
      case 149:
    ! #line 3505 "ilu.bison"
      {
        yyval = (refany) argument_Create (ilu_strdup(""), yyvsp[0], FALSE, In, CurrentParse->line, NULL);
        list_insert(((Type) yyvsp[0])->refs, (refany) CurrentParse->line);
      ;
          break;}
      case 150:
    ! #line 3512 "ilu.bison"
      {
        yyval = (refany) FALSE;
      ;
          break;}
      case 151:
    ! #line 3516 "ilu.bison"
      {
        yyval = (refany) m_Functional;
      ;
          break;}
      case 152:
    ! #line 3520 "ilu.bison"
      {
        yyval = (refany) m_Asynchronous;
      ;
          break;}
      case 153:
    ! #line 3526 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 154:
    ! #line 3530 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 155:
    ! #line 3536 "ilu.bison"
      {
        yyval = NULL;
      ;
          break;}
      case 156:
    ! #line 3540 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 157:
    ! #line 3544 "ilu.bison"
      {
        iluerror ("Missing END on exception list");
        yyval = NULL;
      ;
          break;}
      case 158:
    ! #line 3551 "ilu.bison"
      {
        yyval = (refany) -1;
      ;
          break;}
      case 159:
    ! #line 3555 "ilu.bison"
      {
        yyval = (refany) ilu_atoi(yyvsp[0]);
      ;
          break;}
      case 160:
    ! #line 3561 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 161:
    ! #line 3565 "ilu.bison"
      {
        yyval = (refany) ilu_strdup((char *) yyvsp[0]);
      ;
          break;}
      case 162:
    ! #line 3571 "ilu.bison"
      { ParsingConstant = TRUE; ;
          break;}
      case 163:
    ! #line 3573 "ilu.bison"
      { ParsingConstant = FALSE; ;
          break;}
      case 164:
    ! #line 3576 "ilu.bison"
      {
        Constant new = FIND_OR_CREATE_CONSTANT((string) yyvsp[-7]);
        ParsingConstant = FALSE;
    --- 4608,4708 ----
      ;
          break;}
      case 148:
    ! #line 3511 "ilu.bison"
      {
        yyval = NULL;
      ;
          break;}
      case 149:
    ! #line 3515 "ilu.bison"
      {
        yyval = (refany) argument_Create (ilu_strdup(""), yyvsp[0], FALSE, In, CurrentParse->line, NULL);
        list_insert(((Type) yyvsp[0])->refs, (refany) CurrentParse->line);
      ;
          break;}
      case 150:
    ! #line 3522 "ilu.bison"
      {
        yyval = (refany) FALSE;
      ;
          break;}
      case 151:
    ! #line 3526 "ilu.bison"
      {
        yyval = (refany) m_Functional;
      ;
          break;}
      case 152:
    ! #line 3530 "ilu.bison"
      {
        yyval = (refany) m_Asynchronous;
      ;
          break;}
      case 153:
    ! #line 3536 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 154:
    ! #line 3540 "ilu.bison"
      {
        yyval = (refany) yyvsp[0];
      ;
          break;}
      case 155:
    ! #line 3546 "ilu.bison"
      {
        yyval = NULL;
      ;
          break;}
      case 156:
    ! #line 3550 "ilu.bison"
      {
        yyval = yyvsp[-1];
      ;
          break;}
      case 157:
    ! #line 3554 "ilu.bison"
      {
        iluerror ("Missing END on exception list");
        yyval = NULL;
      ;
          break;}
      case 158:
    ! #line 3561 "ilu.bison"
      {
        yyval = (refany) -1;
      ;
          break;}
      case 159:
    ! #line 3565 "ilu.bison"
      {
        yyval = (refany) ilu_atoi(yyvsp[0]);
      ;
          break;}
      case 160:
    ! #line 3571 "ilu.bison"
      {
        yyval = (refany) NULL;
      ;
          break;}
      case 161:
    ! #line 3575 "ilu.bison"
      {
        yyval = (refany) ilu_strdup((char *) yyvsp[0]);
      ;
          break;}
      case 162:
    ! #line 3581 "ilu.bison"
      { ParsingConstant = TRUE; ;
          break;}
      case 163:
    ! #line 3583 "ilu.bison"
      { ParsingConstant = FALSE; ;
          break;}
      case 164:
    ! #line 3586 "ilu.bison"
      {
        Constant new = FIND_OR_CREATE_CONSTANT((string) yyvsp[-7]);
        ParsingConstant = FALSE;
    ***************
    *** 4713,4731 ****
      ;
          break;}
      case 165:
    ! #line 3597 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 166:
    ! #line 3601 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 167:
    ! #line 3607 "ilu.bison"
      {
        int junk;
        boolean junk2;
    --- 4723,4741 ----
      ;
          break;}
      case 165:
    ! #line 3607 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 166:
    ! #line 3611 "ilu.bison"
      {
        yyval = yyvsp[0];
      ;
          break;}
      case 167:
    ! #line 3617 "ilu.bison"
      {
        int junk;
        boolean junk2;
    ***************
    *** 4744,4750 ****
      ;
          break;}
      case 168:
    ! #line 3624 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = shortcharacter_Type;
    --- 4754,4760 ----
      ;
          break;}
      case 168:
    ! #line 3634 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = shortcharacter_Type;
    ***************
    *** 4753,4759 ****
      ;
          break;}
      case 169:
    ! #line 3631 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = boolean_Type;
    --- 4763,4769 ----
      ;
          break;}
      case 169:
    ! #line 3641 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = boolean_Type;
    ***************
    *** 4762,4768 ****
      ;
          break;}
      case 170:
    ! #line 3638 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = boolean_Type;
    --- 4772,4778 ----
      ;
          break;}
      case 170:
    ! #line 3648 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = boolean_Type;
    ***************
    *** 4771,4777 ****
      ;
          break;}
      case 171:
    ! #line 3647 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = real_Type;
    --- 4781,4787 ----
      ;
          break;}
      case 171:
    ! #line 3657 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = real_Type;
    ***************
    *** 4783,4789 ****
      ;
          break;}
      case 172:
    ! #line 3657 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = real_Type;
    --- 4793,4799 ----
      ;
          break;}
      case 172:
    ! #line 3667 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = real_Type;
    ***************
    *** 4795,4801 ****
      ;
          break;}
      case 173:
    ! #line 3667 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = real_Type;
    --- 4805,4811 ----
      ;
          break;}
      case 173:
    ! #line 3677 "ilu.bison"
      {
        ConstantValue new = (ConstantValue) iluparser_Malloc (sizeof(struct ilu_constantvalue_s));
        new->type = real_Type;
    ***************
    *** 4807,4813 ****
      ;
          break;}
      case 174:
    ! #line 3679 "ilu.bison"
      {
          if ( yyvsp[0] != NULL )
              list_insert( yyvsp[-2], yyvsp[0] );
    --- 4817,4823 ----
      ;
          break;}
      case 174:
    ! #line 3689 "ilu.bison"
      {
          if ( yyvsp[0] != NULL )
              list_insert( yyvsp[-2], yyvsp[0] );
    ***************
    *** 4815,4821 ****
      ;
          break;}
      case 175:
    ! #line 3685 "ilu.bison"
      {
          list	new = new_list( );
      
    --- 4825,4831 ----
      ;
          break;}
      case 175:
    ! #line 3695 "ilu.bison"
      {
          list	new = new_list( );
      
    ***************
    *** 4825,4867 ****
      ;
          break;}
      case 176:
    ! #line 3695 "ilu.bison"
      {
        yyval = (refany) ilu_atoi(yyvsp[0]);
      ;
          break;}
      case 177:
    ! #line 3699 "ilu.bison"
      {
        yyval = (refany) ( - ilu_atoi( yyvsp[0] ));
      ;
          break;}
      case 178:
    ! #line 3703 "ilu.bison"
      {
        yyval = (refany) (( cardinal ) ilu_atoi( yyvsp[0] ));
      ;
          break;}
      case 179:
    ! #line 3709 "ilu.bison"
      {
        yyval = (refany) 1;
      ;
          break;}
      case 180:
    ! #line 3713 "ilu.bison"
      {
        yyval = 0;
      ;
          break;}
      case 181:
    ! #line 3717 "ilu.bison"
      {
        yyval = 0;
      ;
          break;}
      case 182:
    ! #line 3723 "ilu.bison"
      {
        register char *p;
        if (!isalpha(*((string)yyvsp[0])))
    --- 4835,4877 ----
      ;
          break;}
      case 176:
    ! #line 3705 "ilu.bison"
      {
        yyval = (refany) ilu_atoi(yyvsp[0]);
      ;
          break;}
      case 177:
    ! #line 3709 "ilu.bison"
      {
        yyval = (refany) ( - ilu_atoi( yyvsp[0] ));
      ;
          break;}
      case 178:
    ! #line 3713 "ilu.bison"
      {
        yyval = (refany) (( cardinal ) ilu_atoi( yyvsp[0] ));
      ;
          break;}
      case 179:
    ! #line 3719 "ilu.bison"
      {
        yyval = (refany) 1;
      ;
          break;}
      case 180:
    ! #line 3723 "ilu.bison"
      {
        yyval = 0;
      ;
          break;}
      case 181:
    ! #line 3727 "ilu.bison"
      {
        yyval = 0;
      ;
          break;}
      case 182:
    ! #line 3733 "ilu.bison"
      {
        register char *p;
        if (!isalpha(*((string)yyvsp[0])))
    ***************
    *** 4885,4891 ****
      ;
          break;}
      case 183:
    ! #line 3747 "ilu.bison"
      {
        register char *p;
        if (!isalpha(*((string)yyvsp[0])))
    --- 4895,4901 ----
      ;
          break;}
      case 183:
    ! #line 3757 "ilu.bison"
      {
        register char *p;
        if (!isalpha(*((string)yyvsp[0])))
    ***************
    *** 5106,5112 ****
        yystate = yyn;
        goto yynewstate;
      }
    ! #line 3770 "ilu.bison"
      	/* start of program */
      
      
    --- 5116,5122 ----
        yystate = yyn;
        goto yynewstate;
      }
    ! #line 3780 "ilu.bison"
      	/* start of program */
      
      
    

  • From Guido van Rossum: ``I'm using an ILU (2.0a12 w. patches) server written in Python, and I'm debugging my server code. My true object has some buggy methods.

    Unfortunately, the traceback printed when a true object's method raises an unexpected exception isn't very useful -- it ends in iluRt.CaughtUnexpectedException().

    I looked into this and noticed that the C code implementing that function doesn't quite get it right -- it restores the exception type and value, but it does nothing about the traceback. The following patch fixes this. You will still see iluRt.CaughtUnexpectedException in the traceback, but on top of that you will see the traceback of the method that caused the exception in the first place.''

    *** runtime/python/iluPrmodule.c	Thu Jul  9 00:19:41 1998
    --- 203	Thu Jul  9 00:22:02 1998
    ***************
    *** 4132,4137 ****
    --- 4132,4138 ----
      {
        PyObject *		excType	= PySys_GetObject("exc_type");
        PyObject *		excVal	= PySys_GetObject("exc_value");
    +   PyObject *		excTb	= PySys_GetObject("exc_traceback");
        IlucaObject *		ca;
      
        if (!PyArg_Parse(args, "O", &ca))
    ***************
    *** 4142,4149 ****
            return 0;
          }
        ILU_ERR_CONS0(unknown, &ca->err, ILU_NIL);
    !   PyErr_SetObject(excType, excVal);
    !   /* DM:  not decref'ed because PySys_GetObject returns BORROWED() reference */
        return 0;
      }
      
    --- 4143,4152 ----
            return 0;
          }
        ILU_ERR_CONS0(unknown, &ca->err, ILU_NIL);
    !   Py_XINCREF(excType);
    !   Py_XINCREF(excVal);
    !   Py_XINCREF(excTb);
    !   PyErr_Restore(excType, excVal, excTb);
        return 0;
      }
      
    

  • Bill van Melle pointed out two bugs in the old C++ stubber:

    (1) When an enumeration type contains element names that use hyphens, and is also used as the discriminant of a union, the code generated for I/O of the union type does not have the hyphens in the element names properly replaced with underscores.

    (2) The sort algorithm for declarations doesn't work correctly, so that some types are used in the declarations of other types before they are defined.

    This patch fixes those two problems.

    *** 1.71	1997/10/08 00:26:33
    --- stubbers/cpp/code.c	1998/08/04 02:05:15
    ***************
    *** 338,344 ****
            fprintf (s->c->file, "\tcase %s%lu:\n", (val->val.i.sign < 0) ? "-" : "", val->val.i.value);
            break;
          case shortcharacter_Type:
    !       fprintf (s->c->file, "\tcase %s_%s:\n", cplusplus_type_name (s->t), val->val.s);
            break;
          case boolean_Type:
            fprintf (s->c->file, "\tcase ilu_%s:\n", val->val.b ? "TRUE" : "FALSE");
    --- 338,344 ----
            fprintf (s->c->file, "\tcase %s%lu:\n", (val->val.i.sign < 0) ? "-" : "", val->val.i.value);
            break;
          case shortcharacter_Type:
    !       fprintf (s->c->file, "\tcase %s_%s:\n", cplusplus_type_name (s->t), cplusplus_string(val->val.s));
            break;
          case boolean_Type:
            fprintf (s->c->file, "\tcase ilu_%s:\n", val->val.b ? "TRUE" : "FALSE");
    *** 1.51	1997/10/08 00:26:33
    --- stubbers/cpp/headers.c	1998/08/04 22:56:53
    ***************
    *** 66,79 ****
          return;
        if (pending == NULL)
          pending = new_list();
    !   if (list_find (sorted, MatchPointer, type) != NULL)
          return;
    -   if (list_find (pending, MatchPointer, type) != NULL)
    -     {
    -       list_insert (sorted, type);
    -       list_remove (pending, type);
    -       return;
    -     }
      
        t = type_basic_type(type);
        list_insert (pending, type);
    --- 66,74 ----
          return;
        if (pending == NULL)
          pending = new_list();
    !   if ((list_find (sorted, MatchPointer, type) != NULL) ||
    !       (list_find (pending, MatchPointer, type) != NULL))
          return;
      
        t = type_basic_type(type);
        list_insert (pending, type);
    ***************
    *** 96,101 ****
    --- 91,97 ----
      	      
      	case union_Type:
      	      
    + 	  sort_types_for_declaration (type_description(type)->structuredDes.uniond.discriminator_type, sorted);
      	  list_enumerate(type_description(type)->structuredDes.uniond.types, (iluparser_EnumProc) SortArgTypes, sorted);
      	  break;
      	      
    

  • This patch fixes the java stubber so that it handles imported exceptions with arguments more correct.
    The very same problem may be wider spread and have occurences outside of the context of java.
    *** 1.14	1997/11/12 23:09:17
    --- stubbers/java/genex.c	1998/09/09 22:13:32
    ***************
    *** 72,78 ****
      PUBLIC char*
      fullNameOfWriteProc(Exception e)
      {
    !     if (e->type) {
              return cat5(
                  packageName(e->interface, e->scoping),	/*Package*/
                  ".",
    --- 72,78 ----
      PUBLIC char*
      fullNameOfWriteProc(Exception e)
      {
    !     if (exception_type(e)) {
              return cat5(
                  packageName(e->interface, e->scoping),	/*Package*/
                  ".",
    ***************
    *** 138,151 ****
          printf("        return _%s_rep;\n", shortname);
          printf("    }\n\n");
          
    !     if (e->type) {
              printf("    //NOT really public; Must be accessible by ilu...\n");
              printf("    public void readException(java.lang.Object call)\n");
              printf("            throws xerox.ilu.IluSystemException {\n");
              printf("        xerox.ilu.IluCall _call = (xerox.ilu.IluCall) call;\n");
    !         printf("        this.%s = %s;\n", recField, ioInPiece(e->type));
              if (idlHack) {
    !             printRecordAssignCorresponding(e->type, 
                      "        this.", 
                      cat3("this.", recField, ".")
                      );
    --- 138,151 ----
          printf("        return _%s_rep;\n", shortname);
          printf("    }\n\n");
          
    !     if (exception_type(e)) {
              printf("    //NOT really public; Must be accessible by ilu...\n");
              printf("    public void readException(java.lang.Object call)\n");
              printf("            throws xerox.ilu.IluSystemException {\n");
              printf("        xerox.ilu.IluCall _call = (xerox.ilu.IluCall) call;\n");
    !         printf("        this.%s = %s;\n", recField, ioInPiece(exception_type(e)));
              if (idlHack) {
    !             printRecordAssignCorresponding(exception_type(e), 
                      "        this.", 
                      cat3("this.", recField, ".")
                      );
    ***************
    *** 165,179 ****
              printf("        int sz = 0;\n");
              printf("        if (_call.needsSizing()) {\n");
              printf("            sz = _call.beginSizingException(index);\n");
    !         if (e->type) {
                  printf("            sz += %s;\n", 
    !                 ioSzPiece(e->type, cat2("_ex.", recField)));
              }
              printf("        }\n");
              printf("        _call.startWriteException(index, sz);\n");
    !         if (e->type) {
                  printf("        %s;\n", 
    !                 ioOutPiece(e->type, cat2("_ex.", recField)));
              }
              printf("        _call.doneWriteException();\n");
              printf("    } //%s\n\n", methodNameOfWriteProc(e));
    --- 165,179 ----
              printf("        int sz = 0;\n");
              printf("        if (_call.needsSizing()) {\n");
              printf("            sz = _call.beginSizingException(index);\n");
    !         if (exception_type(e)) {
                  printf("            sz += %s;\n", 
    !                 ioSzPiece(exception_type(e), cat2("_ex.", recField)));
              }
              printf("        }\n");
              printf("        _call.startWriteException(index, sz);\n");
    !         if (exception_type(e)) {
                  printf("        %s;\n", 
    !                 ioOutPiece(exception_type(e), cat2("_ex.", recField)));
              }
              printf("        _call.doneWriteException();\n");
              printf("    } //%s\n\n", methodNameOfWriteProc(e));
    ***************
    *** 193,200 ****
          printf("            \"%s\", //isl exception name\n", 
              exceptionShortName(e)
              );
    !     if (e->type) {
    !         printf("            \"%s\"); //type uuid\n", e->type->uid);
          } else {
              printf("            null); //type uuid\n");
          }
    --- 193,200 ----
          printf("            \"%s\", //isl exception name\n", 
              exceptionShortName(e)
              );
    !     if (exception_type(e)) {
    !         printf("            \"%s\"); //type uuid\n", exception_type(e)->uid);
          } else {
              printf("            null); //type uuid\n");
          }
    ***************
    *** 208,216 ****
      {
          printf("    public %s(", name);
          if (idlHack) {
    !         printRecordConstructorFormalArgs(e->type);
          } else {
    !         printf("%s _val", typeDeclarator(e->type));
          }
          printf(") {\n");
          printf("        super();\n");
    --- 208,216 ----
      {
          printf("    public %s(", name);
          if (idlHack) {
    !         printRecordConstructorFormalArgs(exception_type(e));
          } else {
    !         printf("%s _val", typeDeclarator(exception_type(e)));
          }
          printf(") {\n");
          printf("        super();\n");
    ***************
    *** 230,237 ****
          }
          shortname = exceptionShortName(e);
          handlerShortName = handlerClassShortName(e);
    !     if (e->type) {
    !         idlHack = isIDLExceptionRecord(e->type);
              if (idlHack) recField = "_idlrec";
          }
      
    --- 230,237 ----
          }
          shortname = exceptionShortName(e);
          handlerShortName = handlerClassShortName(e);
    !     if (exception_type(e)) {
    !         idlHack = isIDLExceptionRecord(exception_type(e));
              if (idlHack) recField = "_idlrec";
          }
      
    ***************
    *** 244,267 ****
          printf("public class %s extends xerox.ilu.IluUserException {\n\n", 
                shortname);
          
    !     if (e->type) {
    !         char* declarator = typeDeclarator(e->type);
              if (idlHack) {
    !             printRecordFieldDecls(e->type, TRUE);
                  printf("    %s %s = %s;\n\n", 
                      declarator, recField,
    !                 typeInitializer(type_kind(myUrType(e->type)))
                      );
                  printFullConstructorHead(e, shortname, idlHack);
                  printf("        %s = new %s();\n", recField, declarator);
    !             printRecordAssignCorresponding(e->type, 
                      cat3("        ", recField, "."), 
                      "");
                  printf("    }\n\n");
              } else {
                  printf("    public %s %s = %s;\n\n", 
                      declarator, recField, 
    !                 typeInitializer(type_kind(myUrType(e->type)))
                      );
                  printFullConstructorHead(e, shortname, idlHack);
                  printf("        this.%s = _val;\n", recField);
    --- 244,267 ----
          printf("public class %s extends xerox.ilu.IluUserException {\n\n", 
                shortname);
          
    !     if (exception_type(e)) {
    !         char* declarator = typeDeclarator(exception_type(e));
              if (idlHack) {
    !             printRecordFieldDecls(exception_type(e), TRUE);
                  printf("    %s %s = %s;\n\n", 
                      declarator, recField,
    !                 typeInitializer(type_kind(myUrType(exception_type(e))))
                      );
                  printFullConstructorHead(e, shortname, idlHack);
                  printf("        %s = new %s();\n", recField, declarator);
    !             printRecordAssignCorresponding(exception_type(e), 
                      cat3("        ", recField, "."), 
                      "");
                  printf("    }\n\n");
              } else {
                  printf("    public %s %s = %s;\n\n", 
                      declarator, recField, 
    !                 typeInitializer(type_kind(myUrType(exception_type(e))))
                      );
                  printFullConstructorHead(e, shortname, idlHack);
                  printf("        this.%s = _val;\n", recField);
    ***************
    *** 291,297 ****
              printf("        super();\n");
              printf("    }\n\n");
      
    !         if (e->type) {
                  printFullConstructorHead(e, handlerShortName, idlHack);
                  printf("        //not used; but required by type system\n");
                  printf("        throw new xerox.ilu.IluSomeSystemException();\n");
    --- 291,297 ----
              printf("        super();\n");
              printf("    }\n\n");
      
    !         if (exception_type(e)) {
                  printFullConstructorHead(e, handlerShortName, idlHack);
                  printf("        //not used; but required by type system\n");
                  printf("        throw new xerox.ilu.IluSomeSystemException();\n");
    

  • This patch fixes the old c++ stubber so that it handles recursive unions.
    *** Tue Nov 25 19:40:53 1997
    --- stubbers/cpp/common.c	Thu Sep 17 12:52:50 1998
    ***************
    *** 101,106 ****
    --- 101,111 ----
        return (HasFreeRoutine(a->type));
      }
      
    + static boolean FindSameType (Argument type_in_the_list, void* pv_type_to_compare)
    + {
    +   return (type_in_the_list->type == ((Type)pv_type_to_compare));
    + }
    + 
      boolean HasFreeRoutine (Type type)
      {
        TypeKind tk = type_ur_kind(type);
    ***************
    *** 113,121 ****
        else if (type_ur_kind(type) == sequence_Type)
          return (NOT (TypeIsString(type)));
        else if (type_ur_kind(type) == union_Type)
    !     {
    !       return (list_find (type_description(type)->structuredDes.uniond.types,
    ! 			 (iluparser_FindProc) FindComplexType, NULL) != NULL);
          }
        else if (type_ur_kind(type) == array_Type AND
      	   (HasFreeRoutine(type_description(type)->structuredDes.array.type)))
    --- 118,130 ----
        else if (type_ur_kind(type) == sequence_Type)
          return (NOT (TypeIsString(type)));
        else if (type_ur_kind(type) == union_Type)
    !     { 
    !       /* return true if the union has an arm of the same type, or if
    ! 	  one of the arm types is complex */
    ! 	  return ( (list_find (type_description(type)->structuredDes.uniond.types,
    ! 			 (iluparser_FindProc) FindSameType, type) != NULL) ||
    ! 		  (list_find (type_description(type)->structuredDes.uniond.types,
    ! 			 (iluparser_FindProc) FindComplexType, NULL) != NULL));
          }
        else if (type_ur_kind(type) == array_Type AND
      	   (HasFreeRoutine(type_description(type)->structuredDes.array.type)))
    
    

  • End of patches