aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff.c
diff options
context:
space:
mode:
authorHadriel Kaplan <hadriel@128technology.com>2014-12-29 00:21:15 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-04 21:02:38 +0000
commitfac8356610fadf488ff92c5a22e5177bb33a2511 (patch)
treeaf8a1ceec7eb91c5a6a5e6e2ac14621425125e65 /epan/tvbuff.c
parent5653fcedca8491829d6d6ce480e7fba13ff801d7 (diff)
Make all Lua code use wmem not emem
Changed all remaining code in wslua that was using emem, to use wmem or simpler methods. Bug: 9927 Change-Id: I3d19a770e0fd77d996bdb6b61a76a722cc2bcd55 Reviewed-on: https://code.wireshark.org/review/6109 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r--epan/tvbuff.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index fce1f3fa72..111b0ba0a1 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -3488,6 +3488,15 @@ tvb_bytes_to_ep_str(tvbuff_t *tvb, const gint offset, const gint len)
return bytes_to_ep_str(ensure_contiguous(tvb, offset, len), len);
}
+/*
+ * Same as tvb_bytes_to_ep_str but with wmem
+ */
+gchar *tvb_bytes_to_wmem_str(wmem_allocator_t *allocator, tvbuff_t *tvb,
+ const gint offset, const gint len)
+{
+ return bytes_to_str(allocator, ensure_contiguous(tvb, offset, len), len);
+}
+
/* Find a needle tvbuff within a haystack tvbuff. */
gint
tvb_find_tvb(tvbuff_t *haystack_tvb, tvbuff_t *needle_tvb, const gint haystack_offset)