Wireshark-commits: [Wireshark-commits] master 0371994: wslua: Improve parameter check in ProtoField

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 16 Oct 2019 07:41:17 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=03719942232965069a1fc67d262ab32ab9b7ca2a
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

0371994 by Stig Bjørlykke (stig@xxxxxxxxxxxxx):

    wslua: Improve parameter check in ProtoField.new()
    
    Improve paremeter check in ProtoField.new() when using ftypes.CHAR:
    - Check valid base types and give an error when not supported instead of
      terminate in a g_error() (base.DEC is not supported).
    - Give an error if used with base.UNIT_STRING instead of silently remove
      the flags.
    - Support base.RANGE_STRING instead of removing the flag.
    
    Support using base.NONE with a valuestring.
    Add ftypes.CHAR to the list of supported types.
    
    Change-Id: I0e3f9698074c807f5da0de23ccd1be7446271135
    Reviewed-on: https://code.wireshark.org/review/34783
    Petri-Dish: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  3a9933c   wslua: Add ProtoField.char()
     add  0371994   wslua: Improve parameter check in ProtoField.new()


Summary of changes:
 epan/wslua/wslua_proto_field.c | 34 ++++++++++++++++++++++++----------
 test/lua/protofield.lua        | 21 ++++++++++++++++++++-
 2 files changed, 44 insertions(+), 11 deletions(-)