mirror of
https://github.com/samba-team/samba.git
synced 2025-01-04 05:18:06 +03:00
r22758: - add missing _talloc_set_name_const(ret, ret); to talloc_append_string()
- update manpage and add comments about _talloc_set_name_const(ret, ret); in all places which use them metze
This commit is contained in:
parent
305117fae0
commit
5cd100de82
@ -583,11 +583,27 @@ if (ptr) memcpy(ptr, p, strlen(p)+1);</programlisting>
|
||||
</para>
|
||||
<programlisting>talloc_set_name_const(ptr, ptr)</programlisting>
|
||||
</refsect2>
|
||||
<refsect2><title>char *talloc_append_string(const void *<emphasis role="italic">t</emphasis>, char *<emphasis role="italic">orig</emphasis>, const char *<emphasis role="italic">append</emphasis>);</title>
|
||||
<para>
|
||||
The talloc_append_string() function appends the given formatted
|
||||
string to the given string.
|
||||
</para>
|
||||
<para>
|
||||
This function sets the name of the new pointer to the new
|
||||
string. This is equivalent to:
|
||||
</para>
|
||||
<programlisting>talloc_set_name_const(ptr, ptr)</programlisting>
|
||||
</refsect2>
|
||||
<refsect2><title>char *talloc_vasprintf(const void *<emphasis role="italic">t</emphasis>, const char *<emphasis role="italic">fmt</emphasis>, va_list <emphasis role="italic">ap</emphasis>);</title>
|
||||
<para>
|
||||
The talloc_vasprintf() function is the talloc equivalent of the C
|
||||
library function vasprintf(3).
|
||||
</para>
|
||||
<para>
|
||||
This function sets the name of the new pointer to the new
|
||||
string. This is equivalent to:
|
||||
</para>
|
||||
<programlisting>talloc_set_name_const(ptr, ptr)</programlisting>
|
||||
</refsect2>
|
||||
<refsect2><title>char *talloc_asprintf(const void *<emphasis role="italic">t</emphasis>, const char *<emphasis role="italic">fmt</emphasis>, ...);</title>
|
||||
<para>
|
||||
@ -605,6 +621,11 @@ if (ptr) memcpy(ptr, p, strlen(p)+1);</programlisting>
|
||||
The talloc_asprintf_append() function appends the given formatted
|
||||
string to the given string.
|
||||
</para>
|
||||
<para>
|
||||
This function sets the name of the new pointer to the new
|
||||
string. This is equivalent to:
|
||||
</para>
|
||||
<programlisting>talloc_set_name_const(ptr, ptr)</programlisting>
|
||||
</refsect2>
|
||||
<refsect2><title>(type *)talloc_array(const void *ctx, type, uint_t count);</title>
|
||||
<para>
|
||||
|
@ -1137,6 +1137,8 @@ char *talloc_append_string(const void *t, char *orig, const char *append)
|
||||
/* append the string with the trailing \0 */
|
||||
memcpy(&ret[olen], append, alenz);
|
||||
|
||||
_talloc_set_name_const(ret, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -533,6 +533,15 @@ This functions sets the name of the new pointer to the passed
|
||||
string. This is equivalent to:
|
||||
talloc_set_name_const(ptr, ptr)
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
char *talloc_append_string(const void *t, char *orig, const char *append);
|
||||
|
||||
The talloc_append_string() function appends the given formatted
|
||||
string to the given string.
|
||||
|
||||
This function sets the name of the new pointer to the new
|
||||
string. This is equivalent to:
|
||||
talloc_set_name_const(ptr, ptr)
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
char *talloc_vasprintf(const void *t, const char *fmt, va_list ap);
|
||||
@ -540,6 +549,10 @@ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap);
|
||||
The talloc_vasprintf() function is the talloc equivalent of the C
|
||||
library function vasprintf()
|
||||
|
||||
This functions sets the name of the new pointer to the new
|
||||
string. This is equivalent to:
|
||||
talloc_set_name_const(ptr, ptr)
|
||||
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
char *talloc_asprintf(const void *t, const char *fmt, ...);
|
||||
@ -547,7 +560,7 @@ char *talloc_asprintf(const void *t, const char *fmt, ...);
|
||||
The talloc_asprintf() function is the talloc equivalent of the C
|
||||
library function asprintf()
|
||||
|
||||
This functions sets the name of the new pointer to the passed
|
||||
This functions sets the name of the new pointer to the new
|
||||
string. This is equivalent to:
|
||||
talloc_set_name_const(ptr, ptr)
|
||||
|
||||
@ -558,6 +571,10 @@ char *talloc_asprintf_append(char *s, const char *fmt, ...);
|
||||
The talloc_asprintf_append() function appends the given formatted
|
||||
string to the given string.
|
||||
|
||||
This functions sets the name of the new pointer to the new
|
||||
string. This is equivalent to:
|
||||
talloc_set_name_const(ptr, ptr)
|
||||
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
(type *)talloc_array(const void *ctx, type, uint_t count);
|
||||
|
Loading…
Reference in New Issue
Block a user