fix optional arguments...lots of changes
[IRC.git] / Robust / src / Runtime / runtime.c
index 9422b68149016aed1d5c5e586363dc12f61fe3ea..3917da59afd5cb5de5c7579edeeccf4773310293 100644 (file)
@@ -28,9 +28,6 @@ int instaccum=0;
 #include "dmalloc.h"
 #endif
 
-
-
-
 void exithandler(int sig, siginfo_t *info, void * uap) {
   exit(0);
 }
@@ -129,6 +126,9 @@ void * allocate_new(void * ptr, int type) {
   v->tid=0;
   v->lockentry=0;
   v->lockcount=0;
+#endif
+#ifdef OPTIONAL
+  v->fses=0;
 #endif
   return v;
 }
@@ -147,14 +147,20 @@ struct ArrayObject * allocate_newarray(void * ptr, int type, int length) {
   v->tid=0;
   v->lockentry=0;
   v->lockcount=0;
+#endif
+#ifdef OPTIONAL
+  v->fses=0;
 #endif
   return v;
 }
 
 #else
 void * allocate_new(int type) {
-  void * v=FREEMALLOC(classsize[type]);
-  *((int *)v)=type;
+  struct ___Object___ * v=FREEMALLOC(classsize[type]);
+  v->type=type;
+#ifdef OPTIONAL
+  v->fses=0;
+#endif
   return v;
 }
 
@@ -164,6 +170,9 @@ struct ArrayObject * allocate_newarray(int type, int length) {
   struct ArrayObject * v=FREEMALLOC(sizeof(struct ArrayObject)+length*classsize[type]);
   v->type=type;
   v->___length___=length;
+#ifdef OPTIONAL
+  v->fses=0;
+#endif
   return v;
 }
 #endif