summaryrefslogtreecommitdiff
path: root/epan/wslua/wslua_tvb.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-10-17 02:08:44 +0200
committerAnders Broman <a.broman58@gmail.com>2016-10-18 04:09:14 +0000
commit8a1adf1a66cb0324e418e2e588cf47c68c4a287a (patch)
treeaecd0a2c6c3805b98445f4a17c1d076f07d7f3f5 /epan/wslua/wslua_tvb.c
parentf07b1bc6042925cba6ca2bfb762c9521513259ba (diff)
downloadwireshark-8a1adf1a66cb0324e418e2e588cf47c68c4a287a.tar.gz
wslua: fix errors in documentation, add notational conventions
Improve example with better formatting, clarification comments and more common variable names. Extend make-wsluarm.pl to support arguments containing underscores. Fixes the description of dissect_tcp_pdus. Change TvbRange.tvb(tvb) into tvbrange:tvb() and ByteArray.tvb(name) into bytearray:tvb(name), these are really instance methods. Change-Id: I1e20ef46195dc6c06f9ac790d3432db283d21a5e Reviewed-on: https://code.wireshark.org/review/18226 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/wslua/wslua_tvb.c')
-rw-r--r--epan/wslua/wslua_tvb.c5
1 files changed, 2 insertions, 3 deletions
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;