ucif/antlr3/src/antlr3collections.c
static  ANTLR3_UINT32    antlr3VectorAdd            (pANTLR3_VECTOR vector, void * element, void (ANTLR3_CDECL *freeptr)(void *))
{
        // Do we need to resize the vector table?
        //
        if      (vector->count == vector->elementsSize)
        {
                // Give no hint, we let it add 1024 or double it
                if (!antlr3VectorResize(vector, 0))
                {
                        // Resize failed
                        return 0;
                }
        }

        // Insert the new entry
        //
        vector->elements[vector->count].element = element;
        vector->elements[vector->count].freeptr = freeptr;

        vector->count++;            // One more element counted

        return  (ANTLR3_UINT32)(vector->count);

}
/// Add the supplied pointer and freeing function pointer to the list,
/// expanding the vector if needed.
///
Add the supplied pointer and freeing function pointer to the list,
expanding the vector if needed.
Add the supplied pointer and freeing function pointer to the list expanding the vector if needed .
static  ANTLR3_UINT32    antlr3VectorAdd            (pANTLR3_VECTOR vector, void * element, void (ANTLR3_CDECL *freeptr)(void *))
{
        if      (vector->count == vector->elementsSize)
        {
                 Give no hint, we let it add 1024 or double it
                if (!antlr3VectorResize(vector, 0))
                {
                         Resize failed
                        return 0;
                }
        }
         Insert the new entry
        vector->elements[vector->count].element = element;
        vector->elements[vector->count].freeptr = freeptr;
        vector->count++;             One more element counted
        return  (ANTLR3_UINT32)(vector->count);
}
static ANTLR3_UINT32 antlr3VectorAdd ( pANTLR3_VECTOR vector , void * element , void ( ANTLR3_CDECL * freeptr ) ( void * ) ) { if ( vector -> count == vector -> elementsSize ) { if ( ! antlr3VectorResize ( vector , 0 ) ) { return 0 ; } } vector -> elements [ vector -> count ] . element = element ; vector -> elements [ vector -> count ] . freeptr = freeptr ; vector -> count ++ ; return ( ANTLR3_UINT32 ) ( vector -> count ) ; }
Add the supplied pointer and freeing function pointer to the list,
expanding the vector if needed.
Add the supplied pointer and freeing function pointer to the list expanding the vector if needed .
// Do we need to resize the vector table? // // Give no hint, we let it add 1024 or double it // Resize failed // Insert the new entry // // One more element counted