Made counts be unsigned.
authorwarren%netscape.com
Tue, 01 Sep 1998 00:17:09 +0000
changeset 224 5b8c5134fb3b5dabe238d44831390220161ebb9f
parent 223 c5d8a1edbc4a1eb68b01238a199d86e319eaed1b
child 225 5b0e0a12c524d0d4521953cdd47fcf2b84410ac9
push idunknown
push userunknown
push dateunknown
Made counts be unsigned.
lib/ds/plvector.c
lib/ds/plvector.h
--- a/lib/ds/plvector.c
+++ b/lib/ds/plvector.c
@@ -233,27 +233,27 @@ PL_VectorSet(PLVector* v, PRUint32 index
     if (index >= v->size) {
         if (!PL_VectorSetSize(v, index+1, PL_VECTOR_GROW_DEFAULT))
             return;
     }
     v->data[index] = newElement;
 }
 
 /* Adds at the end */
-PR_IMPLEMENT(PRInt32)
+PR_IMPLEMENT(PRUint32)
 PL_VectorAdd(PLVector* v, void* newElement)
 {
     PRUint32 index = v->size;
 #ifdef XP_WIN16
     if (index >= SIZE_T_MAX / 4L) {
         return -1;	     
     }
 #endif			
     PL_VectorSet(v, index, newElement);
-    return (PRInt32)index;
+    return index;
 }
 
 /* Inserts new element count times at index */
 PR_IMPLEMENT(void)
 PL_VectorInsert(PLVector* v, PRUint32 index, void* newElement, PRUint32 count)
 {
     PR_ASSERT(count > 0);     /* zero or negative size not allowed */
 
--- a/lib/ds/plvector.h
+++ b/lib/ds/plvector.h
@@ -72,17 +72,17 @@ PL_VectorClone(PLVector* v);
 #define PL_VectorGetAddr(v, index) (PR_ASSERT((index) < (v)->size), &(v)->data[index])
 
 #define PL_VectorGet(v, index)     (*PL_VectorGetAddr(v, index))
 
 PR_EXTERN(void)
 PL_VectorSet(PLVector* v, PRUint32 index, void* newElement);
 
 /* Adds at the end */
-PR_EXTERN(PRInt32)
+PR_EXTERN(PRUint32)
 PL_VectorAdd(PLVector* v, void* newElement);
 
 /* Inserts new element count times at index */
 PR_EXTERN(void)
 PL_VectorInsert(PLVector* v, PRUint32 index, void* newElement, PRUint32 count);
 
 /* Removes count elements at index */
 PR_EXTERN(void)