aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-01-15 08:35:55 +0000
committerGuy Harris <guy@alum.mit.edu>2014-01-15 08:35:55 +0000
commit9228c72ef0f34982cfe344d74570adabb86c6cf1 (patch)
tree70908f21a901e61dcde6e05ff8130d0f9157d574 /epan/tvbuff.c
parent1f8d2e25d23f0ee30b809c29b8d2a30e33ab61b1 (diff)
Explain casting away const.
svn path=/trunk/; revision=54816
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r--epan/tvbuff.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 12d608a4e3..4918e4256c 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -1981,6 +1981,7 @@ tvb_get_ucs_2_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
tvb_ensure_bytes_exist(tvb, offset, length);
strbuf = tvb_extract_ucs_2_string(scope, tvb, offset, length, encoding);
+ /* XXX, discarding constiness, should we have some function which "take-over" strbuf->str (like when strbuf is no longer needed) */
return (gchar*)wmem_strbuf_get_str(strbuf);
}
@@ -2087,6 +2088,7 @@ tvb_get_utf_16_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
tvb_ensure_bytes_exist(tvb, offset, length);
strbuf = tvb_extract_utf_16_string(scope, tvb, offset, length, encoding);
+ /* XXX, discarding constiness, should we have some function which "take-over" strbuf->str (like when strbuf is no longer needed) */
return (gchar*)wmem_strbuf_get_str(strbuf);
}
@@ -2142,6 +2144,7 @@ tvb_get_ucs_4_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
tvb_ensure_bytes_exist(tvb, offset, length);
strbuf = tvb_extract_ucs_4_string(scope, tvb, offset, length, encoding);
+ /* XXX, discarding constiness, should we have some function which "take-over" strbuf->str (like when strbuf is no longer needed) */
return (gchar*)wmem_strbuf_get_str(strbuf);
}
@@ -2314,6 +2317,7 @@ tvb_get_ts_23_038_7bits_string(wmem_allocator_t *scope, tvbuff_t *tvb,
wmem_strbuf_append_unichar(strbuf, UNREPL);
}
+ /* XXX, discarding constiness, should we have some function which "take-over" strbuf->str (like when strbuf is no longer needed) */
return (gchar*)wmem_strbuf_get_str(strbuf);
}
@@ -2577,6 +2581,7 @@ tvb_get_ucs_2_stringz(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
if (lengthp)
*lengthp = size;
+ /* XXX, discarding constiness, should we have some function which "take-over" strbuf->str (like when strbuf is no longer needed) */
return (gchar*)wmem_strbuf_get_str(strbuf);
}
@@ -2601,6 +2606,7 @@ tvb_get_utf_16_stringz(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset
if (lengthp)
*lengthp = size;
+ /* XXX, discarding constiness, should we have some function which "take-over" strbuf->str (like when strbuf is no longer needed) */
return (gchar*)wmem_strbuf_get_str(strbuf);
}
@@ -2633,6 +2639,7 @@ tvb_get_ucs_4_stringz(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
if (lengthp)
*lengthp = size; /* Number of *bytes* processed */
+ /* XXX, discarding constiness, should we have some function which "take-over" strbuf->str (like when strbuf is no longer needed) */
return (gchar*)wmem_strbuf_get_str(strbuf);
}