diff options
Diffstat (limited to 'epan/wslua')
-rw-r--r-- | epan/wslua/wslua_byte_array.c | 5 | ||||
-rw-r--r-- | epan/wslua/wslua_field.c | 3 | ||||
-rw-r--r-- | epan/wslua/wslua_tvb.c | 5 |
3 files changed, 4 insertions, 9 deletions
diff --git a/epan/wslua/wslua_byte_array.c b/epan/wslua/wslua_byte_array.c index 59c932ffa6..e375afa954 100644 --- a/epan/wslua/wslua_byte_array.c +++ b/epan/wslua/wslua_byte_array.c @@ -336,10 +336,7 @@ WSLUA_METAMETHOD ByteArray__tostring(lua_State* L) { WSLUA_RETURN(1); /* A hex-ascii string representation of the `ByteArray`. */ } -/* - * ByteArray_tvb(name) - */ -WSLUA_CONSTRUCTOR ByteArray_tvb (lua_State *L) { +WSLUA_METHOD ByteArray_tvb (lua_State *L) { /* Creates a new `Tvb` from a `ByteArray` (it gets added to the current frame too). */ #define WSLUA_ARG_ByteArray_tvb_NAME 2 /* The name to be given to the new data-source. */ ByteArray ba = checkByteArray(L,1); diff --git a/epan/wslua/wslua_field.c b/epan/wslua/wslua_field.c index d64513c5a2..29335ba541 100644 --- a/epan/wslua/wslua_field.c +++ b/epan/wslua/wslua_field.c @@ -308,9 +308,8 @@ static int FieldInfo_get_source(lua_State* L) { return 1; } -/* WSLUA_ATTRIBUTE FieldInfo_range RO The `TvbRange` covering this field. */ +/* WSLUA_ATTRIBUTE FieldInfo_range RO The `TvbRange` covering the bytes of this field in a Tvb. */ static int FieldInfo_get_range(lua_State* L) { - /* The `TvbRange` covering this field. */ FieldInfo fi = checkFieldInfo(L,1); if (push_TvbRange (L, fi->ws_fi->ds_tvb, fi->ws_fi->start, fi->ws_fi->length)) { diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index 1f06dd1160..e10ff394d8 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -391,11 +391,10 @@ gboolean push_TvbRange(lua_State* L, tvbuff_t* ws_tvb, int offset, int len) { } -WSLUA_CONSTRUCTOR TvbRange_tvb (lua_State *L) { +WSLUA_METHOD TvbRange_tvb(lua_State *L) { /* Creates a (sub)`Tvb` from a `TvbRange`. */ -#define WSLUA_ARG_Tvb_new_subset_RANGE 1 /* The `TvbRange` from which to create the new `Tvb`. */ - TvbRange tvbr = checkTvbRange(L,WSLUA_ARG_Tvb_new_subset_RANGE); + TvbRange tvbr = checkTvbRange(L,1); Tvb tvb; if (! (tvbr && tvbr->tvb)) return 0; |