swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: doc inconsistency? [swarm 1.2, Array]


From: Marcus G. Daniels
Subject: Re: doc inconsistency? [swarm 1.2, Array]
Date: 30 Jul 1998 10:34:37 -0700

>>>>> "TS" == Thorsten Schelhorn <address@hidden> writes:

TS> However, when my program happens to call setCount: with argument
TS> 0, it failes 

TS> How to work around?

$ cd $SWARMSRCDIR/src/collections
$ patch -p1 < ~/this-file
$ cd $SWARMBUILDDIR/src/collections
$ make install

(Substitute $SWARMSRCDIR and $SWARMBUILDDIR as appropriate.)

Index: Array.m
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/collections/Array.m,v
retrieving revision 1.9
diff -c -r1.9 Array.m
*** Array.m     1998/06/16 01:05:09     1.9
--- Array.m     1998/07/30 17:25:26
***************
*** 101,110 ****
      }
    }    
  
!   newBlock = [getZone( self ) allocBlock:
!     ( ( self->bits & Bit_DefaultMember ) ? self->count + 1 : self->count ) *
!     sizeof (id)];
  
    // if DefaultMember, save current value of default member at end of block
  
    if ( self->bits & Bit_DefaultMember )
--- 101,118 ----
      }
    }    
  
!   {
!     int allocCount = self->count;
  
+     if (allocCount == 0)
+       allocCount++;
+     
+     newBlock = [getZone (self) allocBlock:
+                           ((self->bits & Bit_DefaultMember)
+                            ? allocCount + 1 
+                            :  allocCount) *
+                         sizeof (id)];
+   }
    // if DefaultMember, save current value of default member at end of block
  
    if ( self->bits & Bit_DefaultMember )

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]