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:
Pedro Melo
2009-01-25 10:36:10 -07:00
committed by Jack Moffitt
parent 8b8fe4a77d
commit f27f2c5ba2
2 changed files with 4 additions and 1 deletions

View File

@@ -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);

View File

@@ -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);