summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2018-09-19 08:41:52 +0900
committerHermet Park <hermetpark@gmail.com>2018-09-19 08:41:52 +0900
commitb5409faf8b2f1357157694fc58070825f31b90b3 (patch)
tree5903b9fbbf570f077492031a8bd8f167e0918886 /src/lib/eina
parentaf8a96ff4663d88a085295c0486a47667c475a76 (diff)
eina: Improve explanation of read-only binbuf's
Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7057
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_binbuf.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/lib/eina/eina_binbuf.h b/src/lib/eina/eina_binbuf.h
index 6b1ed48ffe..dbbcf9e31a 100644
--- a/src/lib/eina/eina_binbuf.h
+++ b/src/lib/eina/eina_binbuf.h
@@ -59,13 +59,13 @@ EAPI Eina_Binbuf *eina_binbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
59 * 59 *
60 * This function creates a new binary string buffer. The passed string 60 * This function creates a new binary string buffer. The passed string
61 * is used directly as the buffer, it's effectively the inverse of 61 * is used directly as the buffer, it's effectively the inverse of
62 * eina_binbuf_string_steal(). To free the resources, use 62 * eina_binbuf_string_steal().
63 * eina_binbuf_free(). 63 *
64 * If @p ro is #EINA_TRUE, then @p str will be treated as read-only.
65 * Other routines using this buffer that would normally modify the
66 * string, will instead create a separate copy to modify and return.
64 * 67 *
65 * This routine will not touch the buffer if @p ro is set to 68 * To free the resources, use eina_binbuf_free().
66 * #EINA_TRUE, but it will also not copy it. If @p ro is set to
67 * #EINA_TRUE any change operation will create a fresh new memory
68 * buffer, copy the old data there and modify that one instead.
69 * 69 *
70 * @see eina_binbuf_manage_new() 70 * @see eina_binbuf_manage_new()
71 * @see eina_binbuf_manage_new_length() 71 * @see eina_binbuf_manage_new_length()
@@ -98,12 +98,13 @@ EAPI Eina_Binbuf *eina_binbuf_manage_new_length(unsigned char *str, size_t lengt
98 * @param[in] length The length of the string. 98 * @param[in] length The length of the string.
99 * @return Newly allocated string buffer instance, or @c NULL on error. 99 * @return Newly allocated string buffer instance, or @c NULL on error.
100 * 100 *
101 * This function creates a new string buffer. The passed string is used 101 * This function creates a new read-only string buffer. The passed
102 * directly as the buffer, it's effectively the inverse of 102 * string is used directly as the buffer, it's effectively the inverse
103 * eina_binbuf_string_steal(). The passed string will not be touched. 103 * of eina_binbuf_string_steal(). Other routines using this buffer that
104 * It will not touch the internal buffer. Any changing operation will 104 * would normally modify the string, will instead create a separate copy
105 * create a fresh new memory, copy old data there and starting modifying 105 * to modify and return.
106 * that one. To free the resources, use eina_binbuf_free(). 106 *
107 * To free the resources, use eina_binbuf_free().
107 * 108 *
108 * @see eina_binbuf_manage_new() 109 * @see eina_binbuf_manage_new()
109 * 110 *