From 5934925554ebb5256f7f8a616f8899abc045126a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Thu, 23 Jun 2011 10:43:49 +0000 Subject: [PATCH] Rename Tvb_new_real to ByteArray_tvb, as it's a ByteArray function. Documentation is generated from code. This fixes bug 5199. svn path=/trunk/; revision=37761 --- epan/wslua/wslua_tvb.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index 161a49668a..eba88eb6d1 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -285,7 +285,7 @@ static int ByteArray_tostring(lua_State* L) { WSLUA_RETURN(1); /* A string contaning a representaion of the ByteArray. */ } -static int Tvb_new_real (lua_State *L); +static int ByteArray_tvb (lua_State *L); static const luaL_reg ByteArray_methods[] = { {"new", ByteArray_new}, @@ -294,7 +294,7 @@ static const luaL_reg ByteArray_methods[] = { {"append", ByteArray_append}, {"subset", ByteArray_subset}, {"set_size", ByteArray_set_size}, - {"tvb", Tvb_new_real}, + {"tvb", ByteArray_tvb}, {"get_index", ByteArray_get_index}, {"set_index", ByteArray_set_index}, { NULL, NULL } @@ -364,14 +364,13 @@ Tvb* push_Tvb(lua_State* L, tvbuff_t* ws_tvb) { /* - * Tvb_new_real(bytearray,name) + * ByteArray_tvb(name) */ -WSLUA_CONSTRUCTOR Tvb_new_real (lua_State *L) { +WSLUA_CONSTRUCTOR ByteArray_tvb (lua_State *L) { /* Creates a new Tvb from a bytearray (it gets added to the current frame too) */ -#define WSLUA_ARG_Tvb_new_real_BYTEARRAY 1 /* The data source for this Tvb. */ -#define WSLUA_ARG_Tvb_new_real_NAME 2 /* The name to be given to the new data-source. */ +#define WSLUA_ARG_ByteArray_tvb_NAME 2 /* The name to be given to the new data-source. */ ByteArray ba = checkByteArray(L,1); - const gchar* name = luaL_optstring(L,WSLUA_ARG_Tvb_new_real_NAME,"Unnamed") ; + const gchar* name = luaL_optstring(L,WSLUA_ARG_ByteArray_tvb_NAME,"Unnamed") ; guint8* data; Tvb tvb;