From 1d4c01023be092f3ed6be53d5f7339e20874fbaf Mon Sep 17 00:00:00 2001 From: Stephen Fisher Date: Mon, 3 Jan 2011 19:37:13 +0000 Subject: [PATCH] State in the developer documentation that the tvb_fake_unicode() and tvb_get_ephemeral_fake_unicode() functions have been superceded by tvb_get_unicode_string() and tvb_get_ephemeral_unicode_string() respectivey. svn path=/trunk/; revision=35349 --- doc/README.developer | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/doc/README.developer b/doc/README.developer index 33a13d25b5..4109f166db 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -1306,22 +1306,11 @@ with a lifetime of the current capture session. You do not need to free() this buffer, it will happen automatically once the a new capture or file is opened. -guint8 *tvb_fake_unicode(tvbuff_t*, gint offset, gint length, gboolean little_endian); -guint8 *tvb_get_ephemeral_faked_unicode(tvbuff_t*, gint offset, gint length, gboolean little_endian); +tvb_fake_unicode() has been superceded by tvb_get_unicode_string(), which +properly handles Unicode (UTF-16) strings by converting them to UTF-8. -Converts a 2-byte unicode string to an ASCII string. -Returns a null-terminated buffer containing data from the specified -tvbuff, starting at the specified offset, and containing the specified -length worth of characters (the length of the buffer will be length+1, -as it includes a null character to terminate the string). - -tvb_fake_unicode() 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_faked_unicode() 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. +tvb_get_ephemeral_faked_unicode() has been superceded by tvb_get_ephemeral_string(), which properly handles Unicode (UTF-16) strings by converting them +to UTF-8. Byte Array Accessors: