Make the encoding argument uniformly guint rather than gint.
authorGuy Harris <guy@alum.mit.edu>
Tue, 15 May 2012 05:42:58 +0000 (05:42 -0000)
committerGuy Harris <guy@alum.mit.edu>
Tue, 15 May 2012 05:42:58 +0000 (05:42 -0000)
commit1c2a67f3483c126d378db56c78284d166825ffdc
treeb7193e1547c3ace2fb30a8db0a9d0e189943202b
parent1ec0629c1bf276c851c920c7c1af4e1eacaba6f8
Make the encoding argument uniformly guint rather than gint.

Put the code that's currently common to the ENC_ASCII and ENC_UTF_8
cases in tvb_get_ephemeral_string_enc() into tvb_get_ephemeral_string(),
and call tvb_get_ephemeral_string() in those cases.  Skip the
tvb_ensure_bytes_exist() and ensure_contiguous() calls in the ENC_UTF_16
and ENC_UCS_2 cases, as they're unnecessary there.

Update the comment for tvb_get_ephemeral_string_enc().

Make tvb_get_ephemeral_stringz_enc() handle the encodings that
tvb_get_ephemeral_string_enc() does.

svn path=/trunk/; revision=42627
epan/tvbuff.c
epan/tvbuff.h