diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2016-05-25 18:06:37 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-05-26 04:12:13 +0000 |
commit | aaa55513465689570366c8ed86bafe7048806fd1 (patch) | |
tree | 4df2f10aeb21a5a7294128098108d08db282b278 /epan/proto.c | |
parent | 0bc1cdd9f3692e953bae2ce47fe58e5a0ab7ffd2 (diff) |
Update the comments/warnings about using proto_tree_append_string().
packet-wsp.c hasn't used proto_tree_append_string() since
Ic5467289aae7d54e78c1fd65f93358387d6139aa. Use packet-frame as the example
instead.
Change-Id: I69fb10679ec1685a61aac182414e596b345153fd
Reviewed-on: https://code.wireshark.org/review/15563
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/epan/proto.c b/epan/proto.c index 203a4d303b..d0e65452c8 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -3535,17 +3535,18 @@ proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, * allowing progressive field info update instead of only updating the * representation as does proto_item_append_text() */ -/* NOTE: this function will break with the TRY_TO_FAKE_THIS_ITEM() - * speed optimization. - * Currently only WSP use this function so it is not that bad but try to - * avoid using this one if possible. - * IF you must use this function you MUST also disable the - * TRY_TO_FAKE_THIS_ITEM() optimization for your dissector/function - * using proto_item_append_string(). - * Do that by faking that the tree is visible by calling - * proto_tree_set_visible(tree, TRUE) (see packet-wsp.c) - * BEFORE you create the item you are later going to use - * proto_item_append_string() on. +/* + * NOTE: this function will break with the TRY_TO_FAKE_THIS_ITEM() + * speed optimization. + * Currently only a few dissectors use this function so it is not + * that bad but try to avoid using this one if possible. + * IF you must use this function you MUST also disable the + * TRY_TO_FAKE_THIS_ITEM() optimization for the proto_item you'll be + * appending to with proto_item_append_string(). + * Do that by faking that the tree is visible by calling + * proto_tree_set_visible(tree, TRUE) (see packet-frame.c) + * BEFORE you create the item you are later going to use + * proto_item_append_string() on. */ void proto_item_append_string(proto_item *pi, const char *str) |