diff options
author | Evan Huus <eapache@gmail.com> | 2013-09-21 17:04:41 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-09-21 17:04:41 +0000 |
commit | 6df83e8078aafe6b6dfa03cf1abc33cde0f6612d (patch) | |
tree | e982807717a63c7dcf361f5166edda8156ddebf1 /epan/wslua | |
parent | 8abfcaea798bba1c4d1db2092d94d3b6bc3e932f (diff) |
Add _g_ to the names of functions that allocate glib memory. This is a bit more
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures
that take the appropriate wmem pool.
Majority of the conversion done with sed.
svn path=/trunk/; revision=52164
Diffstat (limited to 'epan/wslua')
-rw-r--r-- | epan/wslua/wslua_field.c | 8 | ||||
-rw-r--r-- | epan/wslua/wslua_tvb.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/epan/wslua/wslua_field.c b/epan/wslua/wslua_field.c index 08cf577828..8fa5f0cc3b 100644 --- a/epan/wslua/wslua_field.c +++ b/epan/wslua/wslua_field.c @@ -100,7 +100,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { Address eth = (Address)g_malloc(sizeof(address)); eth->type = AT_ETHER; eth->len = fi->length; - eth->data = tvb_memdup(fi->ds_tvb,fi->start,fi->length); + eth->data = tvb_g_memdup(fi->ds_tvb,fi->start,fi->length); pushAddress(L,eth); return 1; } @@ -108,7 +108,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { Address ipv4 = (Address)g_malloc(sizeof(address)); ipv4->type = AT_IPv4; ipv4->len = fi->length; - ipv4->data = tvb_memdup(fi->ds_tvb,fi->start,fi->length); + ipv4->data = tvb_g_memdup(fi->ds_tvb,fi->start,fi->length); pushAddress(L,ipv4); return 1; } @@ -116,7 +116,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { Address ipv6 = (Address)g_malloc(sizeof(address)); ipv6->type = AT_IPv6; ipv6->len = fi->length; - ipv6->data = tvb_memdup(fi->ds_tvb,fi->start,fi->length); + ipv6->data = tvb_g_memdup(fi->ds_tvb,fi->start,fi->length); pushAddress(L,ipv6); return 1; } @@ -124,7 +124,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { Address ipx = (Address)g_malloc(sizeof(address)); ipx->type = AT_IPX; ipx->len = fi->length; - ipx->data = tvb_memdup(fi->ds_tvb,fi->start,fi->length); + ipx->data = tvb_g_memdup(fi->ds_tvb,fi->start,fi->length); pushAddress(L,ipx); return 1; } diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index d25d49d220..1d4b94c30e 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -1024,7 +1024,7 @@ WSLUA_METHOD TvbRange_ether(lua_State* L) { addr = g_new(address,1); - buff = (guint8 *)tvb_memdup(tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len); + buff = (guint8 *)tvb_g_memdup(tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len); SET_ADDRESS(addr, AT_ETHER, 6, buff); pushAddress(L,addr); |