| libical-glib Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
void * i_cal_memory_tmp_buffer (size_t size); gchar * i_cal_memory_tmp_copy (const gchar *str); void i_cal_memory_add_tmp_buffer (void *buf); void i_cal_memory_free_ring (void); void * i_cal_memory_new_buffer (size_t size); void * i_cal_memory_resize_buffer (void *buf,size_t size); void i_cal_memory_free_buffer (void *buf); void i_cal_memory_append_string (gchar **buf,gchar **pos,size_t *buf_size,const gchar *string); void i_cal_memory_append_char (gchar **buf,gchar **pos,size_t *buf_size,gchar ch); gchar * i_cal_memory_strdup (const gchar *s);
void * i_cal_memory_tmp_buffer (size_t size);
Create a buffer with target size.
|
The size of the buffer to be created. |
Returns : |
The newly created buffer. [transfer full] |
Since 1.0
gchar * i_cal_memory_tmp_copy (const gchar *str);
Like strdup, but the buffer is on the ring.
|
The string to be copied |
Returns : |
The new copy of the str. [transfer full]
|
Since 1.0
void i_cal_memory_add_tmp_buffer (void *buf);
Add an existing buffer to the buffer ring
|
The existing buffer to be added into the ical. [transfer full] |
Since 1.0
void i_cal_memory_free_ring (void);
Free all the memory used in the ring.
Since 1.0
void * i_cal_memory_new_buffer (size_t size);
Create a new buffer with target size. The caller should deallocate it when necessary.
|
The size of the new buffer to be created. |
Returns : |
The newly created buffer with the target size. [transfer full] |
Since 1.0
void * i_cal_memory_resize_buffer (void *buf,size_t size);
Resize the buffer to the target size.
|
The buffer needs to be resized. [transfer full] |
|
The target size the buffer to be resized to. |
Returns : |
The buffer after being resized. [transfer full] |
Since 1.0
void i_cal_memory_free_buffer (void *buf);
Free the buffer.
|
The buffer to be freed. [transfer full] |
Since 1.0
void i_cal_memory_append_string (gchar **buf,gchar **pos,size_t *buf_size,const gchar *string);
Append the string to the buffer. Only use them on normally allocated memory, or on buffers created from icalmemory_new_buffer, never with buffers created by icalmemory_tmp_buffer. If icalmemory_append_string has to resize a buffer on the ring, the ring will loose track of it an you will have memory problems.
|
The buffer to be appended. It should not be the memory in ical. |
|
The position at which the new string to be appended. |
|
THe size of the buffer before appended |
|
The string to be allocated |
Since 1.0
void i_cal_memory_append_char (gchar **buf,gchar **pos,size_t *buf_size,gchar ch);
Append the character to the buffer. Only use them on normally allocated memory, or on buffers created from icalmemory_new_buffer, never with buffers created by icalmemory_tmp_buffer. If icalmemory_append_string has to resize a buffer on the ring, the ring will loose track of it an you will have memory problems.
|
The buffer to be appended. It should not be the memory in ical. |
|
The position at which the new string to be appended. |
|
THe size of the buffer before appended |
|
The character to be allocated |
Since 1.0