Logo Search packages:      
Sourcecode: libical version File versions  Download package

void icalmemory_add_tmp_buffer ( void *  buf  ) 

Add an existing buffer to the buffer ring

Definition at line 153 of file icalmemory.c.

Referenced by icalmemory_tmp_buffer(), and icaltime_as_ical_string().

{
    buffer_ring *br = get_buffer_ring();


    /* Wrap around the ring */
    if(++(br->pos) == BUFFER_RING_SIZE){
      br->pos = 0;
    }

    /* Free buffers as their slots are overwritten */
    if ( br->ring[br->pos] != 0){
      free( br->ring[br->pos]);
    }

    /* Assign the buffer to a slot */
    br->ring[br->pos] = buf; 
}


Generated by  Doxygen 1.6.0   Back to index