Promote xmpp_free to the public API
Some other APIs, like xmpp_stanza_to_text, return a point that must be freed by the caller with this API. Signed-off-by: Jack Moffitt <jack@metajack.im>
This commit is contained in:
@@ -58,7 +58,6 @@ struct _xmpp_ctx_t {
|
||||
|
||||
/* convenience functions for accessing the context */
|
||||
void *xmpp_alloc(const xmpp_ctx_t * const ctx, const size_t size);
|
||||
void xmpp_free(const xmpp_ctx_t * const ctx, void *p);
|
||||
void *xmpp_realloc(const xmpp_ctx_t * const ctx, void *p,
|
||||
const size_t size);
|
||||
char *xmpp_strdup(const xmpp_ctx_t * const ctx, const char * const s);
|
||||
|
||||
@@ -286,6 +286,10 @@ xmpp_stanza_t * xmpp_stanza_copy(const xmpp_stanza_t * const stanza);
|
||||
/** free a stanza object and it's contents */
|
||||
int xmpp_stanza_release(xmpp_stanza_t * const stanza);
|
||||
|
||||
/** free some blocks returned by other APIs, for example the
|
||||
buffer you get from xmpp_stanza_to_text **/
|
||||
void xmpp_free(const xmpp_ctx_t * const ctx, void *p);
|
||||
|
||||
int xmpp_stanza_is_text(xmpp_stanza_t * const stanza);
|
||||
int xmpp_stanza_is_tag(xmpp_stanza_t * const stanza);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user