Top |
void * | i_cal_memory_tmp_buffer () |
gchar * | i_cal_memory_tmp_copy () |
void | i_cal_memory_add_tmp_buffer () |
void | i_cal_memory_free_ring () |
void * | i_cal_memory_new_buffer () |
void * | i_cal_memory_resize_buffer () |
void | i_cal_memory_free_buffer () |
void | i_cal_memory_append_string () |
void | i_cal_memory_append_char () |
gchar * | i_cal_memory_strdup () |
void *
i_cal_memory_tmp_buffer (size_t size
);
Creates a buffer with target size.
Since: 1.0
gchar *
i_cal_memory_tmp_copy (const gchar *str
);
Like strdup, but the buffer is on the ring.
Since: 1.0
void
i_cal_memory_add_tmp_buffer (void *buf
);
Adds an existing buffer to the buffer ring.
Since: 1.0
void
i_cal_memory_free_ring (void
);
Frees all the memory used in the ring.
[skip]
Since: 1.0
void *
i_cal_memory_new_buffer (size_t size
);
Creates a new buffer with target size. The caller should deallocate it when necessary.
Since: 1.0
void * i_cal_memory_resize_buffer (void *buf
,size_t size
);
Resizes the buffer to the target size.
buf |
The buffer needs to be resized. |
[transfer full] |
size |
The target size the buffer to be resized to |
Since: 1.0
void i_cal_memory_append_string (gchar **buf
,gchar **pos
,size_t *buf_size
,const gchar *str
);
Appends 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.
buf |
The buffer to be appended. It should not be the memory in ical. |
[array length=buf_size][element-type gchar][inout] |
pos |
The position at which the new string to be appended. |
[array][element-type gchar][inout] |
buf_size |
The size of the buffer before appended |
|
str |
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.
buf |
The buffer to be appended. It should not be the memory in ical. |
[array length=buf_size][element-type gchar][inout] |
pos |
The position at which the new string to be appended. |
[array][element-type gchar][inout] |
buf_size |
The size of the buffer before appended |
|
ch |
The character to be allocated |
Since: 1.0
gchar *
i_cal_memory_strdup (const gchar *s
);
A wrapper around strdup. Partly to trap calls to strdup, partly because in -ansi, gcc on Red Hat claims that strdup is undeclared.
Since: 1.0