From 56a9666a3ae2f74ac5ada87e54d1401bc691e4eb Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Mon, 18 Jul 2022 18:07:11 -0700 Subject: [PATCH] wslua: Fix our argument definitions. Make sure our argument definitions match their corresponding function names. --- epan/wslua/wslua_byte_array.c | 8 +- epan/wslua/wslua_dir.c | 8 +- epan/wslua/wslua_gui.c | 4 +- epan/wslua/wslua_proto_field.c | 278 ++++++++++++++++----------------- epan/wslua/wslua_util.c | 24 +-- epan/wslua/wslua_wtap.c | 12 +- 6 files changed, 167 insertions(+), 167 deletions(-) diff --git a/epan/wslua/wslua_byte_array.c b/epan/wslua/wslua_byte_array.c index 050a17ad7e..e393319c81 100644 --- a/epan/wslua/wslua_byte_array.c +++ b/epan/wslua/wslua_byte_array.c @@ -89,11 +89,11 @@ static int ByteArray__gc(lua_State* L) { WSLUA_METAMETHOD ByteArray__concat(lua_State* L) { /* Concatenate two <>s. */ -#define WSLUA_ARG_ByteArray__cat_FIRST 1 /* First array. */ -#define WSLUA_ARG_ByteArray__cat_SECOND 2 /* Second array. */ +#define WSLUA_ARG_ByteArray__concat_FIRST 1 /* First array. */ +#define WSLUA_ARG_ByteArray__concat_SECOND 2 /* Second array. */ - ByteArray ba1 = checkByteArray(L,WSLUA_ARG_ByteArray__cat_FIRST); - ByteArray ba2 = checkByteArray(L,WSLUA_ARG_ByteArray__cat_SECOND); + ByteArray ba1 = checkByteArray(L,WSLUA_ARG_ByteArray__concat_FIRST); + ByteArray ba2 = checkByteArray(L,WSLUA_ARG_ByteArray__concat_SECOND); ByteArray ba; ba = g_byte_array_new(); diff --git a/epan/wslua/wslua_dir.c b/epan/wslua/wslua_dir.c index 68d1900444..c613d95a9c 100644 --- a/epan/wslua/wslua_dir.c +++ b/epan/wslua/wslua_dir.c @@ -288,8 +288,8 @@ WSLUA_CONSTRUCTOR Dir_personal_config_path(lua_State* L) { @since 1.11.3 */ -#define WSLUA_OPTARG_personal_config_path_FILENAME 1 /* A filename. */ - const char *fname = luaL_optstring(L, WSLUA_OPTARG_personal_config_path_FILENAME,""); +#define WSLUA_OPTARG_Dir_personal_config_path_FILENAME 1 /* A filename. */ + const char *fname = luaL_optstring(L, WSLUA_OPTARG_Dir_personal_config_path_FILENAME,""); char* filename = get_persconffile_path(fname,FALSE); lua_pushstring(L,filename); @@ -302,8 +302,8 @@ WSLUA_CONSTRUCTOR Dir_global_config_path(lua_State* L) { @since 1.11.3 */ -#define WSLUA_OPTARG_global_config_path_FILENAME 1 /* A filename */ - const char *fname = luaL_optstring(L, WSLUA_OPTARG_global_config_path_FILENAME,""); +#define WSLUA_OPTARG_Dir_global_config_path_FILENAME 1 /* A filename */ + const char *fname = luaL_optstring(L, WSLUA_OPTARG_Dir_global_config_path_FILENAME,""); char* filename; filename = get_datafile_path(fname); diff --git a/epan/wslua/wslua_gui.c b/epan/wslua/wslua_gui.c index 18f98e2b32..8a08c04552 100644 --- a/epan/wslua/wslua_gui.c +++ b/epan/wslua/wslua_gui.c @@ -642,7 +642,7 @@ WSLUA_CONSTRUCTOR TextWindow_new(lua_State* L) { /* } WSLUA_METHOD TextWindow_set_atclose(lua_State* L) { /* Set the function that will be called when the text window closes. */ -#define WSLUA_ARG_TextWindow_at_close_ACTION 2 /* A Lua function to be executed when the user closes the text window. */ +#define WSLUA_ARG_TextWindow_set_atclose_ACTION 2 /* A Lua function to be executed when the user closes the text window. */ TextWindow tw = checkTextWindow(L,1); struct _close_cb_data* cbd; @@ -655,7 +655,7 @@ WSLUA_METHOD TextWindow_set_atclose(lua_State* L) { /* Set the function that wil lua_settop(L,2); if (! lua_isfunction(L,2)) { - WSLUA_ARG_ERROR(TextWindow_at_close,ACTION,"Must be a function"); + WSLUA_ARG_ERROR(TextWindow_set_atclose,ACTION,"Must be a function"); return 0; } diff --git a/epan/wslua/wslua_proto_field.c b/epan/wslua/wslua_proto_field.c index 64a0541086..410372c5a9 100644 --- a/epan/wslua/wslua_proto_field.c +++ b/epan/wslua/wslua_proto_field.c @@ -935,111 +935,111 @@ static int ProtoField_integer(lua_State* L, enum ftenum type) { #define PROTOFIELD_INTEGER(lower,FT) static int ProtoField_##lower(lua_State* L) { return ProtoField_integer(L,FT); } /* _WSLUA_CONSTRUCTOR_ ProtoField_char Creates a <> of an 8-bit ASCII character. */ -/* WSLUA_ARG_Protofield_char_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_char_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_char_BASE One of `base.NONE`, `base.HEX`, `base.OCT` or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_char_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_char_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_char_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_char_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_char_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_char_BASE One of `base.NONE`, `base.HEX`, `base.OCT` or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_char_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_char_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_char_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_uint8 Creates a <> of an unsigned 8-bit integer (i.e., a byte). */ -/* WSLUA_ARG_Protofield_uint8_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_uint8_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_uint8_BASE One of `base.DEC`, `base.HEX` or `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING` or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint8_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing the unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint8_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_uint8_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_uint8_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_uint8_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_uint8_BASE One of `base.DEC`, `base.HEX` or `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING` or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint8_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing the unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint8_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_uint8_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_uint16 Creates a <> of an unsigned 16-bit integer. */ -/* WSLUA_ARG_Protofield_uint16_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_uint16_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_uint16_BASE One of `base.DEC`, `base.HEX`, `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING` or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint16_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint16_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_uint16_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_uint16_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_uint16_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_uint16_BASE One of `base.DEC`, `base.HEX`, `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING` or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint16_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint16_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_uint16_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_uint24 Creates a <> of an unsigned 24-bit integer. */ -/* WSLUA_ARG_Protofield_uint24_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_uint24_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_uint24_BASE One of `base.DEC`, `base.HEX`, `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint24_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing the unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint24_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_uint24_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_uint24_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_uint24_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_uint24_BASE One of `base.DEC`, `base.HEX`, `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint24_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing the unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint24_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_uint24_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_uint32 Creates a <> of an unsigned 32-bit integer. */ -/* WSLUA_ARG_Protofield_uint32_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_uint32_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_uint32_BASE One of `base.DEC`, `base.HEX`, `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint32_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing the unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint32_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_uint32_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_uint32_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_uint32_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_uint32_BASE One of `base.DEC`, `base.HEX`, `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint32_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing the unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint32_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_uint32_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_uint64 Creates a <> of an unsigned 64-bit integer. */ -/* WSLUA_ARG_Protofield_uint64_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_uint64_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_uint64_BASE One of `base.DEC`, `base.HEX`, `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint64_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing the unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_uint64_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_uint64_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_uint64_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_uint64_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_uint64_BASE One of `base.DEC`, `base.HEX`, `base.OCT`, `base.DEC_HEX`, `base.HEX_DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint64_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing the unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_uint64_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_uint64_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_int8 Creates a <> of a signed 8-bit integer (i.e., a byte). */ -/* WSLUA_ARG_Protofield_int8_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_int8_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_int8_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_int8_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_int8_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_int8_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_int8_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_int8_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_int8_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int8_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int8_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_int8_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_int16 Creates a <> of a signed 16-bit integer. */ -/* WSLUA_ARG_Protofield_int16_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_int16_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_int16_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_int16_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_int16_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_int16_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_int16_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_int16_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_int16_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int16_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int16_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_int16_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_int24 Creates a <> of a signed 24-bit integer. */ -/* WSLUA_ARG_Protofield_int24_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_int24_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_int24_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_int24_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_int24_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_int24_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_int24_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_int24_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_int24_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int24_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int24_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_int24_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_int32 Creates a <> of a signed 32-bit integer. */ -/* WSLUA_ARG_Protofield_int32_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_int32_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_int32_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_int32_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_int32_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_int32_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_int32_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_int32_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_int32_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int32_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int32_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_int32_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_int64 Creates a <> of a signed 64-bit integer. */ -/* WSLUA_ARG_Protofield_int64_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_int64_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_int64_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ -/* WSLUA_OPTARG_Protofield_int64_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ -/* WSLUA_OPTARG_Protofield_int64_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_int64_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_int64_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_int64_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_int64_BASE One of `base.DEC`, `base.UNIT_STRING`, or `base.RANGE_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int64_VALUESTRING A table containing the text that corresponds to the values, or a table containing tables of range string values that correspond to the values ({min, max, "string"}) if the base is `base.RANGE_STRING`, or a table containing unit name for the values if base is `base.UNIT_STRING`. */ +/* WSLUA_OPTARG_ProtoField_int64_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_int64_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_framenum Creates a <> for a frame number (for hyperlinks between frames). */ -/* WSLUA_ARG_Protofield_framenum_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_framenum_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_framenum_BASE Only `base.NONE` is supported for framenum. */ -/* WSLUA_OPTARG_Protofield_framenum_FRAMETYPE One of `frametype.NONE`, `frametype.REQUEST`, `frametype.RESPONSE`, `frametype.ACK` or `frametype.DUP_ACK`. */ -/* WSLUA_OPTARG_Protofield_framenum_MASK Integer mask of this field, which must be 0 for framenum. */ -/* WSLUA_OPTARG_Protofield_framenum_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_framenum_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_framenum_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_framenum_BASE Only `base.NONE` is supported for framenum. */ +/* WSLUA_OPTARG_ProtoField_framenum_FRAMETYPE One of `frametype.NONE`, `frametype.REQUEST`, `frametype.RESPONSE`, `frametype.ACK` or `frametype.DUP_ACK`. */ +/* WSLUA_OPTARG_ProtoField_framenum_MASK Integer mask of this field, which must be 0 for framenum. */ +/* WSLUA_OPTARG_ProtoField_framenum_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ PROTOFIELD_INTEGER(char,FT_CHAR) @@ -1108,12 +1108,12 @@ static int ProtoField_boolean(lua_State* L, enum ftenum type) { #define PROTOFIELD_BOOL(lower,FT) static int ProtoField_##lower(lua_State* L) { return ProtoField_boolean(L,FT); } /* _WSLUA_CONSTRUCTOR_ ProtoField_bool Creates a <> for a boolean true/false value. */ -/* WSLUA_ARG_Protofield_bool_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_bool_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_bool_DISPLAY how wide the parent bitfield is (`base.NONE` is used for NULL-value). */ -/* WSLUA_OPTARG_Protofield_bool_VALUESTRING A table containing the text that corresponds to the values. */ -/* WSLUA_OPTARG_Protofield_bool_MASK Integer mask of this field. */ -/* WSLUA_OPTARG_Protofield_bool_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_bool_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_bool_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_bool_DISPLAY how wide the parent bitfield is (`base.NONE` is used for NULL-value). */ +/* WSLUA_OPTARG_ProtoField_bool_VALUESTRING A table containing the text that corresponds to the values. */ +/* WSLUA_OPTARG_ProtoField_bool_MASK Integer mask of this field. */ +/* WSLUA_OPTARG_ProtoField_bool_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ PROTOFIELD_BOOL(bool,FT_BOOLEAN) @@ -1160,16 +1160,16 @@ static int ProtoField_time(lua_State* L,enum ftenum type) { #define PROTOFIELD_TIME(lower,FT) static int ProtoField_##lower(lua_State* L) { return ProtoField_time(L,FT); } /* _WSLUA_CONSTRUCTOR_ ProtoField_absolute_time Creates a <> of a time_t structure value. */ -/* WSLUA_ARG_Protofield_absolute_time_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_absolute_time_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_absolute_time_BASE One of `base.LOCAL`, `base.UTC` or `base.DOY_UTC`. */ -/* WSLUA_OPTARG_Protofield_absolute_time_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_absolute_time_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_absolute_time_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_absolute_time_BASE One of `base.LOCAL`, `base.UTC` or `base.DOY_UTC`. */ +/* WSLUA_OPTARG_ProtoField_absolute_time_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_relative_time Creates a <> of a time_t structure value. */ -/* WSLUA_ARG_Protofield_relative_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_relative_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_relative_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_relative_time_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_relative_time_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_relative_time_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ @@ -1222,17 +1222,17 @@ static int ProtoField_floating(lua_State* L,enum ftenum type) { #define PROTOFIELD_FLOATING(lower,FT) static int ProtoField_##lower(lua_State* L) { return ProtoField_floating(L,FT); } /* _WSLUA_CONSTRUCTOR_ ProtoField_float Creates a <> of a floating point number (4 bytes). */ -/* WSLUA_ARG_Protofield_float_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_float_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_float_VALUESTRING A table containing unit name for the values. */ -/* WSLUA_OPTARG_Protofield_float_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_float_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_float_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_float_VALUESTRING A table containing unit name for the values. */ +/* WSLUA_OPTARG_ProtoField_float_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_double Creates a <> of a double-precision floating point (8 bytes). */ -/* WSLUA_ARG_Protofield_double_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_double_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_double_VALUESTRING A table containing unit name for the values. */ -/* WSLUA_OPTARG_Protofield_double_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_double_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_double_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_double_VALUESTRING A table containing unit name for the values. */ +/* WSLUA_OPTARG_ProtoField_double_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ PROTOFIELD_FLOATING(float,FT_FLOAT) @@ -1292,31 +1292,31 @@ static int ProtoField_other_display(lua_State* L,enum ftenum type) { #define PROTOFIELD_OTHER_DISPLAY(lower,FT) static int ProtoField_##lower(lua_State* L) { return ProtoField_other_display(L,FT); } /* _WSLUA_CONSTRUCTOR_ ProtoField_string Creates a <> of a string value. */ -/* WSLUA_ARG_Protofield_string_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_string_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_string_DISPLAY One of `base.ASCII` or `base.UNICODE`. */ -/* WSLUA_OPTARG_Protofield_string_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_string_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_string_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_string_DISPLAY One of `base.ASCII` or `base.UNICODE`. */ +/* WSLUA_OPTARG_ProtoField_string_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_stringz Creates a <> of a zero-terminated string value. */ -/* WSLUA_ARG_Protofield_stringz_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_stringz_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_stringz_DISPLAY One of `base.ASCII` or `base.UNICODE`. */ -/* WSLUA_OPTARG_Protofield_stringz_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_stringz_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_stringz_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_stringz_DISPLAY One of `base.ASCII` or `base.UNICODE`. */ +/* WSLUA_OPTARG_ProtoField_stringz_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_bytes Creates a <> for an arbitrary number of bytes. */ -/* WSLUA_ARG_Protofield_bytes_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_bytes_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_bytes_DISPLAY One of `base.NONE`, `base.DOT`, `base.DASH`, `base.COLON` or `base.SPACE`. */ -/* WSLUA_OPTARG_Protofield_bytes_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_bytes_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_bytes_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_bytes_DISPLAY One of `base.NONE`, `base.DOT`, `base.DASH`, `base.COLON` or `base.SPACE`. */ +/* WSLUA_OPTARG_ProtoField_bytes_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_ubytes Creates a <> for an arbitrary number of unsigned bytes. */ -/* WSLUA_ARG_Protofield_ubytes_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_ubytes_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_ubytes_DISPLAY One of `base.NONE`, `base.DOT`, `base.DASH`, `base.COLON` or `base.SPACE`. */ -/* WSLUA_OPTARG_Protofield_ubytes_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_ubytes_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_ubytes_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_ubytes_DISPLAY One of `base.NONE`, `base.DOT`, `base.DASH`, `base.COLON` or `base.SPACE`. */ +/* WSLUA_OPTARG_ProtoField_ubytes_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ @@ -1359,63 +1359,63 @@ static int ProtoField_other(lua_State* L,enum ftenum type) { #define PROTOFIELD_OTHER(lower,FT) static int ProtoField_##lower(lua_State* L) { return ProtoField_other(L,FT); } /* _WSLUA_CONSTRUCTOR_ ProtoField_none Creates a <> of an unstructured type. */ -/* WSLUA_ARG_Protofield_none_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_none_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_none_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_none_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_none_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_none_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_ipv4 Creates a <> of an IPv4 address (4 bytes). */ -/* WSLUA_ARG_Protofield_ipv4_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_ipv4_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_ipv4_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_ipv4_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_ipv4_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_ipv4_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_ipv6 Creates a <> of an IPv6 address (16 bytes). */ -/* WSLUA_ARG_Protofield_ipv6_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_ipv6_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_ipv6_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_ipv6_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_ipv6_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_ipv6_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_ether Creates a <> of an Ethernet address (6 bytes). */ -/* WSLUA_ARG_Protofield_ether_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_ether_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_ether_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_ether_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_ether_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_ether_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_guid Creates a <> for a Globally Unique IDentifier (GUID). */ -/* WSLUA_ARG_Protofield_guid_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_guid_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_guid_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_guid_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_guid_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_guid_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_oid Creates a <> for an ASN.1 Organizational IDentified (OID). */ -/* WSLUA_ARG_Protofield_oid_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_oid_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_oid_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_oid_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_oid_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_oid_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_protocol Creates a <> for a sub-protocol. Since 1.99.9. */ -/* WSLUA_ARG_Protofield_protocol_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_protocol_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_protocol_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_protocol_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_protocol_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_protocol_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_rel_oid Creates a <> for an ASN.1 Relative-OID. */ -/* WSLUA_ARG_Protofield_rel_oid_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_rel_oid_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_rel_oid_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_rel_oid_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_rel_oid_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_rel_oid_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_systemid Creates a <> for an OSI System ID. */ -/* WSLUA_ARG_Protofield_systemid_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_systemid_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_systemid_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_systemid_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_systemid_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_systemid_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ /* _WSLUA_CONSTRUCTOR_ ProtoField_eui64 Creates a <> for an EUI64. */ -/* WSLUA_ARG_Protofield_eui64_ABBR Abbreviated name of the field (the string used in filters). */ -/* WSLUA_OPTARG_Protofield_eui64_NAME Actual name of the field (the string that appears in the tree). */ -/* WSLUA_OPTARG_Protofield_eui64_DESC Description of the field. */ +/* WSLUA_ARG_ProtoField_eui64_ABBR Abbreviated name of the field (the string used in filters). */ +/* WSLUA_OPTARG_ProtoField_eui64_NAME Actual name of the field (the string that appears in the tree). */ +/* WSLUA_OPTARG_ProtoField_eui64_DESC Description of the field. */ /* _WSLUA_RETURNS_ A <> object to be added to a table set to the <> attribute. */ PROTOFIELD_OTHER(none,FT_NONE) diff --git a/epan/wslua/wslua_util.c b/epan/wslua/wslua_util.c index 38cc4331d2..8b8a53e320 100644 --- a/epan/wslua/wslua_util.c +++ b/epan/wslua/wslua_util.c @@ -127,8 +127,8 @@ WSLUA_FUNCTION wslua_format_time(lua_State* LS) { /* Formats a relative timestam WSLUA_FUNCTION wslua_get_preference(lua_State *L) { /* Get a preference value. @since 3.5.0 */ -#define WSLUA_ARG_Prefs_get_PREFERENCE 1 /* The name of the preference. */ - const gchar* preference = luaL_checkstring(L,WSLUA_ARG_Prefs_get_PREFERENCE); +#define WSLUA_ARG_get_preference_PREFERENCE 1 /* The name of the preference. */ + const gchar* preference = luaL_checkstring(L,WSLUA_ARG_get_preference_PREFERENCE); /* Split preference from module.preference */ gchar *module_name = g_strdup(preference); @@ -206,9 +206,9 @@ WSLUA_FUNCTION wslua_get_preference(lua_State *L) { WSLUA_FUNCTION wslua_set_preference(lua_State *L) { /* Set a preference value. @since 3.5.0 */ -#define WSLUA_ARG_Prefs_set_PREFERENCE 1 /* The name of the preference. */ -#define WSLUA_ARG_Prefs_set_VALUE 2 /* The preference value to set. */ - const gchar* preference = luaL_checkstring(L,WSLUA_ARG_Prefs_get_PREFERENCE); +#define WSLUA_ARG_set_preference_PREFERENCE 1 /* The name of the preference. */ +#define WSLUA_ARG_set_preference_VALUE 2 /* The preference value to set. */ + const gchar* preference = luaL_checkstring(L,WSLUA_ARG_set_preference_PREFERENCE); /* Split preference from module.preference */ gchar *module_name = g_strdup(preference); @@ -230,7 +230,7 @@ WSLUA_FUNCTION wslua_set_preference(lua_State *L) { switch (prefs_get_type(pref)) { case PREF_UINT: { - guint uint_value = (guint)luaL_checkinteger(L,WSLUA_ARG_Prefs_set_VALUE); + guint uint_value = (guint)luaL_checkinteger(L,WSLUA_ARG_set_preference_VALUE); changed = prefs_set_uint_value(pref, uint_value, pref_current); module->prefs_changed_flags |= changed; lua_pushboolean(L, changed); @@ -238,7 +238,7 @@ WSLUA_FUNCTION wslua_set_preference(lua_State *L) { } case PREF_BOOL: { - gboolean bool_value = wslua_checkboolean(L, WSLUA_ARG_Prefs_set_VALUE); + gboolean bool_value = wslua_checkboolean(L, WSLUA_ARG_set_preference_VALUE); changed = prefs_set_bool_value(pref, bool_value, pref_current); module->prefs_changed_flags |= changed; lua_pushboolean(L, changed); @@ -246,7 +246,7 @@ WSLUA_FUNCTION wslua_set_preference(lua_State *L) { } case PREF_ENUM: { - const gchar *enum_value = luaL_checkstring(L,WSLUA_ARG_Prefs_set_VALUE); + const gchar *enum_value = luaL_checkstring(L,WSLUA_ARG_set_preference_VALUE); changed = prefs_set_enum_string_value(pref, enum_value, pref_current); module->prefs_changed_flags |= changed; lua_pushboolean(L, changed); @@ -257,7 +257,7 @@ WSLUA_FUNCTION wslua_set_preference(lua_State *L) { case PREF_OPEN_FILENAME: case PREF_DIRNAME: { - const gchar *string_value = luaL_checkstring(L,WSLUA_ARG_Prefs_set_VALUE); + const gchar *string_value = luaL_checkstring(L,WSLUA_ARG_set_preference_VALUE); changed = prefs_set_string_value(pref, string_value, pref_current); module->prefs_changed_flags |= changed; lua_pushboolean(L, changed); @@ -265,7 +265,7 @@ WSLUA_FUNCTION wslua_set_preference(lua_State *L) { } case PREF_RANGE: { - const gchar *range_value = luaL_checkstring(L,WSLUA_ARG_Prefs_set_VALUE); + const gchar *range_value = luaL_checkstring(L,WSLUA_ARG_set_preference_VALUE); range_t *range = NULL; convert_ret_t ret = range_convert_str(NULL, &range, range_value, prefs_get_max_value(pref)); if (ret == CVT_NUMBER_TOO_BIG) { @@ -293,8 +293,8 @@ WSLUA_FUNCTION wslua_set_preference(lua_State *L) { WSLUA_FUNCTION wslua_reset_preference(lua_State *L) { /* Reset a preference to default value. @since 3.5.0 */ -#define WSLUA_ARG_Prefs_set_PREFERENCE 1 /* The name of the preference. */ - const gchar* preference = luaL_checkstring(L,WSLUA_ARG_Prefs_get_PREFERENCE); +#define WSLUA_ARG_reset_preference_PREFERENCE 1 /* The name of the preference. */ + const gchar* preference = luaL_checkstring(L,WSLUA_ARG_reset_preference_PREFERENCE); // Split preference from module.preference gchar *module_name = g_strdup(preference); diff --git a/epan/wslua/wslua_wtap.c b/epan/wslua/wslua_wtap.c index 1f635a132c..655de1f65f 100644 --- a/epan/wslua/wslua_wtap.c +++ b/epan/wslua/wslua_wtap.c @@ -33,8 +33,8 @@ WSLUA_FUNCTION wslua_wtap_file_type_subtype_description(lua_State* LS) { @since 3.2.12, 3.4.4 */ -#define WSLUA_ARG_file_type_subtype_description_FILETYPE 1 /* The type for which the description is to be fetched - a number returned by `wtap_name_to_file_type_subtype()`. */ - lua_Number filetype = luaL_checknumber(LS,WSLUA_ARG_file_type_subtype_description_FILETYPE); +#define WSLUA_ARG_wtap_file_type_subtype_description_FILETYPE 1 /* The type for which the description is to be fetched - a number returned by `wtap_name_to_file_type_subtype()`. */ + lua_Number filetype = luaL_checknumber(LS,WSLUA_ARG_wtap_file_type_subtype_description_FILETYPE); /* wtap_file_type_subtype_description()'s name isn't really descriptive. */ if (filetype > INT_MAX) { /* Too big. */ @@ -56,8 +56,8 @@ WSLUA_FUNCTION wslua_wtap_file_type_subtype_name(lua_State* LS) { @since 3.2.12, 3.4.4 */ -#define WSLUA_ARG_file_type_subtype_name_FILETYPE 1 /* The type for which the name is to be fetched - a number returned by `wtap_name_to_file_type_subtype()`. */ - lua_Number filetype = luaL_checknumber(LS,WSLUA_ARG_file_type_subtype_name_FILETYPE); +#define WSLUA_ARG_wtap_file_type_subtype_name_FILETYPE 1 /* The type for which the name is to be fetched - a number returned by `wtap_name_to_file_type_subtype()`. */ + lua_Number filetype = luaL_checknumber(LS,WSLUA_ARG_wtap_file_type_subtype_name_FILETYPE); /* wtap_file_type_subtype_description()'s name isn't really descriptive. */ if (filetype > INT_MAX) { /* Too big. */ @@ -79,8 +79,8 @@ WSLUA_FUNCTION wslua_wtap_name_to_file_type_subtype(lua_State* LS) { @since 3.2.12, 3.4.4 */ -#define WSLUA_ARG_name_to_file_type_subtype_NAME 1 /* The name of a file type. */ - const char* name = luaL_checkstring(LS,WSLUA_ARG_name_to_file_type_subtype_NAME); +#define WSLUA_ARG_wtap_name_to_file_type_subtype_NAME 1 /* The name of a file type. */ + const char* name = luaL_checkstring(LS,WSLUA_ARG_wtap_name_to_file_type_subtype_NAME); lua_Number filetype = wtap_name_to_file_type_subtype(name); if (filetype == -1) lua_pushnil(LS);