diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-08-10 14:25:59 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-08-10 14:25:59 +0000 |
commit | 9599cf9e3b88e57f22f149c2db2956b779ba864f (patch) | |
tree | bd6dc25e40e463e67fe7b295e144b027909a62cc /doc | |
parent | efa1f430059f40d054d9f85fb0869583ffb76d2b (diff) |
add new function tvb_get_ephemeral_stringz()
svn path=/trunk/; revision=15273
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.developer | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/README.developer b/doc/README.developer index d3a5258e9d..b1f1fcf61f 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -906,6 +906,7 @@ dissected. guint8 *tvb_get_stringz(tvbuff_t *tvb, gint offset, gint *lengthp); +guint8 *tvb_get_ephemeral_stringz(tvbuff_t *tvb, gint offset, gint *lengthp); Returns a null-terminated buffer, allocated with "g_malloc()", containing data from the specified tvbuff, starting with at the @@ -913,6 +914,14 @@ specified offset, and containing all characters from the tvbuff up to and including a terminating null character in the tvbuff. "*lengthp" will be set to the length of the string, including the terminating null. +tvb_get_stringz() returns a buffer allocated by g_malloc() so you must +g_free() it when you are finished with the string. Failure to g_free() this +buffer will lead to memory leaks. +tvb_get_ephemeral_stringz() returns a buffer allocated from a special heap +with a lifetime until the next packet is dissected. You do not need to +free() this buffer, it will happen automatically once the next packet is +dissected. + guint8 *tvb_fake_unicode(tvbuff_t*, gint offset, gint length); guint8 *tvb_get_ephemeral_faked_unicode(tvbuff_t*, gint offset, gint length); |